Commit f24fdd9f authored by Vladimir Druzenko's avatar Vladimir Druzenko
Browse files

emulators/virtualbox-ose{,-kmod,-nox11}-70: Add new ports VirtualBox 7.0.24

General status:
* VirtualBox 7.1.x is still not fully ported to FreeBSD, so we are
  adding 7.0.x in experimental/test mode.
* 7.0.x is being tested on hosts of several FreeBSD developers and
  users.
* As far as we know, 7.0.x has the same system requirements as 6.1.x -
  amd64 with VT-x (we even tested it on Core 2 Duo E6xxx), so after
  confirming stability with more users, 7.0.x is expected to replace
  6.1.x.
* The following ports also need to be created for this replacement:
  - emulators/virtualbox-ose-additions-70;
  - emulators/virtualbox-ose-additions-nox11-70;
  - www/phpvirtualbox-70.
* If 7.1.x has the same system requirements, then when we port 7.1.x,
  it will replace 7.0.x.

This patch is a joint effort by several FreeBSD developers and users.
Thanks to everyone involved!

Changelog:
https://www.virtualbox.org/wiki/Changelog-7.0

PR:	271146
parent 9ef87f08
Loading
Loading
Loading
Loading
+19 −38
Original line number Diff line number Diff line
PORTNAME=	virtualbox-ose
DISTVERSION=	6.1.50
PORTREVISION?=	8
DISTVERSION=	7.0.24
PORTREVISION?=	0
CATEGORIES=	emulators
MASTER_SITES=	https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \
		LOCAL/bofh/emulators/virtualbox-ose:docs
		LOCAL/bofh/emulators/virtualbox-ose:docs \
		LOCAL/vvd:docs
PKGNAMESUFFIX?=	-70
DISTFILES=	VirtualBox-${DISTVERSION}${EXTRACT_SUFX}:src \
		VirtualBox-docs-${DISTVERSION}${EXTRACT_SUFX}:docs
EXTRACT_ONLY=	VirtualBox-${DISTVERSION}${EXTRACT_SUFX} \
@@ -25,12 +27,13 @@ BUILD_DEPENDS= gtar:archivers/gtar \
		xsltproc:textproc/libxslt
LIB_DEPENDS=	libpng.so:graphics/png \
		libcurl.so:ftp/curl
RUN_DEPENDS=	${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod
RUN_DEPENDS=	${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod-70

USES=		compiler:c++14-lang cpe gnome iconv pkgconfig ssl tar:bzip2
USES=		compiler:c++14-lang cpe gnome iconv qt:5 pkgconfig ssl tar:bzip2
CPE_VENDOR=	oracle
CPE_PRODUCT=	vm_virtualbox
USE_GNOME=	libxml2
USE_QT=		buildtools:build linguisttools:build
USE_RC_SUBR=	vboxheadless vboxwatchdog

HAS_CONFIGURE=		yes
@@ -39,10 +42,10 @@ CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}"

CONFLICTS_INSTALL=	virtualbox-ose-legacy \
			virtualbox-ose-nox11-legacy \
			virtualbox-ose-70 \
			virtualbox-ose-nox11-70
			virtualbox-ose \
			virtualbox-ose-nox11

PORTSCOUT=	limit:^6\.
PORTSCOUT=	limit:^7\.0\.
SUB_FILES=	pkg-message
SUB_LIST=	VBOXDIR=${VBOX_DIR} \
		VBOX_ETC=${VBOX_ETC} \
@@ -72,7 +75,7 @@ PLIST_SUB= GUEST_VER=${DISTVERSION} \

SLAVE_PORT?=	no

OPTIONS_DEFINE=		AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OPUS PULSEAUDIO \
OPTIONS_DEFINE=		AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS PULSEAUDIO \
			PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC WEBSERVICE VPX X11
OPTIONS_DEFAULT=	AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11
.if ${SLAVE_PORT} == no
@@ -87,7 +90,6 @@ AIO_DESC= Enable Asyncronous IO support (check pkg-message)
DEBUG_DESC=		Debug symbols, additional logs and assertions
GUESTADDITIONS_DESC=	Build with Guest Additions
NLS_DESC=		Native language support (requires QT5)
OPUS_DESC=		Use libvpx for audio recording (requires VPX)
QT5_DESC=		Build with QT5 frontend (requires X11)
R0LOGGING_DESC=		Enable R0 logging (requires DEBUG)
UDPTUNNEL_DESC=		Build with UDP tunnel support
@@ -103,9 +105,6 @@ DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus
DBUS_CONFIGURE_OFF=	--disable-dbus
DEBUG_CONFIGURE_ON=	--build-debug
NLS_IMPLIES=		QT5
OPUS_IMPLIES=		VPX
OPUS_LIB_DEPENDS=	libopus.so:audio/opus
OPUS_CONFIGURE_OFF=	--disable-libopus
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_OFF=	--disable-pulse
PYTHON_USES=		python
@@ -116,7 +115,7 @@ PYTHON_VARS= pydistutils_pkgname=vboxapi pydistutils_pkgversion=1.0
QT5_IMPLIES=		X11
QT5_USES=		gl qmake:no_env qt:5 xorg
QT5_USE=		QT=buildtools:build,core,dbus,gui,linguisttools:build,opengl \
			QT=printsupport,widgets,x11extras XORG=xcb GL=gl
			QT=printsupport,widgets,x11extras,xml XORG=xcb GL=gl
QT5_CONFIGURE_ON=	--enable-qt5
QT5_CONFIGURE_OFF=	--disable-qt
R0LOGGING_IMPLIES=	DEBUG
@@ -129,8 +128,8 @@ VNC_CONFIGURE_ON= --enable-vnc
VPX_LIB_DEPENDS=	libvpx.so:multimedia/libvpx
VPX_CONFIGURE_OFF=	--disable-libvpx
WEBSERVICE_BUILD_DEPENDS=	soapcpp2:devel/gsoap
X11_USES=		sdl xorg
X11_USE=		SDL=sdl XORG=x11,xcursor,xext,xinerama,xmu,xorgproto,xt
X11_USES=		gl sdl xorg
X11_USE=		GL=gl SDL=sdl XORG=x11,xcursor,xext,xinerama,xmu,xorgproto,xt
X11_CONFIGURE_OFF=	--build-headless

ENV=
@@ -139,9 +138,9 @@ ENV=
.include <bsd.port.options.mk>

.if ${SLAVE_PORT} == no
CONFLICTS_INSTALL+=	virtualbox-ose-nox11
CONFLICTS_INSTALL+=	virtualbox-ose-nox11-70
.else
CONFLICTS_INSTALL+=	virtualbox-ose
CONFLICTS_INSTALL+=	virtualbox-ose-70
.endif

.if ${PORT_OPTIONS:MDEBUG}
@@ -177,7 +176,7 @@ VBOX_UTILS+= vboxwebsrv webtest
.endif

.if ${PORT_OPTIONS:MX11}
VBOX_PROGS+=	VBoxSDL
#VBOX_PROGS+=	VBoxSDL
.endif

.if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE}
@@ -204,24 +203,6 @@ KMK_FLAGS+= -j${MAKE_JOBS_NUMBER}
.include <bsd.port.pre.mk>

