aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authordecke <decke@FreeBSD.org>2013-05-24 17:47:12 +0800
committerdecke <decke@FreeBSD.org>2013-05-24 17:47:12 +0800
commit093568622467e38e25f1d172ddfedcc9f898581c (patch)
tree69882f3162c84595144944c755b2815ad3954bce /emulators
parent4ad0f166e41b330dda999187474e5bc959a8d7b7 (diff)
downloadfreebsd-ports-gnome-093568622467e38e25f1d172ddfedcc9f898581c.tar.gz
freebsd-ports-gnome-093568622467e38e25f1d172ddfedcc9f898581c.tar.zst
freebsd-ports-gnome-093568622467e38e25f1d172ddfedcc9f898581c.zip
- Install DEBUG symbols for kernel modules
- Fix pkg-plist for vboxvideo.ko when build without X11 Reported by: Jimmy Olgeni <olgeni@freebsd.org>
Diffstat (limited to 'emulators')
-rw-r--r--emulators/virtualbox-ose-additions/Makefile16
-rw-r--r--emulators/virtualbox-ose-additions/pkg-plist4
2 files changed, 17 insertions, 3 deletions
diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile
index 21bd86e0bf86..06e22cc3dba8 100644
--- a/emulators/virtualbox-ose-additions/Makefile
+++ b/emulators/virtualbox-ose-additions/Makefile
@@ -3,7 +3,7 @@
PORTNAME= virtualbox-ose
DISTVERSION= 4.2.12
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators kld
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \
@@ -55,9 +55,15 @@ KMK_BUILDTYPE= release
KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE}
KMK_FLAGS=
+MAKE_FLAGS= SYSDIR=${SRC_BASE}/sys
+
.if ${PORT_OPTIONS:MDEBUG}
KMK_FLAGS+= BUILD_TYPE=debug
KMK_BUILDTYPE= debug
+MAKE_FLAGS+= DEBUG_FLAGS="-O1 -g"
+PLIST_SUB+= WITH_DEBUG=""
+.else
+PLIST_SUB+= WITH_DEBUG="@comment "
.endif
.if ${PORT_OPTIONS:MX11}
@@ -120,13 +126,19 @@ pre-build:
do-build:
cd ${WRKSRC} && ${SH} env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}
- cd ${VBOX_BIN}/src && make SYSDIR=${SRC_BASE}/sys
+ cd ${VBOX_BIN}/src && make ${MAKE_FLAGS}
do-install:
${MKDIR} ${KMODDIR}
${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko ${KMODDIR}
+.if ${PORT_OPTIONS:MDEBUG}
+ ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko.symbols ${KMODDIR}
+.endif
.if ${PORT_OPTIONS:MX11}
${INSTALL_KLD} ${VBOX_BIN}/vboxvideo.ko ${KMODDIR}
+.if ${PORT_OPTIONS:MDEBUG}
+ ${INSTALL_KLD} ${VBOX_BIN}/vboxvideo.ko.symbols ${KMODDIR}
+.endif
.endif
@/usr/sbin/kldxref ${KMODDIR}
diff --git a/emulators/virtualbox-ose-additions/pkg-plist b/emulators/virtualbox-ose-additions/pkg-plist
index de7dec99b2fb..2f447f58d9cd 100644
--- a/emulators/virtualbox-ose-additions/pkg-plist
+++ b/emulators/virtualbox-ose-additions/pkg-plist
@@ -24,6 +24,8 @@ sbin/VBoxService
%%X11%%@dirrmtry lib
@cwd /
%%KMODDIR%%/vboxguest.ko
-%%KMODDIR%%/vboxvideo.ko
+%%WITH_DEBUG%%%%KMODDIR%%/vboxguest.ko.symbols
+%%X11%%%%KMODDIR%%/vboxvideo.ko
+%%WITH_DEBUG%%%%X11%%%%KMODDIR%%/vboxvideo.ko
@exec /usr/sbin/kldxref /%%KMODDIR%%
@unexec /usr/sbin/kldxref /%%KMODDIR%%