From 093568622467e38e25f1d172ddfedcc9f898581c Mon Sep 17 00:00:00 2001 From: decke Date: Fri, 24 May 2013 09:47:12 +0000 Subject: - Install DEBUG symbols for kernel modules - Fix pkg-plist for vboxvideo.ko when build without X11 Reported by: Jimmy Olgeni --- emulators/virtualbox-ose-additions/Makefile | 16 ++++++++++++++-- emulators/virtualbox-ose-additions/pkg-plist | 4 +++- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'emulators') 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%% -- cgit