Deal with hardcoded libGL.1.dylib location. Fixes gtk3 apps on OSX.

This commit is contained in:
tnn 2015-10-01 13:50:05 +00:00
parent e9c19f5f10
commit 3bf02ac501
3 changed files with 18 additions and 8 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.11 2015/10/01 09:36:57 tnn Exp $
# $NetBSD: Makefile,v 1.12 2015/10/01 13:50:05 tnn Exp $
DISTNAME= libepoxy-1.3.1
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_GITHUB:=anholt/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@ -38,6 +38,10 @@ PLIST.glx= yes
PLIST.glx= yes
.endif
.if ${OPSYS} == "Darwin" && ${X11_TYPE} == "modular"
CPPFLAGS+= -DGLX_LIB=\"${PREFIX}/lib/libGL.1.dylib\"
.endif
.include "../../lang/python/tool.mk"
.include "../../devel/xorg-util-macros/buildlink3.mk"
.include "../../graphics/MesaLib/buildlink3.mk"

View file

@ -1,8 +1,8 @@
$NetBSD: distinfo,v 1.6 2015/09/24 22:51:29 tnn Exp $
$NetBSD: distinfo,v 1.7 2015/10/01 13:50:05 tnn Exp $
SHA1 (libepoxy-1.3.1.tar.gz) = 94d98d83a50d2f607ee9986b622a48df00d5926c
RMD160 (libepoxy-1.3.1.tar.gz) = 1fbdcd713b3b95d7b5fc5dd80b81c4ffcf27214f
Size (libepoxy-1.3.1.tar.gz) = 284227 bytes
SHA1 (patch-configure.ac) = 0aa95317a5a3a3b110ff21b6e7754666831f2ca0
SHA1 (patch-src_dispatch__common.c) = 51fdcd76c1a4c002b4ca59e5f92387115a5d4496
SHA1 (patch-src_dispatch__common.c) = 1d4bc732dc7ac558726b404d52caca237185880d
SHA1 (patch-src_dispatch__common.h) = 74e00806fea01cf9de4171707441fa1f39fe5316

View file

@ -1,11 +1,17 @@
$NetBSD: patch-src_dispatch__common.c,v 1.3 2015/09/24 22:51:29 tnn Exp $
$NetBSD: patch-src_dispatch__common.c,v 1.4 2015/10/01 13:50:05 tnn Exp $
Native X has /usr/X11R7/lib/libGL.so.2.
Deal with hardcoded libGL locations and versions.
Function must return a value if errx not declared with attr noreturn.
--- src/dispatch_common.c.orig 2015-07-15 23:46:36.000000000 +0000
+++ src/dispatch_common.c
@@ -107,7 +107,7 @@
@@ -103,11 +103,13 @@
#include "dispatch_common.h"
#ifdef __APPLE__
+#ifndef GLX_LIB
#define GLX_LIB "/opt/X11/lib/libGL.1.dylib"
+#endif
#elif defined(ANDROID)
#define GLX_LIB "libGLESv2.so"
#else
@ -14,7 +20,7 @@ Function must return a value if errx not declared with attr noreturn.
#endif
#ifdef ANDROID
@@ -672,6 +672,7 @@ epoxy_get_proc_address(const char *name)
@@ -672,6 +674,7 @@ epoxy_get_proc_address(const char *name)
#endif
}
errx(1, "Couldn't find current GLX or EGL context.\n");