diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile --- a/emulators/virtualbox-ose-legacy/Makefile +++ b/emulators/virtualbox-ose-legacy/Makefile @@ -323,8 +323,8 @@ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif - @${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \ - -e 's|/usr/local|${PREFIX}|' \ + @${REINPLACE_CMD} -e 's|%%VBOX_DIR%%|${VBOX_DIR}|g' \ + -e 's|%%LOCALBASE%%|${PREFIX}|g' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh --- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh +++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh @@ -16,15 +16,15 @@ +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + -+PATH="/usr/bin:/bin:/usr/sbin:/sbin" -+CONFIG="/usr/local/etc/vbox/vbox.cfg" ++PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin" ++CONFIG="%%LOCALBASE%%/etc/vbox/vbox.cfg" + +test -r "${CONFIG}" && + . "${CONFIG}" +test -z "${INSTALL_DIR}" && -+ if test -d /usr/local/lib/virtualbox && -+ test -f /usr/local/lib/virtualbox/VBoxRT.so; then -+ INSTALL_DIR=/usr/local/lib/virtualbox ++ if test -d %%VBOX_DIR%% && ++ test -f %%VBOX_DIR%%/VBoxRT.so; then ++ INSTALL_DIR=%%VBOX_DIR%% + else + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -325,10 +325,11 @@ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif - # Causes a "reinplace" QA warning with default PREFIX/VBOX_DIR - @${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \ - -e 's|/usr/local|${PREFIX}|' \ + @${REINPLACE_CMD} -e 's|%%VBOX_DIR%%|${VBOX_DIR}|g' \ + -e 's|%%LOCALBASE%%|${PREFIX}|g' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${PREFIX}|g' \ + ${WRKSRC}/src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh b/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh --- a/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh +++ b/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh @@ -16,15 +16,15 @@ +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + -+PATH="/usr/bin:/bin:/usr/sbin:/sbin" -+CONFIG="/usr/local/etc/vbox/vbox.cfg" ++PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin" ++CONFIG="%%LOCALBASE%%/etc/vbox/vbox.cfg" + +test -r "${CONFIG}" && + . "${CONFIG}" +test -z "${INSTALL_DIR}" && -+ if test -d /usr/local/lib/virtualbox && -+ test -f /usr/local/lib/virtualbox/VBoxRT.so; then -+ INSTALL_DIR=/usr/local/lib/virtualbox ++ if test -d %%VBOX_DIR%% && ++ test -f %%VBOX_DIR%%/VBoxRT.so; then ++ INSTALL_DIR=%%VBOX_DIR%% + else + >&2 echo "Could not find VirtualBox installation. Please reinstall." + exit 1 @@ -33,7 +33,7 @@ +if [ -d /etc/vbox ]; then + >&2 cat <<-EOH + WARNING: Directory /etc/vbox found, but ignored. VirtualBox -+ configuration files are stored in /usr/local/etc/vbox/. ++ configuration files are stored in %%LOCALBASE%%/etc/vbox/. + EOH +fi + diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp --- a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp +++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp @@ -5,7 +5,7 @@ *********************************************************************************************************************************/ -#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "/etc/vbox/networks.conf" -+#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "/usr/local/etc/vbox/networks.conf" ++#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "%%LOCALBASE%%/etc/vbox/networks.conf" #define VBOXNET_DEFAULT_IPV4MASK "255.255.255.0" class NetworkAddress