.if ${CHOSEN_COMPILER_TYPE} == clang
# 1) llvm10 in FreeBSD before r364284 miscompiles virtualbox 6.1 causing errors.
# 2) llvm15 in FreeBSD miscompiles virtualbox 6.1 causing errors: PR#270189.
# Force llvm from ports.
.if ${OPSYS} == FreeBSD
# USES must be before .include <bsd.port.pre.mk>, but CHOSEN_COMPILER_TYPE must be after.
# This is a workaround with possibility to define different llvm via VBOX_LLVM_VER in make.conf.
#USES+=		llvm:min=11,max=14
#CC=		clang${LLVM_VERSION}
#CXX=		clang++${LLVM_VERSION}
BUILD_DEPENDS+=	clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER}
CC=		clang${VBOX_LLVM_VER}
CXX=		clang++${VBOX_LLVM_VER}
.if ${LLVM_DEFAULT} < 11 || ${LLVM_DEFAULT} > 14
VBOX_LLVM_VER?=	14
.else
VBOX_LLVM_VER?=	${LLVM_DEFAULT}
.endif
.endif
PATCH_DEPENDS+=	${LOCALBASE}/share/kBuild/tools/GXX3.kmk:devel/kBuild
.endif

@@ -402,7 +383,7 @@ do-install:
	    ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png \
	    ${STAGEDIR}${PREFIX}/share/pixmaps/VBox.png
	${INSTALL_DATA} \
	    ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop \
	    ${FILESDIR}/virtualbox.desktop \
	    ${STAGEDIR}${PREFIX}/share/applications/virtualbox.desktop
.endif

+7 −7
Original line number Diff line number Diff line
TIMESTAMP = 1716920210
SHA256 (VirtualBox-6.1.50.tar.bz2) = 73ff603842896cb8d86ac5a817eb5037d7d225d3c46ea238e39d7ba5aaf61a57
SIZE (VirtualBox-6.1.50.tar.bz2) = 165959648
SHA256 (VBoxGuestAdditions_6.1.50.iso) = af53e34c5a5ec143f3418ac01d00ed5f33f6b31bfdc92eb4714c99d9bccb6602
SIZE (VBoxGuestAdditions_6.1.50.iso) = 64051200
SHA256 (VirtualBox-docs-6.1.50.tar.bz2) = e5dc118e8bb8352c06d5359e4f75ceb339a3917f0727fd74ad02ff07251e67db
SIZE (VirtualBox-docs-6.1.50.tar.bz2) = 4063302
TIMESTAMP = 1738097405
SHA256 (VirtualBox-7.0.24.tar.bz2) = 340d66f52251e23d9bc1eb4fdf70e44cb9d1db69bc5064e3f7bdfb8bc0e3a458
SIZE (VirtualBox-7.0.24.tar.bz2) = 174663788
SHA256 (VirtualBox-docs-7.0.24.tar.bz2) = a4005ab62ff6352b820f3aba2c5a98b4541317433afff0d58d4b8c2678e75cdd
SIZE (VirtualBox-docs-7.0.24.tar.bz2) = 4766637
SHA256 (VBoxGuestAdditions_7.0.24.iso) = 17b01cd40bc34a7b79e4922c8f68bea3da3b2348bc4cdeadc962f84f1a63e225
SIZE (VBoxGuestAdditions_7.0.24.iso) = 54804480
+1 −1
Original line number Diff line number Diff line
--- Config.kmk.orig	2021-04-28 16:21:25 UTC
+++ Config.kmk
@@ -4931,7 +4931,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS
@@ -5958,7 +5942,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS
 		| xargs -J% objcopy % $(out)
 
 ## Strip debug info (comment out if debugging or something).
