pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib18 MesaLib18: fix build on Mac OS X



details:   https://anonhg.NetBSD.org/pkgsrc/rev/48b27a03a583
branches:  trunk
changeset: 328354:48b27a03a583
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Jan 19 21:54:03 2019 +0000

description:
MesaLib18: fix build on Mac OS X

Tested with x11/modular-xorg-xquartz on Mojave.

diffstat:

 graphics/MesaLib18/Makefile                                       |  10 +--
 graphics/MesaLib18/PLIST                                          |  16 ++--
 graphics/MesaLib18/distinfo                                       |   5 +-
 graphics/MesaLib18/files/patch-manual_fdo90311                    |  15 ----
 graphics/MesaLib18/options.mk                                     |  11 ++-
 graphics/MesaLib18/patches/patch-src_glx_Makefile.am              |  34 ++++++++++
 graphics/MesaLib18/patches/patch-src_glx_dri__common.h            |  17 +++++
 graphics/MesaLib18/patches/patch-src_mesa_drivers_x11_Makefile.am |  15 ++++
 8 files changed, 86 insertions(+), 37 deletions(-)

diffs (221 lines):

diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/Makefile
--- a/graphics/MesaLib18/Makefile       Sat Jan 19 21:36:21 2019 +0000
+++ b/graphics/MesaLib18/Makefile       Sat Jan 19 21:54:03 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2019/01/19 17:47:51 tnn Exp $
+# $NetBSD: Makefile,v 1.13 2019/01/19 21:54:03 tnn Exp $
 
 DISTNAME=      mesa-18.3.2
 PKGNAME=       ${DISTNAME:S/mesa/MesaLib/}
@@ -88,15 +88,7 @@
 
 pre-configure:
        cd ${WRKSRC} && autoreconf -vif
-# Manual patch for FDO bug 90311. Don't apply if not on Darwin as there could
-# be side effects.
-.if ${OPSYS} == "Darwin"
-pre-configure: ${WRKDIR}/.manual_patch_done
-${WRKDIR}/.manual_patch_done:
-       cd ${WRKSRC} && ${TOOLS_PATCH} -z .manual -p0 < ${FILESDIR}/patch-manual_fdo90311
        touch ${WRKSRC}/src/glx/dummy.cpp
-       touch ${.TARGET}
-.endif
 
 DRIRC_DIR=             ${PKG_SYSCONFDIR}/drirc.d
 EGDIR=                 ${PREFIX}/share/examples/mesa
diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/PLIST
--- a/graphics/MesaLib18/PLIST  Sat Jan 19 21:36:21 2019 +0000
+++ b/graphics/MesaLib18/PLIST  Sat Jan 19 21:54:03 2019 +0000
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.4 2019/01/19 17:47:51 tnn Exp $
-${PLIST.dri}include/EGL/egl.h
-${PLIST.dri}include/EGL/eglext.h
-${PLIST.dri}include/EGL/eglextchromium.h
-${PLIST.dri}include/EGL/eglmesaext.h
-${PLIST.dri}include/EGL/eglplatform.h
+@comment $NetBSD: PLIST,v 1.5 2019/01/19 21:54:03 tnn Exp $
+${PLIST.egl}include/EGL/egl.h
+${PLIST.egl}include/EGL/eglext.h
+${PLIST.egl}include/EGL/eglextchromium.h
+${PLIST.egl}include/EGL/eglmesaext.h
+${PLIST.egl}include/EGL/eglplatform.h
 include/GL/gl.h
 include/GL/gl_mangle.h
 include/GL/glcorearb.h
@@ -49,7 +49,7 @@
 ${PLIST.swrast_dri}lib/dri/swrast_dri.so
 ${PLIST.vc4}lib/dri/vc4_dri.so
 ${PLIST.svga}lib/dri/vmwgfx_dri.so
-${PLIST.dri}lib/libEGL.la
+${PLIST.egl}lib/libEGL.la
 lib/libGL.la
 ${PLIST.glesv1}lib/libGLESv1_CM.la
 ${PLIST.glesv2}lib/libGLESv2.la
@@ -67,7 +67,7 @@
 ${PLIST.wayland}lib/libwayland-egl.la
 ${PLIST.xatracker}lib/libxatracker.la
 ${PLIST.dri}lib/pkgconfig/dri.pc
