summaryrefslogtreecommitdiff
path: root/graphics/libepoxy
diff options
context:
space:
mode:
authortnn <tnn>2015-06-13 19:13:10 +0000
committertnn <tnn>2015-06-13 19:13:10 +0000
commitfa2b19b4f4182271abaa2efd61218ce9d4e888aa (patch)
treeceb175aa7aa6b2b48fa086f464622410720ebc4f /graphics/libepoxy
parenta4529bb8243d75f6ece3c00818fefe8a2c737671 (diff)
downloadpkgsrc-fa2b19b4f4182271abaa2efd61218ce9d4e888aa.tar.gz
Fix build with native / old X11 (build tested on netbsd-6)
Apparently this will be required by GTK3 soon.
Diffstat (limited to 'graphics/libepoxy')
-rw-r--r--graphics/libepoxy/Makefile13
-rw-r--r--graphics/libepoxy/PLIST6
-rw-r--r--graphics/libepoxy/distinfo4
-rw-r--r--graphics/libepoxy/patches/patch-configure.ac33
-rw-r--r--graphics/libepoxy/patches/patch-src_dispatch__common.h19
5 files changed, 64 insertions, 11 deletions
diff --git a/graphics/libepoxy/Makefile b/graphics/libepoxy/Makefile
index 9be45ed4edb..3d40686ddae 100644
--- a/graphics/libepoxy/Makefile
+++ b/graphics/libepoxy/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/04/25 14:23:15 tnn Exp $
+# $NetBSD: Makefile,v 1.4 2015/06/13 19:13:10 tnn Exp $
DISTNAME= libepoxy-1.2
PKGREVISION= 1
@@ -25,13 +25,12 @@ pre-configure:
.include "../../mk/bsd.prefs.mk"
-.if ${X11_TYPE} == "modular"
-# We should enforce this, but the dependency cannot
-# currently be satisfied by pkgsrc, which might break pbulk(?)
-# We'll settle for failing in the build phase for now.
-#BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=10
+PLIST_VARS+= egl
+.if ${X11_TYPE} == "modular" || exists(${X11BASE}/include/EGL/egl.h)
+PLIST.egl= yes
+CONFIGURE_ENV+= PKGSRC_BUILD_EGL=yes
.else
-PKG_FAIL_REASON+= "This package is currently for modular X.org only"
+CONFIGURE_ENV+= PKGSRC_BUILD_EGL=no
.endif
.include "../../lang/python/tool.mk"
diff --git a/graphics/libepoxy/PLIST b/graphics/libepoxy/PLIST
index 750c44f263f..a69341716e9 100644
--- a/graphics/libepoxy/PLIST
+++ b/graphics/libepoxy/PLIST
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 2015/04/03 08:48:57 tnn Exp $
-include/epoxy/egl.h
-include/epoxy/egl_generated.h
+@comment $NetBSD: PLIST,v 1.2 2015/06/13 19:13:10 tnn Exp $
+${PLIST.egl}include/epoxy/egl.h
+${PLIST.egl}include/epoxy/egl_generated.h
include/epoxy/gl.h
include/epoxy/gl_generated.h
include/epoxy/glx.h
diff --git a/graphics/libepoxy/distinfo b/graphics/libepoxy/distinfo
index cfe8b0ba763..759c20db609 100644
--- a/graphics/libepoxy/distinfo
+++ b/graphics/libepoxy/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.1 2015/04/03 08:48:57 tnn Exp $
+$NetBSD: distinfo,v 1.2 2015/06/13 19:13:10 tnn Exp $
SHA1 (libepoxy-1.2.tar.gz) = e700520711b9e4fa07c286aa36e431d8ad4133f5
RMD160 (libepoxy-1.2.tar.gz) = fc5c11eacb437b437c4d6b185a79dc1d6a4467df
Size (libepoxy-1.2.tar.gz) = 267110 bytes
+SHA1 (patch-configure.ac) = 6651693923d0384806a400e54c9dcec8553f06c4
+SHA1 (patch-src_dispatch__common.h) = a95512892d4f0172366b19246602f00db6c03dc6
diff --git a/graphics/libepoxy/patches/patch-configure.ac b/graphics/libepoxy/patches/patch-configure.ac
new file mode 100644
index 00000000000..d61cbe1d9e1
--- /dev/null
+++ b/graphics/libepoxy/patches/patch-configure.ac
@@ -0,0 +1,33 @@
+$NetBSD: patch-configure.ac,v 1.1 2015/06/13 19:13:10 tnn Exp $
+
+Override EGL detection.
+
+--- configure.ac.orig 2014-05-14 00:22:08.000000000 +0000
++++ configure.ac
+@@ -62,7 +62,7 @@ has_znow=yes
+
+ case $host_os in
+ mingw*)
+- build_egl=no
++ build_egl=${PKGSRC_BUILD_EGL}
+ build_glx=no
+ build_wgl=yes
+ # On windows, the DLL has to have all of its functions
+@@ -77,7 +77,7 @@ case $host_os in
+ AC_SUBST([LOG_COMPILER], [wine])
+ ;;
+ darwin*)
+- build_egl=no
++ build_egl=${PKGSRC_BUILD_EGL}
+ build_glx=yes
+ build_wgl=no
+ build_apple=yes
+@@ -85,7 +85,7 @@ case $host_os in
+ EPOXY_LINK_LIBS=""
+ ;;
+ *)
+- build_egl=yes
++ build_egl=${PKGSRC_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
new file mode 100644
index 00000000000..24a6d9c6bf8
--- /dev/null
+++ b/graphics/libepoxy/patches/patch-src_dispatch__common.h
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_dispatch__common.h,v 1.1 2015/06/13 19:13:10 tnn Exp $
+
+Override EGL detection.
+
+--- src/dispatch_common.h.orig 2014-05-14 00:22:08.000000000 +0000
++++ src/dispatch_common.h
+@@ -34,7 +34,12 @@
+ #define PLATFORM_HAS_WGL 0
+ #define EPOXY_IMPORTEXPORT
+ #else
++#include "config.h"
++#ifdef BUILD_EGL
+ #define PLATFORM_HAS_EGL 1
++#else
++#define PLATFORM_HAS_EGL 0
++#endif
+ #define PLATFORM_HAS_GLX 1
+ #define PLATFORM_HAS_WGL 0
+ #define EPOXY_IMPORTEXPORT