Tobias Nygren <tnn%NetBSD.org@localhost> writes: > On Mon, 14 Sep 2015 07:42:32 -0400 > Greg Troxel <gdt%ir.bbn.com@localhost> wrote: > >> take a different approach, and just put #ifndef DARWIN around the >> include of glx in the libepoxy file, and let gtk3 think it doesn't >> have it. > > I'm afraid this is going to require a lot of patching. It's not just a > matter of header files. GTK3 has GL integration which is not > optionalized. I think the best way to go is actually to put the GLX > support for Darwin back into libepoxy. Someone from macos-pkg-people@ > needs to undertake this. > > We could revert the update. But I don't really want to hold it back just > because X11 on Darwin is dying a slow death. Updates in the final days before a freeze that cause fallout get extra nominated for reverting :-) But I don't think we have to do that in this case. I'm not sure this is really about X11 on Darwin. I realize apple is deprecating it, but add-on X seems alive and well. It's not 100% clear to me whether glx is showing up from that or from something from xcode instead. It doesn't seem unreasonable of pkgsrc to require functioning X when it's reasonably easy for people to get it. > Since GTK3 is the only > libepoxy consumer on Darwin I propose we import graphics/libepoxy12 > and use that if it has been confirmed to solve the problem. I reverted upstream's disabling of glx, and that allows gtk3 to build and package. It is basically going back mac/glx-wise to how things were before the update, and the rest of the 1.2->1.3.1 changes seem totally fine. What do you think about this patch? Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/graphics/libepoxy/Makefile,v retrieving revision 1.7 diff -u -p -r1.7 Makefile --- Makefile 13 Sep 2015 11:38:32 -0000 1.7 +++ Makefile 14 Sep 2015 12:58:17 -0000 @@ -1,6 +1,7 @@ # $NetBSD: Makefile,v 1.7 2015/09/13 11:38:32 tron Exp $ DISTNAME= libepoxy-1.3.1 +PKGEVISION= 1 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_GITHUB:=anholt/} GITHUB_TAG= v${PKGVERSION_NOREV} @@ -32,9 +33,14 @@ CONFIGURE_ENV+= PKGSRC_BUILD_EGL=yes CONFIGURE_ENV+= PKGSRC_BUILD_EGL=no .endif +# 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 +.else +# On Darwin, we patch upstream to enable this. +PLIST.glx= yes .endif .include "../../lang/python/tool.mk" Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/graphics/libepoxy/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 13 Sep 2015 04:44:48 -0000 1.4 +++ distinfo 14 Sep 2015 12:58:17 -0000 @@ -3,6 +3,6 @@ $NetBSD: distinfo,v 1.4 2015/09/13 04:44 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) = bc1870f74ed0cab31df7d23f9673b65d21c873f6 +SHA1 (patch-configure.ac) = 0aa95317a5a3a3b110ff21b6e7754666831f2ca0 SHA1 (patch-src_dispatch__common.c) = e69b5e5b6f68a95f10ecbbdb8b1c9ab6695fe24c -SHA1 (patch-src_dispatch__common.h) = a95512892d4f0172366b19246602f00db6c03dc6 +SHA1 (patch-src_dispatch__common.h) = 74e00806fea01cf9de4171707441fa1f39fe5316 Index: patches/patch-configure.ac =================================================================== RCS file: /cvsroot/pkgsrc/graphics/libepoxy/patches/patch-configure.ac,v retrieving revision 1.2 diff -u -p -r1.2 patch-configure.ac --- patches/patch-configure.ac 13 Sep 2015 04:44:49 -0000 1.2 +++ patches/patch-configure.ac 14 Sep 2015 12:58:17 -0000 @@ -2,9 +2,25 @@ $NetBSD: patch-configure.ac,v 1.2 2015/0 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. + --- configure.ac.orig 2015-07-15 23:46:36.000000000 +0000 +++ configure.ac -@@ -85,7 +85,7 @@ case $host_os in +@@ -77,15 +77,16 @@ case $host_os in + AC_SUBST([LOG_COMPILER], [wine]) + ;; + darwin*) ++ # TODO: explain why egl is forced off on Darwin + build_egl=no +- build_glx=no ++ build_glx=yes + build_wgl=no + build_apple=yes + has_znow=no EPOXY_LINK_LIBS="" ;; *) Index: patches/patch-src_dispatch__common.h =================================================================== RCS file: /cvsroot/pkgsrc/graphics/libepoxy/patches/patch-src_dispatch__common.h,v retrieving revision 1.1 diff -u -p -r1.1 patch-src_dispatch__common.h --- patches/patch-src_dispatch__common.h 13 Jun 2015 19:13:10 -0000 1.1 +++ patches/patch-src_dispatch__common.h 14 Sep 2015 12:58:17 -0000 @@ -2,9 +2,18 @@ $NetBSD: patch-src_dispatch__common.h,v Override EGL detection. ---- src/dispatch_common.h.orig 2014-05-14 00:22:08.000000000 +0000 +--- src/dispatch_common.h.orig 2015-07-15 23:46:36.000000000 +0000 +++ src/dispatch_common.h -@@ -34,7 +34,12 @@ +@@ -30,7 +30,7 @@ + #define EPOXY_IMPORTEXPORT __declspec(dllexport) + #elif defined(__APPLE__) + #define PLATFORM_HAS_EGL 0 +-#define PLATFORM_HAS_GLX 0 ++#define PLATFORM_HAS_GLX 1 + #define PLATFORM_HAS_WGL 0 + #define EPOXY_IMPORTEXPORT + #elif defined(ANDROID) +@@ -39,7 +39,12 @@ #define PLATFORM_HAS_WGL 0 #define EPOXY_IMPORTEXPORT #else
Attachment:
pgpHmARAlpuhs.pgp
Description: PGP signature