diff options
author | adam <adam@pkgsrc.org> | 2015-11-19 11:46:33 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2015-11-19 11:46:33 +0000 |
commit | 0df0c661786fb1ec9c39d7e0d634217658186ef8 (patch) | |
tree | d111f2760645bd3ddf314295edca27352a83f90d /graphics/libepoxy | |
parent | 0b323577faf7704783081659c4f4166be0217f4c (diff) | |
download | pkgsrc-0df0c661786fb1ec9c39d7e0d634217658186ef8.tar.gz |
Allow building on OS X without X11
Diffstat (limited to 'graphics/libepoxy')
-rw-r--r-- | graphics/libepoxy/Makefile | 52 | ||||
-rw-r--r-- | graphics/libepoxy/distinfo | 6 | ||||
-rw-r--r-- | graphics/libepoxy/patches/patch-configure.ac | 17 | ||||
-rw-r--r-- | graphics/libepoxy/patches/patch-src_dispatch__common.h | 22 |
4 files changed, 50 insertions, 47 deletions
diff --git a/graphics/libepoxy/Makefile b/graphics/libepoxy/Makefile index 148aee36264..3de0b910678 100644 --- a/graphics/libepoxy/Makefile +++ b/graphics/libepoxy/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2015/10/01 13:50:05 tnn Exp $ +# $NetBSD: Makefile,v 1.13 2015/11/19 11:46:33 adam Exp $ DISTNAME= libepoxy-1.3.1 PKGREVISION= 2 @@ -13,40 +13,40 @@ LICENSE= mit BUILD_DEPENDS+= ${PYPKGPREFIX}-expat>=0:../../textproc/py-expat -USE_TOOLS+= pkg-config autoconf autoreconf automake -USE_LIBTOOL= yes -GNU_CONFIGURE= yes -PYTHON_FOR_BUILD_ONLY= yes - +USE_LIBTOOL= yes +USE_TOOLS+= pkg-config autoconf autoreconf automake +GNU_CONFIGURE= yes PKGCONFIG_OVERRIDE+= epoxy.pc.in - -pre-configure: - cd ${WRKSRC} && autoreconf -vif +PYTHON_FOR_BUILD_ONLY= yes .include "../../mk/bsd.prefs.mk" -PLIST_VARS+= egl -CONFIGURE_ENV+= PKGSRC_BUILD_EGL=${MESALIB_SUPPORTS_EGL} +PLIST_VARS+= egl glx -# This could be garbage collected, but it seems likely that there will -# be more glx issues, so it seems easier to leave it. -PLIST_VARS+= glx -.if ${OPSYS} != "Darwin" -PLIST.glx= yes +.if ${OPSYS} == "Darwin" && ${X11_TYPE} != "modular" +BUILD_EGL= no +BUILD_GLX= no .else -# On Darwin, we patch upstream to enable this. -PLIST.glx= yes +BUILD_EGL= ${MESALIB_SUPPORTS_EGL} +BUILD_GLX= yes +CPPFLAGS+= -DGLX_LIB=\"${PREFIX}/lib/libGL.dylib\" +PLIST.glx= yes +.include "../../graphics/MesaLib/buildlink3.mk" +.include "../../x11/libX11/buildlink3.mk" +. if !empty(MESALIB_SUPPORTS_EGL:Myes) +PLIST.egl= yes +. endif .endif -.if ${OPSYS} == "Darwin" && ${X11_TYPE} == "modular" -CPPFLAGS+= -DGLX_LIB=\"${PREFIX}/lib/libGL.1.dylib\" -.endif +SUBST_CLASSES+= gl +SUBST_STAGE.gl= pre-configure +SUBST_MESSAGE.gl= Configuring optional EGL and GLX build. +SUBST_FILES.gl= configure.ac +SUBST_VARS.gl= BUILD_EGL BUILD_GLX + +pre-configure: + cd ${WRKSRC} && autoreconf -vif .include "../../lang/python/tool.mk" .include "../../devel/xorg-util-macros/buildlink3.mk" -.include "../../graphics/MesaLib/buildlink3.mk" -.if !empty(MESALIB_SUPPORTS_EGL:Myes) && ${OPSYS} != "Darwin" -PLIST.egl= yes -.endif -.include "../../x11/libX11/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/graphics/libepoxy/distinfo b/graphics/libepoxy/distinfo index 3216a3e91a0..db99020740a 100644 --- a/graphics/libepoxy/distinfo +++ b/graphics/libepoxy/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.8 2015/11/03 21:34:07 agc Exp $ +$NetBSD: distinfo,v 1.9 2015/11/19 11:46:33 adam Exp $ SHA1 (libepoxy-1.3.1.tar.gz) = 94d98d83a50d2f607ee9986b622a48df00d5926c RMD160 (libepoxy-1.3.1.tar.gz) = 1fbdcd713b3b95d7b5fc5dd80b81c4ffcf27214f SHA512 (libepoxy-1.3.1.tar.gz) = 7d83f01bbc6d2387e4e2ec8a94b05d6e7aa6d0513821a794d60544381a18874fa75ec1dfd2585824076708e2848ff8d5dc20e184af65a7cb602e7dfd010aaf53 Size (libepoxy-1.3.1.tar.gz) = 284227 bytes -SHA1 (patch-configure.ac) = 0aa95317a5a3a3b110ff21b6e7754666831f2ca0 +SHA1 (patch-configure.ac) = 9fe6d733c8dc7d7cabbd33d9d030f8e47f804aae SHA1 (patch-src_dispatch__common.c) = 1d4bc732dc7ac558726b404d52caca237185880d -SHA1 (patch-src_dispatch__common.h) = 74e00806fea01cf9de4171707441fa1f39fe5316 +SHA1 (patch-src_dispatch__common.h) = d05bfdb4993dd454ec08df251aee9684310458d1 diff --git a/graphics/libepoxy/patches/patch-configure.ac b/graphics/libepoxy/patches/patch-configure.ac index cdb8a54eac1..6aab9fbd8d3 100644 --- a/graphics/libepoxy/patches/patch-configure.ac +++ b/graphics/libepoxy/patches/patch-configure.ac @@ -1,23 +1,16 @@ -$NetBSD: patch-configure.ac,v 1.3 2015/09/14 14:40:37 gdt Exp $ +$NetBSD: patch-configure.ac,v 1.4 2015/11/19 11:46:33 adam Exp $ Override EGL detection. - -Revert upstream's disabling of glx on Mac. See -https://github.com/anholt/libepoxy/commit/e3051481cc9f5b7b36b317aff1454ee16ea9cdb9 -for context. We require X11 anyway, and libepoxy without glx is -defective - in particular, gtk3+ fails to build. -Not yet reported upstream. +On Darwin, build GLX only for X11 configuration. --- configure.ac.orig 2015-07-15 23:46:36.000000000 +0000 +++ configure.ac -@@ -77,15 +77,16 @@ case $host_os in - AC_SUBST([LOG_COMPILER], [wine]) +@@ -78,14 +78,14 @@ case $host_os in ;; darwin*) -+ # TODO: explain why egl is forced off on Darwin build_egl=no - build_glx=no -+ build_glx=yes ++ build_glx=@BUILD_GLX@ build_wgl=no build_apple=yes has_znow=no @@ -25,7 +18,7 @@ Not yet reported upstream. ;; *) - build_egl=yes -+ build_egl=${PKGSRC_BUILD_EGL} ++ build_egl=@BUILD_EGL@ build_glx=yes build_wgl=no # On platforms with dlopen, we load everything dynamically and diff --git a/graphics/libepoxy/patches/patch-src_dispatch__common.h b/graphics/libepoxy/patches/patch-src_dispatch__common.h index 2f62f480eff..99b21bb0235 100644 --- a/graphics/libepoxy/patches/patch-src_dispatch__common.h +++ b/graphics/libepoxy/patches/patch-src_dispatch__common.h @@ -1,23 +1,33 @@ -$NetBSD: patch-src_dispatch__common.h,v 1.2 2015/09/14 14:40:37 gdt Exp $ +$NetBSD: patch-src_dispatch__common.h,v 1.3 2015/11/19 11:46:33 adam Exp $ -Override EGL detection. +Override EGL and GLX detection. --- src/dispatch_common.h.orig 2015-07-15 23:46:36.000000000 +0000 +++ src/dispatch_common.h -@@ -30,7 +30,7 @@ +@@ -22,6 +22,7 @@ + */ + + #include <stdbool.h> ++#include "config.h" + + #ifdef _WIN32 + #define PLATFORM_HAS_EGL 0 +@@ -30,7 +31,11 @@ #define EPOXY_IMPORTEXPORT __declspec(dllexport) #elif defined(__APPLE__) #define PLATFORM_HAS_EGL 0 --#define PLATFORM_HAS_GLX 0 ++#ifdef BUILD_GLX +#define PLATFORM_HAS_GLX 1 ++#else + #define PLATFORM_HAS_GLX 0 ++#endif #define PLATFORM_HAS_WGL 0 #define EPOXY_IMPORTEXPORT #elif defined(ANDROID) -@@ -39,7 +39,12 @@ +@@ -39,7 +44,11 @@ #define PLATFORM_HAS_WGL 0 #define EPOXY_IMPORTEXPORT #else -+#include "config.h" +#ifdef BUILD_EGL #define PLATFORM_HAS_EGL 1 +#else |