+268 −102

File changed.

Preview size limit exceeded, changes collapsed.

+13 −22
Original line number Diff line number Diff line
--- configure.orig	2021-10-18 17:47:25 UTC
+++ configure
@@ -139,10 +139,14 @@ CXX_FLAGS=""
--- configure.orig	2024-10-10 20:19:24.000000000 +0200
+++ configure	2024-12-27 13:12:46.010746000 +0100
@@ -154,10 +154,14 @@
 if [ "$OS" = "freebsd" ]; then
   INCCURL="-I/usr/local/include"
   LIBCURL="-L/usr/local/lib -lcurl"
@@ -15,7 +15,7 @@
 else
   INCCURL=""
   LIBCURL="-lcurl"
@@ -1173,6 +1177,9 @@ extern "C" int main(int argc, char** arg
@@ -1207,6 +1211,9 @@
   printf("found version %d.%d.%d",
          SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
 #if SDL_VERSION_ATLEAST(1,2,7)
@@ -25,7 +25,7 @@
   printf(", OK.\n");
   return 0;
 #else
@@ -1257,7 +1264,7 @@ extern "C" int main(void)
@@ -1291,7 +1298,7 @@
 #endif
 }
 EOF
@@ -34,7 +34,7 @@
     test_execute
   fi
 }
@@ -1564,6 +1571,7 @@ EOF
@@ -1605,6 +1612,7 @@
           FLGQT5=`pkg-config Qt5Core --cflags`
           # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk)
           [ $(($cc_maj * 100 + $cc_min)) -ge 408 ] && FLGQT5="$FLGQT5 -std=c++11"
@@ -42,16 +42,7 @@
           INCQT5=`strip_I "$FLGQT5"`
           LIBDIR5=`pkg-config Qt5Core --variable=libdir`
           LIBQT5=`pkg-config Qt5Core Qt5Gui --libs`
@@ -1702,7 +1710,7 @@ check_libopus()
       fi
       cat > $ODIR.tmp_src.cc << EOF
 #include <cstdio>
-#include <opus/opus.h>
+#include <opus.h>
 extern "C" int main(void)
 {
   OpusEncoder *test;
@@ -2034,8 +2042,8 @@ EOF
@@ -2180,8 +2188,8 @@
         echo "compiling the following source file:" >> $LOG
         cat $ODIR.tmp_src.cc >> $LOG
         echo "using the following command line:" >> $LOG
@@ -62,7 +53,7 @@
         if [ $? -eq 0 ]; then
           found=1
           break
@@ -2151,7 +2159,7 @@ check_gsoap()
@@ -2297,7 +2305,7 @@
         else
           cnf_append "VBOX_GSOAP_CXX_SOURCES" ""
         fi
@@ -71,16 +62,16 @@
         gsoap_version=`pkg-config gsoapssl++ --modversion`
         log_success "found version $gsoap_version"
         return
@@ -2519,7 +2527,7 @@ for option in "$@"; do
@@ -2661,7 +2669,7 @@
     --with-openssl-dir=*)
       OPENSSLDIR=`echo $option | cut -d'=' -f2`
       INCCRYPTO="-I${OPENSSLDIR}/include"
-      LIBCRYPTO="${OPENSSLDIR}/lib/libssl.a ${OPENSSLDIR}/lib/libcrypto.a"
+      LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto"
       # On Darwin (at least for macports) static OpenSSL also needs zlib.
       [ "$OS" = "darwin" ] && LIBCRYPTO="$LIBCRYPTO ${OPENSSLDIR}/lib/libz.a"
       # On Linux static OpenSSL typically needs a few additional libraries.
       [ "$OS" = "linux" ] && LIBCRYPTO="-ldl $LIBPTHREAD -lm"
       ;;
@@ -2865,12 +2873,22 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then
@@ -3028,12 +3036,22 @@
   [ $WITH_JAVA   -eq 1 ] && check_java
 
   # PulseAudio
@@ -109,7 +100,7 @@
   fi
 fi
 
@@ -2886,14 +2904,6 @@ if [ "$OS" = "linux" ]; then
@@ -3049,14 +3067,6 @@
     cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1"
   fi
   if [ $ONLY_ADDITIONS -eq 0 ]; then
Loading