summaryrefslogtreecommitdiff
path: root/graphics/libepoxy
diff options
context:
space:
mode:
authorryoon <ryoon>2017-02-18 02:37:11 +0000
committerryoon <ryoon>2017-02-18 02:37:11 +0000
commitd84aec43e6542cbb0b643654beee376729e6afd1 (patch)
treefea14e40e5cd7947af48611b38616cd0f8e71f56 /graphics/libepoxy
parentcbf137ce1409aa857c74ba1fa65e61c2f0351892 (diff)
downloadpkgsrc-d84aec43e6542cbb0b643654beee376729e6afd1.tar.gz
Fix hardcoded EGL detection to build this on NetBSD/amd64 current with
native X.org.
Diffstat (limited to 'graphics/libepoxy')
-rw-r--r--graphics/libepoxy/Makefile18
-rw-r--r--graphics/libepoxy/distinfo5
-rw-r--r--graphics/libepoxy/patches/patch-configure.ac58
-rw-r--r--graphics/libepoxy/patches/patch-src_dispatch__common.h13
4 files changed, 79 insertions, 15 deletions
diff --git a/graphics/libepoxy/Makefile b/graphics/libepoxy/Makefile
index 11e9e7bcff0..30df96c2523 100644
--- a/graphics/libepoxy/Makefile
+++ b/graphics/libepoxy/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2017/02/17 15:17:08 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2017/02/18 02:37:11 ryoon Exp $
DISTNAME= libepoxy-1.4
CATEGORIES= graphics
@@ -29,35 +29,29 @@ PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mx11)
-BUILD_GLX= yes
+CONFIGURE_ARGS+= --enable-glx=yes
PLIST.glx= yes
.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
. if ${OPSYS} == "Darwin"
-BUILD_EGL= no
+CONFIGURE_ARGS+= --enable-egl=yes
. if ${X11_TYPE} == "modular"
CPPFLAGS+= -DGLX_LIB=\"${PREFIX}/lib/libGL.dylib\"
. endif
. else # ! Darwin
-BUILD_EGL= ${MESALIB_SUPPORTS_EGL}
+CONFIGURE_ARGS+= --enable-egl=${MESALIB_SUPPORTS_EGL}
. if !empty(MESALIB_SUPPORTS_EGL:Myes)
PLIST.egl= yes
. endif
. endif
.else # ! x11
-BUILD_GLX= no
-BUILD_EGL= no
+CONFIGURE_ARGS+= --enable-glx=no
+CONFIGURE_ARGS+= --enable-egl=no
. if !(${OPSYS} == "Darwin" && ${X11_TYPE} == "native")
PKG_FAIL_REASON+= "The x11 option must be enabled on this platform/configuration."
. endif
.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
diff --git a/graphics/libepoxy/distinfo b/graphics/libepoxy/distinfo
index 49af2398987..c1108cebb0d 100644
--- a/graphics/libepoxy/distinfo
+++ b/graphics/libepoxy/distinfo
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.10 2017/02/17 15:17:09 wiz Exp $
+$NetBSD: distinfo,v 1.11 2017/02/18 02:37:11 ryoon Exp $
SHA1 (libepoxy-1.4.tar.gz) = 55b26174f4b202bfce3cd07d0546efa60cf0c943
RMD160 (libepoxy-1.4.tar.gz) = 172501a9019a85658e97e25028157b5aa7a97597
SHA512 (libepoxy-1.4.tar.gz) = b354d64c9d3192a32ba1715a1ac89066315a4b4580acfbbeb7c097864bd68698421a7dd0f6fcef00a852df09c4a9e504d70e9b949f0e45e0ad9f1b195c7bb7fe
Size (libepoxy-1.4.tar.gz) = 307969 bytes
-SHA1 (patch-configure.ac) = 80ade0c4d7ab7f350d5b4c48c2edba017e712330
+SHA1 (patch-configure.ac) = c4ce423b058975e7322ea782554ecedd449e2249
SHA1 (patch-src_dispatch__common.c) = 8ab5351f3ef67cc36aacfc43e7f61e6a7bcc179a
+SHA1 (patch-src_dispatch__common.h) = 3b9b96595d637d5f8b24c7f8b404c6fca6ba7686
diff --git a/graphics/libepoxy/patches/patch-configure.ac b/graphics/libepoxy/patches/patch-configure.ac
index 6c30b4801b0..acd24cdfa0f 100644
--- a/graphics/libepoxy/patches/patch-configure.ac
+++ b/graphics/libepoxy/patches/patch-configure.ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure.ac,v 1.5 2017/02/17 15:17:09 wiz Exp $
+$NetBSD: patch-configure.ac,v 1.6 2017/02/18 02:37:11 ryoon Exp $
Override EGL detection.
On Darwin, build GLX only for X11 configuration.
@@ -14,3 +14,59 @@ On Darwin, build GLX only for X11 configuration.
[android*], [build_glx=no],
[build_glx=yes])
],
+@@ -87,11 +87,38 @@ AS_CASE([$enable_glx],
+ [AC_MSG_ERROR([Invalid value "$enable_glx" for option "--enable-glx"])]
+ ])
+
++AC_ARG_ENABLE([egl],
++ [AC_HELP_STRING([--enable-egl=@<:@auto,yes,no@:>@], [Enable EGL support @<:@default=auto@:>@])],
++ [enable_egl=$enableval],
++ [enable_egl=auto])
++
++# EGL can be used on different platforms, so we expose a
++# configure time switch to enable or disable it; in case
++# the "auto" default value is set, we only enable EGL
++# support on Linux and Unix
++AS_CASE([$enable_egl],
++ [auto], [
++ AS_CASE([$host_os],
++ [mingw*], [build_egl=no],
++ [darwin*], [build_egl=no],
++ [build_egl=yes])
++ ],
++
++ [yes], [
++ build_egl=yes
++ ],
++
++ [no], [
++ build_egl=no
++ ],
++
++ [AC_MSG_ERROR([Invalid value "$enable_egl" for option "--enable-egl"])]
++])
++
+ # The remaining platform specific API for GL/GLES are enabled
+ # depending on the platform we're building for
+ AS_CASE([$host_os],
+ [mingw*], [
+- build_egl=no
+ build_wgl=yes
+ has_znow=yes
+ # On windows, the DLL has to have all of its functions
+@@ -107,7 +134,6 @@ AS_CASE([$host_os],
+ ],
+
+ [darwin*], [
+- build_egl=no
+ build_wgl=no
+ build_apple=yes
+ has_znow=no
+@@ -115,7 +141,6 @@ AS_CASE([$host_os],
+ ],
+
+ [
+- build_egl=yes
+ build_wgl=no
+ has_znow=yes
+ # 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..194d4c45c5e
--- /dev/null
+++ b/graphics/libepoxy/patches/patch-src_dispatch__common.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_dispatch__common.h,v 1.5 2017/02/18 02:37:11 ryoon Exp $
+
+--- src/dispatch_common.h.orig 2017-02-06 16:00:20.000000000 +0000
++++ src/dispatch_common.h
+@@ -36,7 +36,7 @@
+ #define PLATFORM_HAS_GLX 0
+ #define PLATFORM_HAS_WGL 0
+ #else
+-#define PLATFORM_HAS_EGL 1
++#define PLATFORM_HAS_EGL ENABLE_EGL
+ #define PLATFORM_HAS_GLX ENABLE_GLX
+ #define PLATFORM_HAS_WGL 0
+ #endif