svn commit: r419152 - in head/emulators: virtualbox-ose-additions virtualbox-ose-additions/files virtualbox-ose/files
Jung-uk Kim
jkim at FreeBSD.org
Tue Jul 26 21:49:14 UTC 2016
Author: jkim
Date: Tue Jul 26 21:49:12 2016
New Revision: 419152
URL: https://svnweb.freebsd.org/changeset/ports/419152
Log:
Remove fake DRM and install OpenGL wrappers.
Added:
head/emulators/virtualbox-ose-additions/files/pkg-post-install.in (contents, props changed)
head/emulators/virtualbox-ose-additions/files/pkg-pre-deinstall.in (contents, props changed)
head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_stub.h (contents, props changed)
Deleted:
head/emulators/virtualbox-ose/files/extrapatch-src-VBox-Additions-freebsd-drm-Makefile
head/emulators/virtualbox-ose/files/extrapatch-src-VBox-Additions-freebsd-drm-Makefile.kmk
head/emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_freebsd_Makefile.kmk
head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-freebsd-drm-vboxvideo_drm.c
Modified:
head/emulators/virtualbox-ose-additions/Makefile
head/emulators/virtualbox-ose-additions/files/vboxguest.in
head/emulators/virtualbox-ose-additions/pkg-plist
head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-crOpenGL-Makefile.kmk
head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_Makefile.kmk
Modified: head/emulators/virtualbox-ose-additions/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-additions/Makefile Tue Jul 26 19:47:17 2016 (r419151)
+++ head/emulators/virtualbox-ose-additions/Makefile Tue Jul 26 21:49:12 2016 (r419152)
@@ -76,6 +76,9 @@ MAKE_ARGS+= DEBUG_FLAGS="-O1 -g"
.endif
.if ${PORT_OPTIONS:MOPENGL}
+PKGPOSTINSTALL= ${WRKDIR}/pkg-post-install
+PKGPREDEINSTALL= ${WRKDIR}/pkg-pre-deinstall
+SUB_FILES= pkg-post-install pkg-pre-deinstall
USE_XORG= xcomposite xdamage xfixes
USE_GL= gl
VBOX_LIBS= VBoxEGL.so \
@@ -86,8 +89,6 @@ VBOX_LIBS= VBoxEGL.so \
VBoxOGLfeedbackspu.so \
VBoxOGLpackspu.so \
VBoxOGLpassthroughspu.so
-.else
-EXTRA_PATCHES= ${PATCHDIR}/extrapatch-src_VBox_Additions_freebsd_Makefile.kmk
.endif
.if ${PORT_OPTIONS:MX11}
@@ -107,8 +108,6 @@ KMK_ARCH= freebsd.x86
KMK_ARCH= freebsd.${ARCH}
.endif
-SUB_LIST+= VBOX_KMODS="${VBOX_KMODS}"
-
.include <bsd.port.pre.mk>
.if ${COMPILER_TYPE} == clang
@@ -120,18 +119,6 @@ EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-s
.endif
.endif
-.if ${OSVERSION} >= 1001514
-EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-src-VBox-Additions-freebsd-drm-Makefile
-EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-src-VBox-Additions-freebsd-drm-Makefile.kmk
-.endif
-
-VBOX_KMODS= vboxguest:pci/vboxguest
-# DRI support was removed from the X.Org vboxvideo driver:
-# https://www.virtualbox.org/changeset/59194
-#.if ${PORT_OPTIONS:MOPENGL}
-#VBOX_KMODS+= vboxvideo:vgapci/vboxvideo
-#.endif
-
pre-everything::
.if ${ARCH} == "amd64"
.if !exists(/usr/lib32/libc.so)
@@ -180,12 +167,6 @@ do-install:
.if ${PORT_OPTIONS:MDEBUG}
${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko.symbols ${STAGEDIR}${KMODDIR}
.endif
-.if ${PORT_OPTIONS:MOPENGL}
- ${INSTALL_KLD} ${VBOX_BIN}/vboxvideo.ko ${STAGEDIR}${KMODDIR}
-.if ${PORT_OPTIONS:MDEBUG}
- ${INSTALL_KLD} ${VBOX_BIN}/vboxvideo.ko.symbols ${STAGEDIR}${KMODDIR}
-.endif
-.endif
${INSTALL_LIB} ${VBOX_BIN}/pam_vbox.so ${STAGEDIR}${PREFIX}/lib
${INSTALL_PROGRAM} ${VBOX_SBINS:S|^|${VBOX_BIN}/|} \
@@ -218,10 +199,6 @@ do-install:
.if ${PORT_OPTIONS:MOPENGL}
${INSTALL_DATA} ${VBOX_LIBS:S|^|${VBOX_BIN}/|} \
${STAGEDIR}${PREFIX}/lib/
-
- ${MKDIR} ${STAGEDIR}${PREFIX}/lib/dri
- ${LN} -sf ${PREFIX}/lib/VBoxOGL.so \
- ${STAGEDIR}${PREFIX}/lib/dri/vboxvideo_dri.so
.endif
.include <bsd.port.post.mk>
Added: head/emulators/virtualbox-ose-additions/files/pkg-post-install.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose-additions/files/pkg-post-install.in Tue Jul 26 21:49:12 2016 (r419152)
@@ -0,0 +1,6 @@
+/bin/rm -f %%PREFIX%%/lib/libEGL.so*
+/bin/ln -f %%PREFIX%%/lib/VBoxEGL.so %%PREFIX%%/lib/libEGL.so
+/bin/ln -f %%PREFIX%%/lib/VBoxEGL.so %%PREFIX%%/lib/libEGL.so.1
+/bin/rm -f %%PREFIX%%/lib/libGL.so*
+/bin/ln -f %%PREFIX%%/lib/VBoxOGL.so %%PREFIX%%/lib/libGL.so
+/bin/ln -f %%PREFIX%%/lib/VBoxOGL.so %%PREFIX%%/lib/libGL.so.1
Added: head/emulators/virtualbox-ose-additions/files/pkg-pre-deinstall.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose-additions/files/pkg-pre-deinstall.in Tue Jul 26 21:49:12 2016 (r419152)
@@ -0,0 +1,18 @@
+/bin/rm -f %%PREFIX%%/lib/libEGL.so*
+if [ -f %%PREFIX%%/lib/.nvidia/libEGL.so.1 ]; then
+ /bin/ln -f %%PREFIX%%/lib/.nvidia/libEGL.so.1 %%PREFIX%%/lib/libEGL.so
+ /bin/ln -f %%PREFIX%%/lib/.nvidia/libEGL.so.1 %%PREFIX%%/lib/libEGL.so.1
+elif [ -f %%PREFIX%%/lib/.mesa/libEGL.so.1.0.0 ]; then
+ /bin/ln -f %%PREFIX%%/lib/.mesa/libEGL.so.1.0.0 %%PREFIX%%/lib/libEGL.so
+ /bin/ln -f %%PREFIX%%/lib/.mesa/libEGL.so.1.0.0 %%PREFIX%%/lib/libEGL.so.1
+ /bin/ln -f %%PREFIX%%/lib/.mesa/libEGL.so.1.0.0 %%PREFIX%%/lib/libEGL.so.1.0.0
+fi
+/bin/rm -f %%PREFIX%%/lib/libGL.so*
+if [ -f %%PREFIX%%/lib/.nvidia/libGL.so.1 ]; then
+ /bin/ln -f %%PREFIX%%/lib/.nvidia/libGL.so.1 %%PREFIX%%/lib/libGL.so
+ /bin/ln -f %%PREFIX%%/lib/.nvidia/libGL.so.1 %%PREFIX%%/lib/libGL.so.1
+elif [ -f %%PREFIX%%/lib/.mesa/libGL.so.1.2.0 ]; then
+ /bin/ln -f %%PREFIX%%/lib/.mesa/libGL.so.1.2.0 %%PREFIX%%/lib/libGL.so
+ /bin/ln -f %%PREFIX%%/lib/.mesa/libGL.so.1.2.0 %%PREFIX%%/lib/libGL.so.1
+ /bin/ln -f %%PREFIX%%/lib/.mesa/libGL.so.1.2.0 %%PREFIX%%/lib/libGL.so.1.2.0
+fi
Modified: head/emulators/virtualbox-ose-additions/files/vboxguest.in
==============================================================================
--- head/emulators/virtualbox-ose-additions/files/vboxguest.in Tue Jul 26 19:47:17 2016 (r419151)
+++ head/emulators/virtualbox-ose-additions/files/vboxguest.in Tue Jul 26 21:49:12 2016 (r419152)
@@ -22,7 +22,7 @@ rcvar=vboxguest_enable
start_cmd="vboxguest_start"
stop_cmd="vboxguest_stop"
-vboxguest_modules="%%VBOX_KMODS%%"
+vboxguest_modules="vboxguest:pci/vboxguest"
vboxguest_start()
{
Modified: head/emulators/virtualbox-ose-additions/pkg-plist
==============================================================================
--- head/emulators/virtualbox-ose-additions/pkg-plist Tue Jul 26 19:47:17 2016 (r419151)
+++ head/emulators/virtualbox-ose-additions/pkg-plist Tue Jul 26 21:49:12 2016 (r419152)
@@ -10,7 +10,6 @@
%%OPENGL%%lib/VBoxOGLpackspu.so
%%OPENGL%%lib/VBoxOGLpassthroughspu.so
lib/pam_vbox.so
-%%OPENGL%%lib/dri/vboxvideo_dri.so
%%X11%%lib/xorg/modules/drivers/vboxvideo_drv.so
%%X11%%lib/xorg/modules/input/vboxmouse_drv.so
sbin/VBoxControl
@@ -18,5 +17,3 @@ sbin/VBoxService
%%X11%%share/autostart/vboxclient.desktop
/%%KMODDIR%%/vboxguest.ko
%%DEBUG%%/%%KMODDIR%%/vboxguest.ko.symbols
-%%OPENGL%%/%%KMODDIR%%/vboxvideo.ko
-%%DEBUG%%%%OPENGL%%/%%KMODDIR%%/vboxvideo.ko.symbols
Modified: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-crOpenGL-Makefile.kmk
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-crOpenGL-Makefile.kmk Tue Jul 26 19:47:17 2016 (r419151)
+++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-crOpenGL-Makefile.kmk Tue Jul 26 21:49:12 2016 (r419152)
@@ -1,20 +1,22 @@
---- src/VBox/Additions/common/crOpenGL/Makefile.kmk.orig 2014-11-21 10:16:35.000000000 -0500
-+++ src/VBox/Additions/common/crOpenGL/Makefile.kmk 2014-12-19 16:55:22.000000000 -0500
-@@ -172,7 +172,7 @@
- VBoxOGL_SOURCES.solaris += \
- $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
- VBoxOGL_SOURCES.freebsd += \
-- $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c
-+ $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.asm
- endif
- endif
+--- src/VBox/Additions/common/crOpenGL/Makefile.kmk.orig 2016-07-18 11:50:43 UTC
++++ src/VBox/Additions/common/crOpenGL/Makefile.kmk
+@@ -47,9 +47,7 @@ endif
+ if1of ($(KBUILD_TARGET), linux solaris freebsd)
+ #VBoxOGL_DRI = 1
+ DLLS += VBoxEGL
+- ifn1of ($(KBUILD_TARGET),linux solaris) # No DRI on Solaris yet
+- VBoxOGL_FAKEDRI = 1
+- endif
++ #VBoxOGL_FAKEDRI = 1
-@@ -190,10 +190,12 @@
- $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm
+ # Only Solaris right now needs C stubs because I can't figure out how to
+ # generate the GOT based relocation ASM yet.
+@@ -184,10 +182,12 @@ VBoxOGL_CLEAN.linux += \
+ $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c
VBoxOGL_CLEAN.solaris += \
$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
+VBoxOGL_CLEAN.freebsd += \
-+ $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.asm
++ $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c
VBoxOGL_CLEAN.win = \
$(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \
$(VBOX_PATH_CROGL_GENFILES)/cropengl.def
@@ -23,7 +25,7 @@
ifdef VBoxOGL_DRI
VBoxOGL_CLEAN += \
$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \
-@@ -206,6 +208,8 @@
+@@ -200,6 +200,8 @@ if1of ($(KBUILD_TARGET), linux solaris)
$(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm
VBoxOGL_CLEAN.solaris += \
$(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm
@@ -32,7 +34,16 @@
endif
endif
VBoxOGL_LIBS = \
-@@ -235,7 +239,7 @@
+@@ -229,6 +231,8 @@ if1of ($(KBUILD_TARGET), linux solaris f
+ else
+ VBoxOGL_SONAME.linux = libGL.so.1
+ VBoxOGL_LDFLAGS.linux += -Wl,-e,LibMain
++ VBoxOGL_SONAME.freebsd = libGL.so.1
++ VBoxOGL_LDFLAGS.freebsd += -Wl,-e,LibMain
+ endif
+ endif
+ ifdef VBOX_WITH_CRHGSMI
+@@ -237,7 +241,7 @@ endif
ifdef VBOX_WITH_WDDM
VBoxOGL_DEFS.win += VBOX_WITH_WDDM
endif
@@ -41,22 +52,10 @@
VBoxOGL_LDFLAGS += -Wl,-z,nodelete
endif
ifdef VBOX_WITH_WDDM
-@@ -317,8 +321,8 @@
- $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
-
- else ifeq ($(KBUILD_TARGET),freebsd)
--$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \
-- $(PATH_SUB_CURRENT)/FreeBSD_exports.py \
-+$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.asm: \
-+ $(PATH_SUB_CURRENT)/FreeBSD_i386_exports.py \
- $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
- | $$(dir $$@)
- $(call MSG_GENERATE,python,$@,$<)
-@@ -387,7 +391,16 @@
+@@ -395,6 +399,16 @@ $(VBOX_PATH_CROGL_GENFILES)/solaris_expo
$(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm: $(PATH_SUB_CURRENT)/SunOS_i386_glxapi_exports.py | $$(dir $$@)
$(call MSG_GENERATE,python,$@,$<)
$(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $<
--
+ else ifeq ($(KBUILD_TARGET),freebsd)
+$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm: \
+ $(PATH_SUB_CURRENT)/FreeBSD_i386_exports_dri.py \
@@ -67,6 +66,14 @@
+$(VBOX_PATH_CROGL_GENFILES)/freebsd_glxapi_exports.asm: $(PATH_SUB_CURRENT)/FreeBSD_i386_glxapi_exports.py | $$(dir $$@)
+ $(call MSG_GENERATE,python,$@,$<)
+ $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $<
+
else
$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \
- $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \
+@@ -712,6 +726,7 @@ VBoxEGL_SOURCES = egl.c
+ VBoxEGL_INCS = $(VBOX_PATH_X11_ROOT)/mesa-11.0.7
+ VBoxEGL_LIBS = $(VBOX_LIB_OGL) $(VBOX_LIB_IPRT_GUEST_R3_SHARED)
+ VBoxEGL_SONAME.linux = libEGL.so.1
++VBoxEGL_SONAME.freebsd = libEGL.so.1
+
+ include $(FILE_KBUILD_SUB_FOOTER)
+
Added: head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_stub.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_stub.h Tue Jul 26 21:49:12 2016 (r419152)
@@ -0,0 +1,11 @@
+--- src/VBox/Additions/common/crOpenGL/stub.h.orig 2016-07-18 11:50:44 UTC
++++ src/VBox/Additions/common/crOpenGL/stub.h
+@@ -47,7 +47,7 @@
+ #include <X11/extensions/Xfixes.h>
+ #endif
+
+-#if defined(WINDOWS) || defined(Linux) || defined(SunOS)
++#if defined(WINDOWS) || defined(Linux) || defined(FreeBSD) || defined(SunOS)
+ # define CR_NEWWINTRACK
+ #endif
+
Modified: head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_Makefile.kmk
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_Makefile.kmk Tue Jul 26 19:47:17 2016 (r419151)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_Makefile.kmk Tue Jul 26 21:49:12 2016 (r419152)
@@ -1,5 +1,14 @@
--- src/VBox/Additions/freebsd/Makefile.kmk.orig 2016-07-18 11:50:44 UTC
+++ src/VBox/Additions/freebsd/Makefile.kmk
+@@ -24,7 +24,7 @@ endif
+
+ # Include sub-makefiles.
+ #include $(PATH_SUB_CURRENT)/vboxvfs/Makefile.kmk
+-include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
++#include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
+
+ #
+ # Globals
@@ -67,6 +67,7 @@ VBOX_FBSD_ADD_STRIP_BIN = \
vboxvideo_drv_15.so \
vboxvideo_drv_16.so \
@@ -8,3 +17,13 @@
VBoxOGLarrayspu.so \
VBoxOGLcrutil.so \
VBoxOGLerrorspu.so \
+@@ -76,8 +77,7 @@ VBOX_FBSD_ADD_STRIP_BIN = \
+ VBoxOGL.so
+
+ VBOX_FBSD_ADD_MODULES = \
+- vboxguest \
+- vboxvideo_drm
++ vboxguest
+
+ #
+ # All the bin files that go into the archives.
More information about the svn-ports-all
mailing list