From owner-svn-ports-all@freebsd.org Wed Jul 27 03:51:20 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABC1DBA6D3F; Wed, 27 Jul 2016 03:51:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DDB8169D; Wed, 27 Jul 2016 03:51:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R3pJQB013472; Wed, 27 Jul 2016 03:51:19 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R3pJFl013470; Wed, 27 Jul 2016 03:51:19 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201607270351.u6R3pJFl013470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 27 Jul 2016 03:51:19 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 03:51:20 -0000 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 + /* 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