mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
1feafdfaa6
- Remove custom FreeBSD compiler flags that are only supported by our old base GCC 4.2 [1] - Fix building with ports GCC 4.6 [1] - Fix build on 10-CURRENT after removal of vm_page_lock_queues() in r242941 [2] - Improve waits for periods shorter than a single tick [1] - Fix dependency check when building with custom KMODDIR [3] - Fix recording with OSS Audio backend to record at a proper volume [4] - Initialize host-only interfaces at boot time so that other scripts and daemons can properly use them [2] - Fix build if $ENV not ash-compatible [5] - Fix ich9 bios to correctly configure pci bridge1 and pci bridge2 [6] - Add VLAN trunking support to vboxnetflt [7] PR: ports/171730 [1], ports/167521 [5] Submitted by: Andriy Gapon <avg@FreeBSD.org> [1] Submitted by: Ed Maste <emaste@FreeBSD.org> [2] Submitted by: Kurt Jaeger <fbsd-ports@opsec.eu> [5] Submitted by: Gustau Perez i Querol <gperez@entel.upc.edu> [6] Submitted by: Landon J Fuller <landonf at plausible.coop> [7] Reported by: Daniel Braniss <danny@cs.huji.ac.il> [3] Obtained from: https://www.virtualbox.org/ticket/10695 [4] See: http://article.gmane.org/gmane.os.freebsd.devel.emulation/10438 [6]
161 lines
4.3 KiB
Makefile
161 lines
4.3 KiB
Makefile
# Created by: Bernhard Froehlich <decke@bluelife.at>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= virtualbox-ose
|
|
DISTVERSION= 4.2.6
|
|
CATEGORIES= emulators kld
|
|
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
|
|
http://tmp.chruetertee.ch/ \
|
|
http://disasterarea.chruetertee.ch/
|
|
PKGNAMESUFFIX= -additions
|
|
DISTNAME= VirtualBox-${DISTVERSION}
|
|
|
|
MAINTAINER= vbox@FreeBSD.org
|
|
COMMENT= VirtualBox additions for FreeBSD guests
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm \
|
|
as86:${PORTSDIR}/devel/dev86 \
|
|
kmk:${PORTSDIR}/devel/kBuild
|
|
|
|
UNIQUENAME= ${PORTNAME}${PKGNAMESUFFIX}
|
|
WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION}
|
|
USE_RC_SUBR= vboxguest vboxservice
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
FETCH_ARGS= -pRr
|
|
USE_BZIP2= yes
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
HAS_CONFIGURE= yes
|
|
CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --nofatal \
|
|
--disable-xpcom --disable-sdl-ttf --disable-pulse \
|
|
--disable-alsa --disable-dbus --disable-python \
|
|
--build-headless
|
|
|
|
CONFLICTS= bcc-[0-9]*
|
|
CONFLICTS_INSTALL= virtualbox-ose-additions-devel-[3,4]* virtualbox-ose-[3,4]* virtualbox-ose-devel-[3,4]* virtualbox-ose-legacy-[3,4]*
|
|
|
|
OPTIONS_DEFINE= DEBUG X11 OPENGL
|
|
OPTIONS_DEFAULT= X11
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
PLIST_SUB+= KMODDIR=${KMODDIR:C,^/,,}
|
|
|
|
KMODDIR= /boot/modules
|
|
SRC_BASE?= /usr/src
|
|
VIDEODIR= ${PREFIX}/lib/xorg/modules/drivers
|
|
INPUTDIR= ${PREFIX}/lib/xorg/modules/input
|
|
|
|
VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/additions
|
|
|
|
KMK_BUILDTYPE= release
|
|
KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE}
|
|
KMK_FLAGS=
|
|
|
|
.if ${PORT_OPTIONS:MDEBUG}
|
|
KMK_FLAGS+= BUILD_TYPE=debug
|
|
KMK_BUILDTYPE= debug
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MX11}
|
|
VBOX_WITH_X11= 1
|
|
USE_XORG= xcursor xmu inputproto xorg-server xrandr
|
|
PLIST_SUB+= X11=""
|
|
.else
|
|
VBOX_WITH_X11=
|
|
PLIST_SUB+= X11="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MOPENGL}
|
|
USE_GL= gl
|
|
.else
|
|
CONFIGURE_ARGS+=--disable-opengl
|
|
.endif
|
|
|
|
.if ${ARCH} == i386
|
|
KMK_ARCH= freebsd.x86
|
|
.else
|
|
KMK_ARCH= freebsd.${ARCH}
|
|
.endif
|
|
|
|
XSERVER_ABI:= ${XSERVER_VER:S/.//:R}
|
|
|
|
.if !exists(${SRC_BASE}/sys/kern/bus_if.m)
|
|
IGNORE= requires kernel sources
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
pre-everything::
|
|
.if ${ARCH} == "amd64"
|
|
.if !exists(/usr/lib32/libc.so)
|
|
@${ECHO} 'Requires 32-bit libraries installed under /usr/lib32.'
|
|
@${ECHO} 'Do: cd /usr/src; make build32 install32; ldconfig -v -m -R /usr/lib32'
|
|
@${FALSE}
|
|
.endif
|
|
.endif
|
|
|
|
post-patch:
|
|
@${ECHO} 'VBOX_ONLY_ADDITIONS = 1' > ${WRKSRC}/LocalConfig.kmk
|
|
@${ECHO} 'VBOX_WITH_X11_ADDITIONS = ${VBOX_WITH_X11}' >> ${WRKSRC}/LocalConfig.kmk
|
|
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
|
|
${WRKSRC}/Config.kmk \
|
|
${WRKSRC}/configure \
|
|
${WRKSRC}/kBuild/units/qt4.kmk \
|
|
${WRKSRC}/kBuild/sdks/LIBSDL.kmk \
|
|
${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
|
|
${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop
|
|
@${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' ${WRKSRC}/configure
|
|
|
|
pre-build:
|
|
@${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \
|
|
${WRKSRC}/env.sh \
|
|
${WRKSRC}/src/VBox/Additions/freebsd/Installer/vboxguest.sh
|
|
|
|
do-build:
|
|
cd ${WRKSRC} && ${SH} env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}
|
|
cd ${VBOX_BIN}/src && make SYSDIR=${SRC_BASE}/sys
|
|
|
|
do-install:
|
|
${MKDIR} ${KMODDIR}
|
|
${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko ${KMODDIR}
|
|
@/usr/sbin/kldxref ${KMODDIR}
|
|
|
|
${MKDIR} ${PREFIX}/etc/rc.d/
|
|
|
|
${MKDIR} ${PREFIX}/sbin
|
|
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxControl ${PREFIX}/sbin/
|
|
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxService ${PREFIX}/sbin/
|
|
|
|
.if ${PORT_OPTIONS:MX11}
|
|
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${PREFIX}/bin/
|
|
|
|
${MKDIR} ${PREFIX}/bin
|
|
${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
|
|
${PREFIX}/bin/VBoxClient-all
|
|
|
|
# X11 autostart
|
|
${MKDIR} ${PREFIX}/etc/xdg/autostart/
|
|
${INSTALL_DATA} ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \
|
|
${PREFIX}/etc/xdg/autostart/
|
|
|
|
# KDE autostart
|
|
${MKDIR} ${PREFIX}/share/autostart/
|
|
${INSTALL_DATA} ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \
|
|
${PREFIX}/share/autostart/
|
|
|
|
${MKDIR} ${VIDEODIR}
|
|
${INSTALL_DATA} ${VBOX_BIN}/vboxvideo_drv_${XSERVER_ABI}.so ${VIDEODIR}/vboxvideo_drv.so
|
|
|
|
${MKDIR} ${INPUTDIR}
|
|
${INSTALL_DATA} ${VBOX_BIN}/vboxmouse_drv_${XSERVER_ABI}.so ${INPUTDIR}/vboxmouse_drv.so
|
|
.endif
|
|
|
|
post-install:
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.include <bsd.port.post.mk>
|