pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/libepoxy Fix hardcoded EGL detection to build...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d1180c28462c
branches:  trunk
changeset: 358673:d1180c28462c
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sat Feb 18 02:37:11 2017 +0000

description:
Fix hardcoded EGL detection to build this on NetBSD/amd64 current with
native X.org.

diffstat:

 graphics/libepoxy/Makefile                             |  18 +---
 graphics/libepoxy/distinfo                             |   5 +-
 graphics/libepoxy/patches/patch-configure.ac           |  58 +++++++++++++++++-
 graphics/libepoxy/patches/patch-src_dispatch__common.h |  13 ++++
 4 files changed, 79 insertions(+), 15 deletions(-)

diffs (151 lines):

diff -r d6bd11152711 -r d1180c28462c graphics/libepoxy/Makefile
--- a/graphics/libepoxy/Makefile        Fri Feb 17 23:45:48 2017 +0000
+++ b/graphics/libepoxy/Makefile        Sat Feb 18 02:37:11 2017 +0000
@@ -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 @@
 .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 -r d6bd11152711 -r d1180c28462c graphics/libepoxy/distinfo
--- a/graphics/libepoxy/distinfo        Fri Feb 17 23:45:48 2017 +0000
+++ b/graphics/libepoxy/distinfo        Sat Feb 18 02:37:11 2017 +0000
@@ -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 -r d6bd11152711 -r d1180c28462c graphics/libepoxy/patches/patch-configure.ac
--- a/graphics/libepoxy/patches/patch-configure.ac      Fri Feb 17 23:45:48 2017 +0000
+++ b/graphics/libepoxy/patches/patch-configure.ac      Sat Feb 18 02:37:11 2017 +0000
@@ -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 @@
              [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 -r d6bd11152711 -r d1180c28462c graphics/libepoxy/patches/patch-src_dispatch__common.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libepoxy/patches/patch-src_dispatch__common.h    Sat Feb 18 02:37:11 2017 +0000
@@ -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



Home | Main Index | Thread Index | Old Index