git: fd06fe3d7c9a - main - emulators/virtualbox-ose: Remove unnecessary dependency on 32-bit compat for amd64

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Mon, 12 Jun 2023 16:23:52 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fd06fe3d7c9a9bc13ec7828f18d4e652aa102604

commit fd06fe3d7c9a9bc13ec7828f18d4e652aa102604
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-06-12 16:05:20 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-06-12 16:05:20 +0000

    emulators/virtualbox-ose: Remove unnecessary dependency on 32-bit compat for amd64
    
    32-bit in-kernel support and lib32 libs are not necessary for VirtualBox 6.x,
    so just remove this requirement.
    Also the port support amd64 only - remove I386 from PLIST_SUB.
    
    PR:                     266382
    Tested by:              Olivier Certner <olivier.freebsd@free.fr>
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D40487
---
 emulators/virtualbox-ose/Makefile  | 24 ------------------------
 emulators/virtualbox-ose/pkg-plist |  2 --
 2 files changed, 26 deletions(-)

diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index 1ce1be90124c..cf5b211e33f5 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -123,10 +123,6 @@ OPTIONS_DEFAULT+=	PYTHON
 CONFLICTS_INSTALL+=	virtualbox-ose
 .endif
 
-.if ${ARCH} == "amd64"
-_ELF32!=	kldstat -q -m elf32 && echo yes || echo no
-.endif
-
 .if ${PORT_OPTIONS:MDEBUG}
 KMK_BUILDTYPE=	debug
 KMK_FLAGS+=	BUILD_TYPE=debug
@@ -196,14 +192,7 @@ PLIST_SUB+=	SDK=""
 PLIST_SUB+=	SDK="@comment "
 .endif
 
-.if ${ARCH} == i386
-KMK_ARCH=	freebsd.x86
-PLIST_SUB+=	I386=""
-.else
 KMK_ARCH=	freebsd.${ARCH}
-PLIST_SUB+=	I386="@comment "
-.endif
-
 PLIST_SUB+=	ARCH="${KMK_ARCH}"
 
 KMK_BUILDDIR=	${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}
@@ -254,19 +243,6 @@ PLIST_SUB+=	PYTHON_PYCDIR=/ \
 CONFIGURE_ARGS+=	--with-openssl-dir="${OPENSSLBASE}"
 .endif
 
-pre-everything::
-.if ${ARCH} == "amd64"
-.if ${_ELF32} != yes
-	@${ECHO_MSG} 'Requires 32-bit runtime support in kernel.'
-	@${ECHO_MSG} 'Rebuild kernel with "options COMPAT_FREEBSD32" and reboot.'
-	@${FALSE}
-.elif !exists(/usr/lib32/libc.so)
-	@${ECHO_MSG} 'Requires 32-bit libraries installed under /usr/lib32.'
-	@${ECHO_MSG} 'Do: cd /usr/src; make build32 install32; service ldconfig restart'
-	@${FALSE}
-.endif
-.endif
-
 post-patch:
 	@${ECHO_CMD} 'VBOX_PATH_APP_PRIVATE_ARCH = ${VBOX_DIR}' > \
 	    ${WRKSRC}/LocalConfig.kmk
diff --git a/emulators/virtualbox-ose/pkg-plist b/emulators/virtualbox-ose/pkg-plist
index 5a71bfe95aa0..ee26bfa71c09 100644
--- a/emulators/virtualbox-ose/pkg-plist
+++ b/emulators/virtualbox-ose/pkg-plist
@@ -402,8 +402,6 @@ lib/virtualbox/VBoxManage
 lib/virtualbox/VBoxNetDHCP.so
 @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetNAT
 lib/virtualbox/VBoxNetNAT.so
-%%I386%%lib/virtualbox/VBoxREM32.so
-%%I386%%lib/virtualbox/VBoxREM64.so
 lib/virtualbox/VBoxRT.so
 %%X11%%@(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxSDL
 %%X11%%lib/virtualbox/VBoxSDL.so