diff options
author | tnn <tnn@pkgsrc.org> | 2015-09-27 21:58:03 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2015-09-27 21:58:03 +0000 |
commit | a369875bd6fc7a29d80588efe21cf9c932173a92 (patch) | |
tree | 868e364773420ac3645d17dce7ca6e9972c2fc39 /graphics/MesaLib | |
parent | 65ff06cbaea5947785dd90e2a31df068a502b679 (diff) | |
download | pkgsrc-a369875bd6fc7a29d80588efe21cf9c932173a92.tar.gz |
Experimentally support building with X11_TYPE=modular on OS X. This targets
the Apple DRI platform instead of libpciaccess & libdrm. It is a step towards
packaging XQuartz and towards a future goal of migrating the platform away from
the so called "native" X11 which is no longer native by the usual definition.
Diffstat (limited to 'graphics/MesaLib')
-rw-r--r-- | graphics/MesaLib/Makefile | 13 | ||||
-rw-r--r-- | graphics/MesaLib/PLIST | 8 | ||||
-rw-r--r-- | graphics/MesaLib/buildlink3.mk | 4 | ||||
-rw-r--r-- | graphics/MesaLib/distinfo | 3 | ||||
-rw-r--r-- | graphics/MesaLib/dri.mk | 14 | ||||
-rw-r--r-- | graphics/MesaLib/files/patch-manual_fdo90311 | 111 | ||||
-rw-r--r-- | graphics/MesaLib/options.mk | 35 | ||||
-rw-r--r-- | graphics/MesaLib/patches/patch-src_glx_apple_apple__glapi.c | 24 |
8 files changed, 189 insertions, 23 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile index f7959f329f5..9415dc41bff 100644 --- a/graphics/MesaLib/Makefile +++ b/graphics/MesaLib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.111 2015/09/26 17:01:01 tnn Exp $ +# $NetBSD: Makefile,v 1.112 2015/09/27 21:58:03 tnn Exp $ DISTNAME= mesa-11.0.1 PKGNAME= ${DISTNAME:S/mesa/MesaLib/} @@ -48,7 +48,7 @@ SUBST_SED.wrapper-bug+= -e 's,libglapi_tmp_rename.la,libglapi.la,g' # Replace /etc/drirc with ${PREFIX}/etc/drirc SUBST_CLASSES+= drirc -SUBST_STAGE.drirc= post-patch +SUBST_STAGE.drirc= pre-configure SUBST_MESSAGE.drirc= Fixing hardcoded /etc/drirc references SUBST_FILES.drirc+= src/mesa/drivers/dri/common/xmlconfig.c SUBST_SED.drirc+= -e 's|/etc/|${PREFIX}/etc/|g' @@ -86,6 +86,15 @@ CPPFLAGS+= -Dexp2\(x\)=exp\(\(x\)\*M_LN2\) CPPFLAGS+= -Dexp2f\(x\)=expf\(\(x\)\*M_LN2\) .endif +# 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 ${.TARGET} +.endif + INSTALLATION_DIRS+= share/examples/MesaLib post-install: diff --git a/graphics/MesaLib/PLIST b/graphics/MesaLib/PLIST index 6b6db584043..011e80b83da 100644 --- a/graphics/MesaLib/PLIST +++ b/graphics/MesaLib/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.30 2015/09/26 08:45:02 tnn Exp $ +@comment $NetBSD: PLIST,v 1.31 2015/09/27 21:58:03 tnn Exp $ ${PLIST.dri}include/EGL/egl.h ${PLIST.dri}include/EGL/eglext.h ${PLIST.dri}include/EGL/eglextchromium.h @@ -26,7 +26,7 @@ ${PLIST.dri}include/GLES3/gl31.h ${PLIST.dri}include/GLES3/gl3ext.h ${PLIST.dri}include/GLES3/gl3platform.h ${PLIST.dri}include/KHR/khrplatform.h -${PLIST.dri}include/gbm.h +${PLIST.gbm}include/gbm.h ${PLIST.xatracker}include/xa_composite.h ${PLIST.xatracker}include/xa_context.h ${PLIST.xatracker}include/xa_tracker.h @@ -47,12 +47,12 @@ ${PLIST.dri}lib/libEGL.la lib/libGL.la ${PLIST.dri}lib/libGLESv1_CM.la ${PLIST.dri}lib/libGLESv2.la -${PLIST.dri}lib/libgbm.la +${PLIST.gbm}lib/libgbm.la lib/libglapi.la ${PLIST.xatracker}lib/libxatracker.la ${PLIST.dri}lib/pkgconfig/dri.pc ${PLIST.dri}lib/pkgconfig/egl.pc -${PLIST.dri}lib/pkgconfig/gbm.pc +${PLIST.gbm}lib/pkgconfig/gbm.pc lib/pkgconfig/gl.pc ${PLIST.dri}lib/pkgconfig/glesv1_cm.pc ${PLIST.dri}lib/pkgconfig/glesv2.pc diff --git a/graphics/MesaLib/buildlink3.mk b/graphics/MesaLib/buildlink3.mk index c1f6b47eb80..9ce2ccd1abb 100644 --- a/graphics/MesaLib/buildlink3.mk +++ b/graphics/MesaLib/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.53 2015/09/16 12:28:53 tnn Exp $ +# $NetBSD: buildlink3.mk,v 1.54 2015/09/27 21:58:03 tnn Exp $ BUILDLINK_TREE+= MesaLib @@ -20,7 +20,7 @@ GCC_REQD+= 4.2 .endif # See <http://developer.apple.com/qa/qa2007/qa1567.html>. -.if !empty(MACHINE_PLATFORM:MDarwin-[9].*-*) +.if ${X11_TYPE} == "native" && !empty(MACHINE_PLATFORM:MDarwin-[9].*-*) BUILDLINK_LDFLAGS.MesaLib+= -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib .endif diff --git a/graphics/MesaLib/distinfo b/graphics/MesaLib/distinfo index f6eb6bff801..1b05838b4e9 100644 --- a/graphics/MesaLib/distinfo +++ b/graphics/MesaLib/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.102 2015/09/26 17:01:01 tnn Exp $ +$NetBSD: distinfo,v 1.103 2015/09/27 21:58:03 tnn Exp $ SHA1 (mesa-11.0.1.tar.xz) = cd6334fcb6f9047155d22d13de70e1d78fdfef87 RMD160 (mesa-11.0.1.tar.xz) = d1c441bfbe2f38325bf88f83192052d3a0fa45b9 @@ -20,6 +20,7 @@ SHA1 (patch-src_gallium_winsys_svga_drm_vmw__screen.c) = 4b2ae565377b1a0396c8bf6 SHA1 (patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c) = e4b891e8b4ebe5b8e8c7b8c2c1dbed11b9c417df SHA1 (patch-src_gbm_main_gbm.c) = 70225ab7352f123c9efc68b6d4ff0d9675b6f9dc SHA1 (patch-src_glsl_ralloc.c) = 7443d00ff05ee1e1dcfa2b76972b55abadebcad8 +SHA1 (patch-src_glx_apple_apple__glapi.c) = df70afc24759978f954ac3a774a14e6518dde97a SHA1 (patch-src_glx_glxclient.h) = e15256851559dafb7a86e1eb7e9d6afc86de581b SHA1 (patch-src_glx_glxcurrent.c) = 713f75bcafb186c7123d19a6aae3deaed9d5fa69 SHA1 (patch-src_loader_Makefile.in) = 25cf645bc43a8157961e9ddd249936ca2053c49c diff --git a/graphics/MesaLib/dri.mk b/graphics/MesaLib/dri.mk index 1c1d0f935c3..1d06a8255cb 100644 --- a/graphics/MesaLib/dri.mk +++ b/graphics/MesaLib/dri.mk @@ -1,4 +1,4 @@ -# $NetBSD: dri.mk,v 1.14 2015/09/27 11:54:31 tnn Exp $ +# $NetBSD: dri.mk,v 1.15 2015/09/27 21:58:03 tnn Exp $ # # Currently, this is for convenience only. # @@ -14,7 +14,9 @@ CHECK_BUILTIN.MesaLib:= no . if !empty(USE_BUILTIN.MesaLib:M[Nn][Oo]) BUILDLINK_API_DEPENDS.dri2proto+= dri2proto>=2.1 BUILDLINK_API_DEPENDS.glproto+= glproto>=1.4.11 +. if ${OPSYS} != "Darwin" BUILDLINK_API_DEPENDS.libdrm+= libdrm>=2.4.38 +. endif . if ${OPSYS} == "Linux" BUILDLINK_API_DEPENDS.libdrm+= libdrm>=2.4.56 BUILDLINK_API_DEPENDS.libxcb+= libxcb>=1.9.3 @@ -24,15 +26,17 @@ BUILDLINK_API_DEPENDS.libxcb+= libxcb>=1.9.3 . include "../../x11/dri2proto/buildlink3.mk" # XXX these do not have builtin.mk . if ${X11_TYPE} == "modular" -. include "../../x11/dri3proto/buildlink3.mk" -. include "../../x11/libxshmfence/buildlink3.mk" -. include "../../x11/presentproto/buildlink3.mk" +. include "../../x11/dri3proto/buildlink3.mk" +. include "../../x11/libxshmfence/buildlink3.mk" +. include "../../x11/presentproto/buildlink3.mk" . endif . include "../../x11/glproto/buildlink3.mk" . include "../../x11/libXdamage/buildlink3.mk" . include "../../x11/libXfixes/buildlink3.mk" . include "../../x11/libXxf86vm/buildlink3.mk" -. include "../../x11/libdrm/buildlink3.mk" +. if ${OPSYS} != "Darwin" +. include "../../x11/libdrm/buildlink3.mk" +. endif . include "../../x11/xf86driproto/buildlink3.mk" . include "../../x11/xf86vidmodeproto/buildlink3.mk" . if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly" diff --git a/graphics/MesaLib/files/patch-manual_fdo90311 b/graphics/MesaLib/files/patch-manual_fdo90311 new file mode 100644 index 00000000000..158de1b7f0c --- /dev/null +++ b/graphics/MesaLib/files/patch-manual_fdo90311 @@ -0,0 +1,111 @@ +$NetBSD: patch-manual_fdo90311,v 1.1 2015/09/27 21:58:03 tnn Exp $ + +https://bugs.freedesktop.org/show_bug.cgi?id=90311 + +Regenerated with autoconf to link with C++ linker using this addition: + +libglx_la_LIBADD += $(builddir)/apple/libappleglx.la + $(top_builddir)/src/mesa/libmesa.la +nodist_EXTRA_lib@GL_LIB@_la_SOURCES = dummy.cpp + +and then dummy.cpp manuallly edited out. + +--- src/glx/Makefile.in.orig 2015-09-27 13:36:10.000000000 +0000 ++++ src/glx/Makefile.in +@@ -142,7 +142,7 @@ target_triplet = @target@ + @HAVE_APPLEDRI_TRUE@ applegl_glx.c + + @HAVE_APPLEDRI_TRUE@am__append_6 = apple +-@HAVE_APPLEDRI_TRUE@am__append_7 = $(builddir)/apple/libappleglx.la ++@HAVE_APPLEDRI_TRUE@am__append_7 = $(builddir)/apple/libappleglx.la $(top_builddir)/src/mesa/libmesa.la + subdir = src/glx + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ +@@ -201,10 +201,10 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + am__v_lt_1 = +-lib@GL_LIB@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ +- $(AM_CFLAGS) $(CFLAGS) $(lib@GL_LIB@_la_LDFLAGS) $(LDFLAGS) -o \ +- $@ ++lib@GL_LIB@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ ++ $(AM_CXXFLAGS) $(CXXFLAGS) $(lib@GL_LIB@_la_LDFLAGS) \ ++ $(LDFLAGS) -o $@ + libglx_la_DEPENDENCIES = $(top_builddir)/src/loader/libloader.la \ + $(am__append_7) + am__libglx_la_SOURCES_DIST = clientattrib.c clientinfo.c compsize.c \ +@@ -275,6 +275,24 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) + am__v_CCLD_0 = @echo " CCLD " $@; + am__v_CCLD_1 = ++CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) ++LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ ++ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ ++ $(AM_CXXFLAGS) $(CXXFLAGS) ++AM_V_CXX = $(am__v_CXX_@AM_V@) ++am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) ++am__v_CXX_0 = @echo " CXX " $@; ++am__v_CXX_1 = ++CXXLD = $(CXX) ++CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) ++am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) ++am__v_CXXLD_0 = @echo " CXXLD " $@; ++am__v_CXXLD_1 = + SOURCES = $(lib@GL_LIB@_la_SOURCES) $(libglx_la_SOURCES) + DIST_SOURCES = $(lib@GL_LIB@_la_SOURCES) $(am__libglx_la_SOURCES_DIST) + RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ +@@ -683,7 +701,7 @@ lib@GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS) + all: all-recursive + + .SUFFIXES: +-.SUFFIXES: .c .lo .o .obj ++.SUFFIXES: .c .cpp .lo .o .obj + $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/install-lib-links.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ +@@ -762,7 +780,7 @@ clean-noinstLTLIBRARIES: + } + + lib@GL_LIB@.la: $(lib@GL_LIB@_la_OBJECTS) $(lib@GL_LIB@_la_DEPENDENCIES) $(EXTRA_lib@GL_LIB@_la_DEPENDENCIES) +- $(AM_V_CCLD)$(lib@GL_LIB@_la_LINK) -rpath $(libdir) $(lib@GL_LIB@_la_OBJECTS) $(lib@GL_LIB@_la_LIBADD) $(LIBS) ++ $(AM_V_CXXLD)$(lib@GL_LIB@_la_LINK) -rpath $(libdir) $(lib@GL_LIB@_la_OBJECTS) $(lib@GL_LIB@_la_LIBADD) $(LIBS) + + libglx.la: $(libglx_la_OBJECTS) $(libglx_la_DEPENDENCIES) $(EXTRA_libglx_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libglx_la_OBJECTS) $(libglx_la_LIBADD) $(LIBS) +@@ -839,6 +857,30 @@ distclean-compile: + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + ++.cpp.o: ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ ++@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< ++ ++.cpp.obj: ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ ++@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ++ ++.cpp.lo: ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ ++@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ ++@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< ++ + mostlyclean-libtool: + -rm -f *.lo + diff --git a/graphics/MesaLib/options.mk b/graphics/MesaLib/options.mk index 85234cca94e..5a43057bb43 100644 --- a/graphics/MesaLib/options.mk +++ b/graphics/MesaLib/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.43 2015/09/26 10:45:56 tnn Exp $ +# $NetBSD: options.mk,v 1.44 2015/09/27 21:58:03 tnn Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib PKG_SUPPORTED_OPTIONS= llvm dri @@ -21,9 +21,10 @@ PKG_SUGGESTED_OPTIONS+= llvm PKG_SUGGESTED_OPTIONS+= llvm .endif -.if (${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \ +.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \ ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" || \ - ${OPSYS} == "SunOS") || ${OPSYS} == "NetBSD" + ${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD" || \ + ${OPSYS} == "Darwin" PKG_SUGGESTED_OPTIONS+= dri .endif @@ -34,7 +35,7 @@ PLIST_VARS+= swrast svga ilo i915 i965 nouveau r300 r600 radeonsi # classic DRI PLIST_VARS+= dri swrast_dri i915_dri nouveau_dri i965_dri radeon_dri r200_dri # other features -PLIST_VARS+= xatracker +PLIST_VARS+= gbm xatracker .if !empty(PKG_OPTIONS:Mdri) @@ -43,7 +44,10 @@ CONFIGURE_ARGS+= --enable-dri2 CONFIGURE_ARGS+= --enable-dri3 CFLAGS+= -DHAVE_DRI3 CONFIGURE_ARGS+= --enable-egl +.if ${OPSYS} != "Darwin" CONFIGURE_ARGS+= --enable-gbm +PLIST.gbm= yes +.endif CONFIGURE_ARGS+= --enable-gles1 CONFIGURE_ARGS+= --enable-gles2 @@ -67,20 +71,25 @@ CONFIGURE_ARGS+= --enable-sysfs PLIST.dri= yes +.if ${OPSYS} != "Darwin" BUILDLINK_DEPMETHOD.libpciaccess= full .include "../../sysutils/libpciaccess/buildlink3.mk" +.endif .include "../../graphics/MesaLib/dri.mk" DRI_DRIVERS= # -PLIST.swrast_dri= yes -DRI_DRIVERS+= swrast +GALLIUM_DRIVERS= # # Software rasterizer -GALLIUM_DRIVERS= # +PLIST.swrast_dri= yes +DRI_DRIVERS+= swrast +.if ${OPSYS} != "Darwin" PLIST.swrast= yes GALLIUM_DRIVERS+= swrast +.endif -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" +# x86 only drivers +.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && ${OPSYS} != "Darwin" # svga / VMWare driver PLIST.svga= yes GALLIUM_DRIVERS+= svga @@ -99,14 +108,17 @@ PLIST.i965_dri= yes DRI_DRIVERS+= i965 .endif +# ARM drivers .if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) # Qualcomm SnapDragon, libdrm_freedreno.pc # GALLIUM_DRIVERS+= freedreno # Broadcom VideoCore 4 # GALLIUM_DRIVERS+= vc4 +.endif -.else +# theoretically cross platform PCI drivers, but don't build on ARM +.if ${OPSYS} != "Darwin" && empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) # AMD Radeon r600 PLIST.r600= yes @@ -129,7 +141,12 @@ PLIST.nouveau_dri= yes DRI_DRIVERS+= nouveau .endif +.if ${OPSYS} == "Darwin" +CONFIGURE_ARGS+= --with-egl-platforms=x11 +.else CONFIGURE_ARGS+= --with-egl-platforms=x11,drm +.endif + CONFIGURE_ARGS+= --with-gallium-drivers=${GALLIUM_DRIVERS:ts,} CONFIGURE_ARGS+= --with-dri-drivers=${DRI_DRIVERS:ts,} diff --git a/graphics/MesaLib/patches/patch-src_glx_apple_apple__glapi.c b/graphics/MesaLib/patches/patch-src_glx_apple_apple__glapi.c new file mode 100644 index 00000000000..6e538e67aa5 --- /dev/null +++ b/graphics/MesaLib/patches/patch-src_glx_apple_apple__glapi.c @@ -0,0 +1,24 @@ +$NetBSD: patch-src_glx_apple_apple__glapi.c,v 1.1 2015/09/27 21:58:03 tnn Exp $ + +https://bugs.freedesktop.org/show_bug.cgi?id=90311 +See also hacks.mk. + +--- src/glx/apple/apple_glapi.c.orig 2015-08-07 17:36:03.000000000 +0000 ++++ src/glx/apple/apple_glapi.c +@@ -39,6 +39,7 @@ + #include <GL/gl.h> + + #include "main/glheader.h" ++#include "main/remap.h" + #include "glapi.h" + #include "glapitable.h" + #include "main/dispatch.h" +@@ -54,6 +55,8 @@ static void _apple_glapi_create_table(vo + if (__applegl_api) + return; + ++ _mesa_init_remap_table(); ++ + __ogl_framework_api = _glapi_create_table_from_handle(apple_cgl_get_dl_handle(), "gl"); + assert(__ogl_framework_api); + |