Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2016 03:51:19 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r419160 - in head/emulators: virtualbox-ose-additions virtualbox-ose/files
Message-ID:  <201607270351.u6R3pJFl013470@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Jul 27 03:51:19 2016
New Revision: 419160
URL: https://svnweb.freebsd.org/changeset/ports/419160

Log:
  Allow X server to load GLX extension.

Added:
  head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_load.c   (contents, props changed)
Modified:
  head/emulators/virtualbox-ose-additions/Makefile

Modified: head/emulators/virtualbox-ose-additions/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-additions/Makefile	Wed Jul 27 03:39:06 2016	(r419159)
+++ head/emulators/virtualbox-ose-additions/Makefile	Wed Jul 27 03:51:19 2016	(r419160)
@@ -147,7 +147,7 @@ post-patch:
 		${WRKSRC}/configure \
 		${WRKSRC}/kBuild/units/qt4.kmk \
 		${WRKSRC}/kBuild/sdks/LIBSDL.kmk \
-		${WRKSRC}/src/VBox/Additions/common/crOpenGL/fakedri_drv.c \
+		${WRKSRC}/src/VBox/Additions/common/crOpenGL/load.c \
 		${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

Added: head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_load.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_load.c	Wed Jul 27 03:51:19 2016	(r419160)
@@ -0,0 +1,34 @@
+--- src/VBox/Additions/common/crOpenGL/load.c.orig	2016-07-18 11:50:44 UTC
++++ src/VBox/Additions/common/crOpenGL/load.c
+@@ -1123,7 +1123,7 @@ stubInit(void)
+     return bRc;
+ }
+ 
+-#if defined(Linux) && !defined(VBOXOGL_FAKEDRI)
++#if (defined(Linux) || defined(FreeBSD)) && !defined(VBOXOGL_FAKEDRI)
+ # include <dlfcn.h>
+ /* We only support being used by GLX clients.  If the X server GLX extension
+  * tries to use our OpenGL library it will fail, as it is written specifically
+@@ -1136,7 +1136,7 @@ stubInit(void)
+  * can do, better for GLX to fail than the whole X server).  To keep things as
+  * simple and fail-safe as possible, we use a fixed path to the system GL
+  * library. */
+-#ifndef RTLD_DEEPBIND
++#if defined(Linux) && !defined(RTLD_DEEPBIND)
+ # define RTLD_DEEPBIND 0x8
+ #endif
+ 
+@@ -1146,8 +1146,13 @@ void __attribute__ ((constructor)) check
+ 
+     if (!pszDisplay || !*pszDisplay)
+     {
++#ifdef Linux
+         dlopen("/var/lib/VBoxGuestAdditions/lib/system/libGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
+         dlopen("/var/lib/VBoxGuestAdditions/lib/system/libEGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
++#else
++        dlopen("/usr/local/lib/.mesa/libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
++        dlopen("/usr/local/lib/.mesa/libEGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
++#endif
+     }
+ }
+ #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607270351.u6R3pJFl013470>