1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-18 08:02:48 +00:00
freebsd-ports/emulators/virtualbox-ose-kmod-legacy/Makefile
Beat Gaetzi 078a314586 emulators/virtualbox:
- Remove emulators/virtualbox port. Renamed to emulators/virtualbox-ose
  and seperate port for the kernel modules created:
  emulators/virtualbox-ose-kmod.

emulators/virtualbox-ose:
- Update to 3.1.2
- Update guest additions to 3.1.2
- Port has been renamed to virtualbox-ose to reflect that we are using
  the OSE version. [1]
- Added proper PulseAudio support for FreeBSD [2]
- procfs is not required anymore because vbox uses sysctl(3) now [3]
- Update pkg-message to reflect recent changes
- Add nox's FreeBSD host networking patches that are now also in the
  upstream vbox svn (modulo vbox variable naming style adjustments:)
	http://lists.freebsd.org/pipermail/freebsd-emulation/2010-January/007260.html
	http://www.virtualbox.org/changeset/25698
  1. Allow direct tap networking again (for users that need the best
  network performance and/or need more complex network setups, like when
  they want to use routing instead of bridging to e.g. protect from guests
  messing with the lan's arp tables; a tap + routing + proxy arp example
  is in the above freebsd-emulation posting.)
  2. Enable vbox' shared mac feature when using bridged mode on a wifi
  interface, together with the virtualbox-ose-kmod change this
  should fix bridged mode for wifi users. [4]

emulators/virtualbox-ose-kmod:
- Update to 3.1.2
- Add rc.d script to load kernel modules
- Fix build with a non-standard location for the system source [5]
- Merge aeichner's vboxnetflt fix committed to upstream vbox svn
  (thanks!) that makes the shared mac feature enabled above actually work
  on FreeBSD hosts. [6]

Please see http://wiki.freebsd.org/VirtualBox for update instructions.

Many thanks to the VirtualBox developers, all tester, patch submitter and
the whole vbox@ team.

PR:		ports/141630 [2]
Noticed by:	mm@ [1]
Submitted by:	Noriyoshi Kawano <bowie AT nrik.jp> [2],
		Baptiste Daroussin <baptiste.daroussin AT gmail.com> [3]
		and Bernhard Froehlich <decke AT bluelife.at> [3],
		nox@ [4], scf@ [5]
Obtained from:	http://www.virtualbox.org/changeset/25699 [6]
On behalf of:	vbox@ (decke, dhn, itetcu, miwi, nox)
2010-01-13 08:03:17 +00:00

98 lines
2.6 KiB
Makefile

# New ports collection makefile for: virtualbox-ose-kmod
# Date created: 2009-09-21
# Whom: Bernhard Froehlich <decke@bluelife.at>
#
# $FreeBSD$
#
PORTNAME= virtualbox-ose
DISTVERSION= 3.1.2
CATEGORIES= emulators kld
MASTER_SITES= http://tmp.chruetertee.ch/ \
http://freebsd.unixfreunde.de/sources/ \
http://disasterarea.chruetertee.ch/ \
http://mirror.4bit.ws/
PKGNAMESUFFIX= -kmod
DISTNAME= VirtualBox-${DISTVERSION}-OSE
MAINTAINER= vbox@FreeBSD.org
COMMENT= VirtualBox kernel module for FreeBSD
BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm \
as86:${PORTSDIR}/devel/dev86 \
kmk:${PORTSDIR}/devel/kBuild
WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION}_OSE
USE_RC_SUBR= vboxnet
ONLY_FOR_ARCHS= i386 amd64
USE_BZIP2= 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]*
OPTIONS= DEBUG "Build with debugging symbols" off
.include <bsd.port.options.mk>
PLIST_SUB+= KMODDIR=${KMODDIR:C,^/,,}
KMODDIR= /boot/modules
VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/src
KMK_BUILDTYPE= release
KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys
KMK_FLAGS= HostDrivers-src vboxdrv-mod VBoxNetFlt-src VBoxNetAdp-src
.if defined(WITH_DEBUG)
KMK_FLAGS+= BUILD_TYPE=debug
KMK_BUILDTYPE= debug
.endif
.if ${OSVERSION} < 700000
BROKEN= Does not compile on FreeBSD 6.X
.endif
.if ${ARCH} == i386
KMK_ARCH= freebsd.x86
.else
KMK_ARCH= freebsd.${ARCH}
.endif
.if !exists(${SRC_BASE}/sys/kern/bus_if.m)
IGNORE= requires kernel sources
.endif
.include <bsd.port.pre.mk>
post-patch:
@${ECHO} 'VBOX_WITH_VBOXDRV = 1' > ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_WITH_NETFLT = 1' >> ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_WITH_NETADP = 1' >> ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_WITH_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
${WRKSRC}/Config.kmk \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${PREFIX}/bin/kmk_sed|g' ${WRKSRC}/configure
pre-build:
@${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \
${WRKSRC}/env.sh
do-build:
cd ${WRKSRC} && ${SH} env.sh && cd ${WRKSRC}/src/VBox/HostDrivers && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}
cd ${VBOX_BIN} && make
do-install:
${MKDIR} ${KMODDIR}
${INSTALL_KLD} ${VBOX_BIN}/vboxdrv/vboxdrv.ko ${KMODDIR}
${INSTALL_KLD} ${VBOX_BIN}/vboxnetadp/vboxnetadp.ko ${KMODDIR}
${INSTALL_KLD} ${VBOX_BIN}/vboxnetflt/vboxnetflt.ko ${KMODDIR}
.include <bsd.port.post.mk>