-${PLIST.dri}lib/pkgconfig/egl.pc
+${PLIST.egl}lib/pkgconfig/egl.pc
 ${PLIST.gbm}lib/pkgconfig/gbm.pc
 ${PLIST.osmesa}lib/pkgconfig/osmesa.pc
 lib/pkgconfig/gl.pc
diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/distinfo
--- a/graphics/MesaLib18/distinfo       Sat Jan 19 21:36:21 2019 +0000
+++ b/graphics/MesaLib18/distinfo       Sat Jan 19 21:54:03 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2019/01/19 18:26:30 tnn Exp $
+$NetBSD: distinfo,v 1.11 2019/01/19 21:54:03 tnn Exp $
 
 SHA1 (mesa-18.3.2.tar.xz) = 8775d7bfac7e07141ac4299888d426d5550949f7
 RMD160 (mesa-18.3.2.tar.xz) = d3662f72a39d009adb21a70bd7b49c28960c0d5c
@@ -26,7 +26,9 @@
 SHA1 (patch-src_gallium_state__trackers_clover_llvm_metadata.hpp) = c97d38098ea03658bc193a50e445b87f1c020839
 SHA1 (patch-src_gallium_state__trackers_clover_util_range.hpp) = cdc78067986c1b92818472c4201c58ef1b42c4f4
 SHA1 (patch-src_gbm_Makefile.am) = 5f3107afbf64b97f7d21ce427cecc4fb78974db3
+SHA1 (patch-src_glx_Makefile.am) = 315d35777550ae7a7ba814b6d74d0c3cefd04630
 SHA1 (patch-src_glx_apple_apple__glapi.c) = c4eea8dabf74eb03d22da4eb834b18ae3384c63b
+SHA1 (patch-src_glx_dri__common.h) = 0274877f8c65a4bb729536a897df4704897a4c6e
 SHA1 (patch-src_glx_dri__glx.c) = 8fd48776e9953b18bd17ba130d90ae2935e67242
 SHA1 (patch-src_glx_glxclient.h) = f0358179ae397bc8677597b0ccb9a471f40f15de
 SHA1 (patch-src_glx_glxcurrent.c) = 8b8e949eded13491c5865601253c6e7d4b06e228
@@ -51,6 +53,7 @@
 SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 795b17970e95347222514bacc0701aa86fa1ff02
 SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = 5b940f9a56c694ffaf8a4383c3a2eae25cfd35a6
 SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = 3106f350e590f62c8bd29cd85f24f977639dccdb
+SHA1 (patch-src_mesa_drivers_x11_Makefile.am) = 172a8da11a620edce790f64338a0390cd1e93188
 SHA1 (patch-src_mesa_main_context.c) = 74226013b56ad6c9678f1970458538b35967678f
 SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e
 SHA1 (patch-src_mesa_main_macros.h) = c5dceaa8dc02a58e5b2273d82e3fe1cc12e327d3
diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/files/patch-manual_fdo90311
--- a/graphics/MesaLib18/files/patch-manual_fdo90311    Sat Jan 19 21:36:21 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-manual_fdo90311,v 1.2 2019/01/10 22:30:11 tnn Exp $
-
-https://bugs.freedesktop.org/show_bug.cgi?id=90311
-
---- src/glx/Makefile.am.orig   2018-12-11 21:13:57.000000000 +0000
-+++ src/glx/Makefile.am
-@@ -136,6 +136,8 @@ libglx_la_SOURCES += \
- 
- SUBDIRS += apple
- libglx_la_LIBADD += $(builddir)/apple/libappleglx.la
-+libglx_la_LIBADD += $(top_builddir)/src/mesa/libmesa.la
-+nodist_EXTRA_lib@GL_LIB@_la_SOURCES = dummy.cpp
- endif
- 
- if HAVE_WINDOWSDRI
diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/options.mk
--- a/graphics/MesaLib18/options.mk     Sat Jan 19 21:36:21 2019 +0000
+++ b/graphics/MesaLib18/options.mk     Sat Jan 19 21:54:03 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.9 2019/01/19 18:45:28 tnn Exp $
+# $NetBSD: options.mk,v 1.10 2019/01/19 21:54:03 tnn Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.MesaLib
 PKG_SUPPORTED_OPTIONS=         llvm dri
@@ -54,7 +54,7 @@
 # classic DRI
 PLIST_VARS+=   dri swrast_dri nouveau_dri radeon_dri r200
 # other features
