diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-02-16 21:49:47 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-02-16 21:49:47 +0000 |
commit | f94082268e45979844de3fb9fc87cfb91db16a97 (patch) | |
tree | 05ffe3386d3c09ae5385431c51ba779a81b06049 | |
parent | 080cce8627f42d516fd4afdd21453664c207e665 (diff) | |
download | ports-f94082268e45979844de3fb9fc87cfb91db16a97.tar.gz ports-f94082268e45979844de3fb9fc87cfb91db16a97.zip |
Fix the executable wrapper to properly check its installation directory when
QT4 option is disabled.
Reported by: raul@b2n.org, abi@abinet.ru
Submitted by: gpalmer (initial patch)
Notes
Notes:
svn path=/head/; revision=379121
-rw-r--r-- | emulators/virtualbox-ose/Makefile | 52 | ||||
-rw-r--r-- | emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh | 8 |
2 files changed, 34 insertions, 26 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile index 395970640a00..5a7940d6ecc4 100644 --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -3,6 +3,7 @@ PORTNAME= virtualbox-ose DISTVERSION= 4.3.22 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ http://tmp.chruetertee.ch/ \ @@ -35,11 +36,11 @@ WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} ONLY_FOR_ARCHS= i386 amd64 USES= compiler cpe iconv pkgconfig tar:bzip2 USE_GNOME= libidl +USE_LDCONFIG= ${VBOX_DIR} HAS_CONFIGURE= yes CONFIGURE_ARGS+= --disable-java --passive-mesa CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}" -USE_LDCONFIG= ${PREFIX}/lib/virtualbox CONFLICTS_INSTALL= virtualbox-ose-additions-4* \ virtualbox-ose-additions-devel-4* \ @@ -51,6 +52,7 @@ VBOXWSUSER?= vboxusers VBOXGROUP?= vboxusers USERS= ${VBOXUSER} GROUPS= ${VBOXGROUP} +VBOX_DIR= ${PREFIX}/lib/virtualbox VBOX_LINKS= VBoxVRDP VBOX_PROGS= VBoxAutostart VBoxBalloonCtrl VBoxHeadless VBoxManage VBOX_UTILS= VBoxExtPackHelperApp VBoxNetAdpCtl VBoxNetDHCP VBoxSVC \ @@ -210,9 +212,12 @@ pre-everything:: .endif post-patch: - @${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${PREFIX}/lib/virtualbox' > ${WRKSRC}/LocalConfig.kmk - @${ECHO} 'VBOX_PATH_SHARED_LIBS = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk - @${ECHO} 'VBOX_WITH_RUNPATH = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk + @${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${VBOX_DIR}' > \ + ${WRKSRC}/LocalConfig.kmk + @${ECHO} 'VBOX_PATH_SHARED_LIBS = ${VBOX_DIR}' >> \ + ${WRKSRC}/LocalConfig.kmk + @${ECHO} 'VBOX_WITH_RUNPATH = ${VBOX_DIR}' >> \ + ${WRKSRC}/LocalConfig.kmk @${ECHO} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> ${WRKSRC}/LocalConfig.kmk @${ECHO} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk @${ECHO} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk @@ -254,7 +259,8 @@ post-patch: @${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif - @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \ + @${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \ + -e 's|/usr/local|${PREFIX}|' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh do-build: @@ -271,29 +277,29 @@ do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/include/virtualbox cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/include && ${COPYTREE_SHARE} "*" ${STAGEDIR}${PREFIX}/include/virtualbox - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/virtualbox - cd ${KMK_BUILDDIR}/bin && ${COPYTREE_SHARE} "*.so *.gc *.r0 *.fd components" ${STAGEDIR}${PREFIX}/lib/virtualbox - ${LN} -sf ${DATADIR}/sdk ${STAGEDIR}${PREFIX}/lib/virtualbox + ${MKDIR} ${STAGEDIR}${VBOX_DIR} + cd ${KMK_BUILDDIR}/bin && ${COPYTREE_SHARE} \ + "*.so *.gc *.r0 *.fd components" ${STAGEDIR}${VBOX_DIR} + ${LN} -sf ${DATADIR}/sdk ${STAGEDIR}${VBOX_DIR} ${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh \ - ${STAGEDIR}${PREFIX}/lib/virtualbox + ${STAGEDIR}${VBOX_DIR} .for f in ${VBOX_PROGS} ${VBOX_UTILS} - ${INSTALL_PROGRAM} ${KMK_BUILDDIR}/bin/${f} \ - ${STAGEDIR}${PREFIX}/lib/virtualbox + ${INSTALL_PROGRAM} ${KMK_BUILDDIR}/bin/${f} ${STAGEDIR}${VBOX_DIR} .endfor .for f in ${VBOX_PROGS} ${VBOX_LINKS} - ${LN} -sf ${PREFIX}/lib/virtualbox/VBox.sh \ - ${STAGEDIR}${PREFIX}/bin/${f} + ${LN} -sf ${VBOX_DIR}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f} .endfor .for f in ${VBOX_PROGS} - ${LN} -sf ${PREFIX}/lib/virtualbox/VBox.sh \ - ${STAGEDIR}${PREFIX}/bin/${f:tl} + ${LN} -sf ${VBOX_DIR}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f:tl} .endfor .if ${PORT_OPTIONS:MGUESTADDITIONS} - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/virtualbox/additions - ${INSTALL_DATA} ${DISTDIR}/${GUESTADDITIONS} ${STAGEDIR}${PREFIX}/lib/virtualbox/additions/ - ${LN} -sf ${PREFIX}/lib/virtualbox/additions/${GUESTADDITIONS} ${STAGEDIR}${PREFIX}/lib/virtualbox/additions/VBoxGuestAdditions.iso + ${MKDIR} ${STAGEDIR}${VBOX_DIR}/additions + ${INSTALL_DATA} ${DISTDIR}/${GUESTADDITIONS} \ + ${STAGEDIR}${VBOX_DIR}/additions/ + ${LN} -sf ${VBOX_DIR}/additions/${GUESTADDITIONS} \ + ${STAGEDIR}${VBOX_DIR}/additions/VBoxGuestAdditions.iso .endif .if ${PORT_OPTIONS:MMANUAL} @@ -307,7 +313,7 @@ do-install: .if ${PORT_OPTIONS:MPYTHON} cd ${KMK_BUILDDIR}/bin/sdk/installer && \ - ${SETENV} VBOX_INSTALL_PATH="${PREFIX}/lib/virtualbox" \ + ${SETENV} VBOX_INSTALL_PATH="${VBOX_DIR}" \ ${PYTHON_CMD} vboxapisetup.py install --root=${STAGEDIR} @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom @@ -324,9 +330,11 @@ do-install: .endif .if ${PORT_OPTIONS:MVNC} - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/virtualbox/ExtensionPacks/VNC/${KMK_ARCH} - ${INSTALL_DATA} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/ExtPack* ${STAGEDIR}${PREFIX}/lib/virtualbox/ExtensionPacks/VNC/ - ${INSTALL_LIB} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/${KMK_ARCH}/* ${STAGEDIR}${PREFIX}/lib/virtualbox/ExtensionPacks/VNC/${KMK_ARCH}/ + ${MKDIR} ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH} + ${INSTALL_DATA} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/ExtPack* \ + ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/ + ${INSTALL_LIB} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/${KMK_ARCH}/* \ + ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH}/ .endif .if ${PORT_OPTIONS:MWEBSERVICE} 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 index 54a5b161c24e..57ae63fc106e 100644 --- a/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh +++ b/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh @@ -1,5 +1,5 @@ ---- src/VBox/Installer/freebsd/VBox.sh.orig 2015-02-04 18:09:31.733441170 -0500 -+++ src/VBox/Installer/freebsd/VBox.sh 2015-02-04 18:09:31.733441170 -0500 +--- src/VBox/Installer/freebsd/VBox.sh.orig 2015-02-16 12:58:52.951032000 -0500 ++++ src/VBox/Installer/freebsd/VBox.sh 2015-02-16 13:00:48.096063000 -0500 @@ -0,0 +1,58 @@ +#!/bin/sh +# @@ -22,8 +22,8 @@ +test -r "${CONFIG}" && + . "${CONFIG}" +test -z "${INSTALL_DIR}" && -+ if test -f /usr/local/lib/virtualbox/VirtualBox && -+ test -x /usr/local/lib/virtualbox/VirtualBox; then ++ if test -d /usr/local/lib/virtualbox && ++ test -f /usr/local/lib/virtualbox/VBoxRT.so; then + INSTALL_DIR=/usr/local/lib/virtualbox + else + echo "Could not find VirtualBox installation. Please reinstall." |