-PLIST_VARS+=   gbm vaapi vdpau wayland xatracker
+PLIST_VARS+=   egl gbm vaapi vdpau wayland xatracker
 PLIST_VARS+=   osmesa xvmc
 PLIST_VARS+=   glesv1 glesv2
 
@@ -64,11 +64,14 @@
 # Having DRI3 and egl compiled in by default doesn't hurt, the X server
 # will only use it if it is supported at run time.
 CONFIGURE_ARGS+=       --enable-dri3
+.if ${OPSYS} != "Darwin"
 CONFIGURE_ARGS+=       --enable-egl
-
-.if ${OPSYS} != "Darwin"
 CONFIGURE_ARGS+=       --enable-gbm
+PLIST.egl=             yes
 PLIST.gbm=             yes
+.else
+CONFIGURE_ARGS+=       --disable-egl
+CONFIGURE_ARGS+=       --disable-gbm
 .endif
 
 .if !empty(PKG_OPTIONS:Mosmesa)
diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/patches/patch-src_glx_Makefile.am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib18/patches/patch-src_glx_Makefile.am      Sat Jan 19 21:54:03 2019 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_glx_Makefile.am,v 1.1 2019/01/19 21:54:03 tnn Exp $
+
+- FDO bug 90311
+- We don't need libmesautil.la here. Those symbols seem to already be
+  included in libmesa.la.
+
+--- src/glx/Makefile.am.orig   2019-01-17 11:26:23.000000000 +0000
++++ src/glx/Makefile.am
+@@ -89,10 +89,16 @@ libglx_la_SOURCES = \
+       singlepix.c \
+       vertarr.c
+ 
++if HAVE_APPLEDRI
++libglx_la_LIBADD = \
++      $(top_builddir)/src/loader/libloader.la \
++      $(top_builddir)/src/util/libxmlconfig.la
++else
+ libglx_la_LIBADD = \
+       $(top_builddir)/src/loader/libloader.la \
+       $(top_builddir)/src/util/libmesautil.la \
+       $(top_builddir)/src/util/libxmlconfig.la
++endif
+ 
+ if HAVE_DRISW
+ libglx_la_SOURCES += \
+@@ -136,6 +142,8 @@ libglx_la_SOURCES += \
+ 
+ SUBDIRS += apple
+ libglx_la_LIBADD += $(builddir)/apple/libappleglx.la
++libglx_la_LIBADD += $(top_builddir)/src/mesa/libmesa.la
++libglx_la_SOURCES += dummy.cpp
+ endif
+ 
+ if HAVE_WINDOWSDRI
diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/patches/patch-src_glx_dri__common.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib18/patches/patch-src_glx_dri__common.h    Sat Jan 19 21:54:03 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_glx_dri__common.h,v 1.1 2019/01/19 21:54:03 tnn Exp $
+
+Fix error on OSX.
+
+--- src/glx/dri_common.h.orig  2019-01-17 11:26:23.000000000 +0000
++++ src/glx/dri_common.h
+@@ -55,8 +55,10 @@ extern struct glx_config *driConvertConf
+ 
+ extern void driDestroyConfigs(const __DRIconfig **configs);
+ 
++#if !defined(GLX_USE_APPLEGL)
+ extern __GLXDRIdrawable *
+ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable);
++#endif
+ 
+ extern void
+ driReleaseDrawables(struct glx_context *gc);
diff -r 66f52785b2ae -r 48b27a03a583 graphics/MesaLib18/patches/patch-src_mesa_drivers_x11_Makefile.am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib18/patches/patch-src_mesa_drivers_x11_Makefile.am Sat Jan 19 21:54:03 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_mesa_drivers_x11_Makefile.am,v 1.1 2019/01/19 21:54:03 tnn Exp $
+
+We don't need libmesautil.la here. Those symbols seem to already be
+included in libmesa.la.
+
+--- src/mesa/drivers/x11/Makefile.am.orig      2019-01-17 11:26:23.000000000 +0000
++++ src/mesa/drivers/x11/Makefile.am
+@@ -68,7 +68,6 @@ GL_PATCH = 0
+ lib@GL_LIB@_la_LIBADD = \
+       $(top_builddir)/src/mesa/libmesa.la \
+       $(top_builddir)/src/mapi/glapi/libglapi.la \
+-      $(top_builddir)/src/util/libmesautil.la \
+       $(SHARED_GLAPI_LIB) \
+       $(GL_LIB_DEPS)
+ 



Home | Main Index | Thread Index | Old Index