pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/MesaLib
Module Name: pkgsrc
Committed By: nia
Date: Fri Aug 30 13:00:56 UTC 2019
Modified Files:
pkgsrc/graphics/MesaLib: Makefile PLIST buildlink3.mk options.mk
Removed Files:
pkgsrc/graphics/MesaLib: dri.mk
Log Message:
MesaLib: various changes to how this is built
- Try to appease the Darwin build.
- Simplify and reduce the number of options to make testing easier.
- Silence lots of pkglint warnings.
- Enable the surfaceless platform as recommended by Mesa.
- Switch to gallium swrast as recommended by Mesa.
- Switch to gallium osmesa as recommended by Mesa.
- Support building without X11.
todo:
- glvnd support (needs testing to figure out which platforms it builds on)
- make AMD drivers optional on platforms like aarch64
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 pkgsrc/graphics/MesaLib/Makefile
cvs rdiff -u -r1.41 -r1.42 pkgsrc/graphics/MesaLib/PLIST
cvs rdiff -u -r1.58 -r1.59 pkgsrc/graphics/MesaLib/buildlink3.mk
cvs rdiff -u -r1.18 -r0 pkgsrc/graphics/MesaLib/dri.mk
cvs rdiff -u -r1.70 -r1.71 pkgsrc/graphics/MesaLib/options.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/MesaLib/Makefile
diff -u pkgsrc/graphics/MesaLib/Makefile:1.157 pkgsrc/graphics/MesaLib/Makefile:1.158
--- pkgsrc/graphics/MesaLib/Makefile:1.157 Wed Aug 28 09:09:15 2019
+++ pkgsrc/graphics/MesaLib/Makefile Fri Aug 30 13:00:56 2019
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.157 2019/08/28 09:09:15 nia Exp $
+# $NetBSD: Makefile,v 1.158 2019/08/30 13:00:56 nia Exp $
DISTNAME= mesa-19.1.5
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
-CATEGORIES= graphics x11
+PKGREVISION= 1
+CATEGORIES= graphics
MASTER_SITES= https://mesa.freedesktop.org/archive/
EXTRACT_SUFX= .tar.xz
@@ -37,15 +38,115 @@ CFLAGS.SunOS+= -D__EXTENSIONS__ -D_POSI
CXXFLAGS.SunOS+= -Drestrict=__restrict__
LDFLAGS.SunOS+= -lsocket -lnsl
+# Some of these get appended in options.mk.
+DRI_DRIVERS= #
+GALLIUM_DRIVERS= swrast
+VULKAN_DRIVERS= #
+MESA_PLATFORMS= surfaceless
+
.include "../../mk/bsd.prefs.mk"
.include "../../mk/compiler.mk"
.include "options.mk"
+PLIST_SUBST+= GLVER="1.2.0"
+
+# classic DRI drivers
+PLIST_VARS+= i915 i965 r100 r200 nouveau_dri
+
+# Gallium drivers
+PLIST_VARS+= r300 svga nouveau vc4
+
+# other features
+PLIST_VARS+= egl gbm vaapi xatracker
+
+.if ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
+.include "../../x11/libdrm/buildlink3.mk"
+MESA_PLATFORMS+= drm
+MESON_ARGS+= -Ddri3=true
+MESON_ARGS+= -Dgallium-xa=true
+PLIST.xatracker= yes
+. if ${OPSYS} != "SunOS"
+MESON_ARGS+= -Degl=true
+MESON_ARGS+= -Dgbm=true
+PLIST.egl= yes
+PLIST.gbm= yes
+. else
+MESON_ARGS+= -Degl=false
+MESON_ARGS+= -Dgbm=false
+. endif
+. include "../../multimedia/libva/available.mk"
+. if ${VAAPI_AVAILABLE} == "yes"
+MESON_ARGS+= -Dgallium-va=true
+PLIST.vaapi= yes
+. include "../../multimedia/libva/buildlink3.mk"
+. else
+MESON_ARGS+= -Dgallium-va=false
+. endif
+. if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)
+# ARM Mali Utgard
+#GALLIUM_DRIVERS+= lima
+#PLIST.lima= yes
+# ARM Mali Midgard, Bifrost
+#GALLIUM_DRIVERS+= panfrost
+#PLIST.panfrost= yes
+# Vivante GCxxx
+#GALLIUM_DRIVERS+= etnaviv
+#PLIST.etnaviv= yes
+# Qualcomm Snapdragon
+#GALLIUM_DRIVERS+= freedreno
+#PLIST.freedreno= yes
+# Broadcom VideoCore 4
+GALLIUM_DRIVERS+= vc4
+PLIST.vc4= yes
+. endif
+. if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+GALLIUM_DRIVERS+= svga
+DRI_DRIVERS+= i915 i965
+PLIST.svga= yes
+PLIST.i915= yes
+PLIST.i965= yes
+. endif
+# FreeBSD lacks nouveau support (there are official binaries from Nvidia)
+. if ${OPSYS} != "FreeBSD"
+PLIST.nouveau= yes
+PLIST.nouveau_dri= yes
+GALLIUM_DRIVERS+= nouveau
+DRI_DRIVERS+= nouveau
+. endif
+. if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
+# qemu Linux guest driver
+# XXX test this
+#GALLIUM_DRIVERS+= virgl
+#PLIST.virgl= yes
+. endif
+# theoretically cross platform PCI drivers
+. if empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) && \
+ empty(MACHINE_PLATFORM:MNetBSD-*-mipsel)
+DRI_DRIVERS+= r100 r200
+GALLIUM_DRIVERS+= r300
+PLIST.r100= yes
+PLIST.r200= yes
+PLIST.r300= yes
+. endif
+.else
+MESON_ARGS+= -Degl=false
+MESON_ARGS+= -Dgbm=false
+.endif # ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
+
+MESON_ARGS+= -Dgallium-drivers=${GALLIUM_DRIVERS:ts,}
+MESON_ARGS+= -Ddri-drivers=${DRI_DRIVERS:ts,}
+MESON_ARGS+= -Dvulkan-drivers=${VULKAN_DRIVERS:ts,}
+MESON_ARGS+= -Dplatforms=${MESA_PLATFORMS:ts,}
+
.if ${MACHINE_ARCH} == "i386"
MESON_ARGS+= -Dglx-read-only-text=true
.endif
+MESON_ARGS+= -Dgles1=true
+MESON_ARGS+= -Dgles2=true
+MESON_ARGS+= -Dosmesa=gallium
MESON_ARGS+= -Dshared-glapi=true
+MESON_ARGS+= -Dgallium-xvmc=false
CPPFLAGS+= -DHAVE_NOATEXIT
CPPFLAGS+= -DSYSCONFDIR=${PKG_SYSCONFDIR}
@@ -57,18 +158,22 @@ CFLAGS.NetBSD+= -Dalloca=__builtin_allo
CXXFLAGS.NetBSD+= -Dalloca=__builtin_alloca
PYTHON_FOR_BUILD_ONLY= yes
-BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
+
+TOOL_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
+
# needed to build vulkan support
-BUILD_DEPENDS+= ${PYPKGPREFIX}-cElementTree-[0-9]*:../../textproc/py-cElementTree
+TOOL_DEPENDS+= ${PYPKGPREFIX}-cElementTree-[0-9]*:../../textproc/py-cElementTree
# LLVM detection
TOOL_DEPENDS+= ${PYPKGPREFIX}-meson>=0.51.1nb3:../../devel/py-meson
-EGDIR= ${PREFIX}/share/examples/mesa
+EGDIR= ${PREFIX}/share/examples/mesa
+
+OWN_DIRS= ${PKG_SYSCONFDIR}/drirc.d
+CONF_FILES+= ${EGDIR}/00-mesa-defaults.conf \
+ ${PKG_SYSCONFDIR}/drirc.d/00-mesa-defaults.conf
+
INSTALLATION_DIRS+= ${EGDIR}
-OWN_DIRS= ${PKG_SYSCONFDIR}/drirc.d
-CONF_FILES+= ${EGDIR}/00-mesa-defaults.conf \
- ${PKG_SYSCONFDIR}/drirc.d/00-mesa-defaults.conf
pre-configure:
touch ${WRKSRC}/src/glx/apple_dummy.cpp
@@ -79,8 +184,4 @@ post-install:
.include "../../devel/py-meson/build.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
-.include "../../x11/libXrandr/buildlink3.mk"
-.include "../../x11/libX11/buildlink3.mk"
-.include "../../x11/libXext/buildlink3.mk"
-.include "../../x11/libxcb/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/graphics/MesaLib/PLIST
diff -u pkgsrc/graphics/MesaLib/PLIST:1.41 pkgsrc/graphics/MesaLib/PLIST:1.42
--- pkgsrc/graphics/MesaLib/PLIST:1.41 Mon Aug 26 14:01:27 2019
+++ pkgsrc/graphics/MesaLib/PLIST Fri Aug 30 13:00:56 2019
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.41 2019/08/26 14:01:27 nia Exp $
+@comment $NetBSD: PLIST,v 1.42 2019/08/30 13:00:56 nia Exp $
${PLIST.egl}include/EGL/egl.h
${PLIST.egl}include/EGL/eglext.h
${PLIST.egl}include/EGL/eglextchromium.h
@@ -8,76 +8,59 @@ include/GL/gl.h
include/GL/gl_mangle.h
include/GL/glcorearb.h
include/GL/glext.h
-include/GL/glx.h
-include/GL/glx_mangle.h
-include/GL/glxext.h
-${PLIST.dri}include/GL/internal/dri_interface.h
-${PLIST.osmesa}include/GL/osmesa.h
-${PLIST.glesv1}include/GLES/egl.h
-${PLIST.glesv1}include/GLES/gl.h
-${PLIST.glesv1}include/GLES/glext.h
-${PLIST.glesv1}include/GLES/glplatform.h
-${PLIST.glesv2}include/GLES2/gl2.h
-${PLIST.glesv2}include/GLES2/gl2ext.h
-${PLIST.glesv2}include/GLES2/gl2platform.h
-${PLIST.glesv2}include/GLES3/gl3.h
-${PLIST.glesv2}include/GLES3/gl31.h
-${PLIST.glesv2}include/GLES3/gl32.h
-${PLIST.glesv2}include/GLES3/gl3ext.h
-${PLIST.glesv2}include/GLES3/gl3platform.h
+${PLIST.glx}include/GL/glx.h
+${PLIST.glx}include/GL/glx_mangle.h
+${PLIST.glx}include/GL/glxext.h
+include/GL/internal/dri_interface.h
+include/GL/osmesa.h
+include/GLES/egl.h
+include/GLES/gl.h
+include/GLES/glext.h
+include/GLES/glplatform.h
+include/GLES2/gl2.h
+include/GLES2/gl2ext.h
+include/GLES2/gl2platform.h
+include/GLES3/gl3.h
+include/GLES3/gl31.h
+include/GLES3/gl32.h
+include/GLES3/gl3ext.h
+include/GLES3/gl3platform.h
include/KHR/khrplatform.h
${PLIST.gbm}include/gbm.h
-${PLIST.vulkan}include/vulkan/vulkan_intel.h
${PLIST.xatracker}include/xa_composite.h
${PLIST.xatracker}include/xa_context.h
${PLIST.xatracker}include/xa_tracker.h
-@comment ${PLIST.vaapi}lib/dri/gallium_drv_video.la
-@comment ${PLIST.vaapi}lib/dri/gallium_drv_video.so
${PLIST.i915}lib/dri/i915_dri.so
${PLIST.i965}lib/dri/i965_dri.so
-@comment ${PLIST.ilo}lib/dri/ilo_dri.so
-${PLIST.freedreno}lib/dri/kgsl_dri.so
-${PLIST.swrast}lib/dri/kms_swrast_dri.so
-${PLIST.freedreno}lib/dri/msm_dri.so
+lib/dri/kms_swrast_dri.so
${PLIST.nouveau}lib/dri/nouveau_dri.so
-@comment ${PLIST.vdpau}lib/dri/nouveau_drv_video.la
${PLIST.nouveau}${PLIST.vaapi}lib/dri/nouveau_drv_video.so
${PLIST.nouveau_dri}lib/dri/nouveau_vieux_dri.so
-@comment ${PLIST.vdpau}lib/dri/radeonsi_drv_video.la
${PLIST.r200}lib/dri/r200_dri.so
${PLIST.r300}lib/dri/r300_dri.so
${PLIST.r600}lib/dri/r600_dri.so
-@comment ${PLIST.vdpau}lib/dri/r600_drv_video.la
-${PLIST.vaapi}lib/dri/r600_drv_video.so
+${PLIST.r600}${PLIST.vaapi}lib/dri/r600_drv_video.so
${PLIST.r100}lib/dri/radeon_dri.so
${PLIST.radeonsi}lib/dri/radeonsi_dri.so
-${PLIST.vaapi}lib/dri/radeonsi_drv_video.so
-${PLIST.swrast_dri}lib/dri/swrast_dri.so
+${PLIST.r600}${PLIST.vaapi}lib/dri/radeonsi_drv_video.so
+lib/dri/swrast_dri.so
${PLIST.vc4}lib/dri/vc4_dri.so
${PLIST.svga}lib/dri/vmwgfx_dri.so
${PLIST.egl}lib/libEGL.so
${PLIST.egl}lib/libEGL.so.1
${PLIST.egl}lib/libEGL.so.1.0.0
-lib/libGL.so
-lib/libGL.so.1
-lib/libGL.so.${GLVER}
-${PLIST.glesv1}lib/libGLESv1_CM.so
-${PLIST.glesv1}lib/libGLESv1_CM.so.1
-${PLIST.glesv1}lib/libGLESv1_CM.so.1.1.0
-${PLIST.glesv2}lib/libGLESv2.so
-${PLIST.glesv2}lib/libGLESv2.so.2
-${PLIST.glesv2}lib/libGLESv2.so.2.0.0
-${PLIST.osmesa}lib/libOSMesa.so
-${PLIST.osmesa}lib/libOSMesa.so.8
-${PLIST.osmesa}lib/libOSMesa.so.8.0.0
-${PLIST.xvmc}${PLIST.nouveau}lib/libXvMCnouveau.so
-${PLIST.xvmc}${PLIST.nouveau}lib/libXvMCnouveau.so.1
-${PLIST.xvmc}${PLIST.nouveau}lib/libXvMCnouveau.so.1.0
-${PLIST.xvmc}${PLIST.nouveau}lib/libXvMCnouveau.so.1.0.0
-${PLIST.xvmc}${PLIST.r600}lib/libXvMCr600.so
-${PLIST.xvmc}${PLIST.r600}lib/libXvMCr600.so.1
-${PLIST.xvmc}${PLIST.r600}lib/libXvMCr600.so.1.0
-${PLIST.xvmc}${PLIST.r600}lib/libXvMCr600.so.1.0.0
+${PLIST.glx}lib/libGL.so
+${PLIST.glx}lib/libGL.so.1
+${PLIST.glx}lib/libGL.so.${GLVER}
+lib/libGLESv1_CM.so
+lib/libGLESv1_CM.so.1
+lib/libGLESv1_CM.so.1.1.0
+lib/libGLESv2.so
+lib/libGLESv2.so.2
+lib/libGLESv2.so.2.0.0
+lib/libOSMesa.so
+lib/libOSMesa.so.8
+lib/libOSMesa.so.8.0.0
${PLIST.gbm}lib/libgbm.so
${PLIST.gbm}lib/libgbm.so.1
${PLIST.gbm}lib/libgbm.so.1.0.0
@@ -87,13 +70,13 @@ lib/libglapi.so.0.0.0
${PLIST.xatracker}lib/libxatracker.so
${PLIST.xatracker}lib/libxatracker.so.2
${PLIST.xatracker}lib/libxatracker.so.2.5.0
-${PLIST.dri}lib/pkgconfig/dri.pc
+lib/pkgconfig/dri.pc
${PLIST.egl}lib/pkgconfig/egl.pc
${PLIST.gbm}lib/pkgconfig/gbm.pc
-lib/pkgconfig/gl.pc
-${PLIST.glesv1}lib/pkgconfig/glesv1_cm.pc
-${PLIST.glesv2}lib/pkgconfig/glesv2.pc
-${PLIST.osmesa}lib/pkgconfig/osmesa.pc
+${PLIST.glx}lib/pkgconfig/gl.pc
+lib/pkgconfig/glesv1_cm.pc
+lib/pkgconfig/glesv2.pc
+lib/pkgconfig/osmesa.pc
${PLIST.xatracker}lib/pkgconfig/xatracker.pc
${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so
${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so.1
@@ -111,6 +94,4 @@ ${PLIST.vdpau}lib/vdpau/libvdpau_radeons
${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1
${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0
${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0.0
-${PLIST.vulkan}share/vulkan/icd.d/intel_icd.${MACHINE_ARCH}.json
-${PLIST.vulkan}share/vulkan/icd.d/radeon_icd.${MACHINE_ARCH}.json
share/examples/mesa/00-mesa-defaults.conf
Index: pkgsrc/graphics/MesaLib/buildlink3.mk
diff -u pkgsrc/graphics/MesaLib/buildlink3.mk:1.58 pkgsrc/graphics/MesaLib/buildlink3.mk:1.59
--- pkgsrc/graphics/MesaLib/buildlink3.mk:1.58 Wed Aug 21 13:35:28 2019
+++ pkgsrc/graphics/MesaLib/buildlink3.mk Fri Aug 30 13:00:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.58 2019/08/21 13:35:28 nia Exp $
+# $NetBSD: buildlink3.mk,v 1.59 2019/08/30 13:00:56 nia Exp $
BUILDLINK_TREE+= MesaLib
@@ -11,38 +11,43 @@ BUILDLINK_PKGSRCDIR.MesaLib?= ../../grap
.include "../../mk/bsd.fast.prefs.mk"
-.if ${X11_TYPE} == "modular"
-BUILDLINK_ABI_DEPENDS.MesaLib+= MesaLib>=10.5.3
-. if defined(USE_LANGUAGES) && !empty(USE_LANGUAGES:Mc++)
-# This is needed to avoid linking conflicting libstdc++ versions
-GCC_REQD+= 4.2
-. endif
-.endif
-
# See <http://developer.apple.com/qa/qa2007/qa1567.html>.
.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
pkgbase:= MesaLib
+
+.if ${X11_TYPE} == "modular" && (${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin") || \
+ ${X11_TYPE} == "native" && exists(${X11BASE}/include/EGL/egl.h)
+MESALIB_SUPPORTS_EGL= yes
+.else
+MESALIB_SUPPORTS_EGL= no
+.endif
+
.include "../../mk/pkg-build-options.mk"
-.if ${X11_TYPE} == "native" && ${OPSYS} != "Cygwin" && exists(${X11BASE}/lib/pkgconfig/dri.pc)
-PKG_BUILD_OPTIONS.MesaLib+= dri
+.if !empty(PKG_BUILD_OPTIONS.MesaLib:Mwayland)
+. include "../../devel/wayland/buildlink3.mk"
.endif
-.if !empty(PKG_BUILD_OPTIONS.MesaLib:Mdri)
-. include "../../graphics/MesaLib/dri.mk"
+.if !empty(PKG_BUILD_OPTIONS.MesaLib:Mx11)
+. include "../../x11/libX11/buildlink3.mk"
+. include "../../x11/libXdamage/buildlink3.mk"
+. include "../../x11/libXext/buildlink3.mk"
+. include "../../x11/libXfixes/buildlink3.mk"
+. include "../../x11/libXrandr/buildlink3.mk"
+. include "../../x11/libXxf86vm/buildlink3.mk"
+. include "../../x11/libxcb/buildlink3.mk"
+. include "../../x11/libxshmfence/buildlink3.mk"
+. include "../../x11/xcb-proto/buildlink3.mk"
+. include "../../x11/xorgproto/buildlink3.mk"
.endif
-.if ${X11_TYPE} == "modular" && !empty(PKG_BUILD_OPTIONS.MesaLib:Mdri) || \
- ${X11_TYPE} == "native" && exists(${X11BASE}/include/EGL/egl.h)
-MESALIB_SUPPORTS_EGL= yes
-.else
-MESALIB_SUPPORTS_EGL= no
+.if ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
+. include "../../x11/libdrm/buildlink3.mk"
.endif
-.include "../../x11/libXext/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.endif # MESALIB_BUILDLINK3_MK
Index: pkgsrc/graphics/MesaLib/options.mk
diff -u pkgsrc/graphics/MesaLib/options.mk:1.70 pkgsrc/graphics/MesaLib/options.mk:1.71
--- pkgsrc/graphics/MesaLib/options.mk:1.70 Sat Aug 24 20:01:01 2019
+++ pkgsrc/graphics/MesaLib/options.mk Fri Aug 30 13:00:56 2019
@@ -1,260 +1,93 @@
-# $NetBSD: options.mk,v 1.70 2019/08/24 20:01:01 nia Exp $
+# $NetBSD: options.mk,v 1.71 2019/08/30 13:00:56 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib
-PKG_SUPPORTED_OPTIONS= llvm dri wayland
-PKG_SUGGESTED_OPTIONS=
-PKG_SUPPORTED_OPTIONS+= vdpau vaapi
-PKG_SUPPORTED_OPTIONS+= osmesa
-PKG_SUPPORTED_OPTIONS+= glesv1 glesv2
-PKG_SUPPORTED_OPTIONS+= gallium-xa
-PKG_SUPPORTED_OPTIONS+= gallium-xvmc
-PKG_SUPPORTED_OPTIONS+= vulkan
-
-PKG_SUGGESTED_OPTIONS+= vdpau vaapi
-PKG_SUGGESTED_OPTIONS+= glesv1 glesv2
-
-PKG_SUGGESTED_OPTIONS+= gallium-xa
-#PKG_SUGGESTED_OPTIONS+= gallium-xvmc
-PKG_SUGGESTED_OPTIONS+= osmesa
-
-PKG_OPTIONS_LEGACY_OPTS+= xa:gallium-xa
-PKG_OPTIONS_LEGACY_OPTS+= xvmc:gallium-xvmc
-
-# The LLVM option enables JIT accelerated software rendering and
-# is also required to support the latest RADEON GPUs, so enable it
-# by default on platforms where such GPUs might be encountered
-# or accelerated software rendering might be useful.
-.if (${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "x86_64" || \
- ${MACHINE_ARCH} == "aarch64") && \
- ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin"
-PKG_SUGGESTED_OPTIONS+= llvm
-.endif
+PKG_SUPPORTED_OPTIONS+= llvm x11
-.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \
- ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" || \
- ${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD" || \
- ${OPSYS} == "Darwin"
-PKG_SUGGESTED_OPTIONS+= dri
+.if ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
+PKG_SUPPORTED_OPTIONS+= wayland
.endif
-.include "../../mk/bsd.options.mk"
-
-# gallium
-PLIST_VARS+= freedreno i915 i965 nouveau r300 r600 radeonsi \
- swrast svga vc4 virgl vulkan
-# classic DRI
-PLIST_VARS+= dri swrast_dri nouveau_dri r100 r200
-# other features
-PLIST_VARS+= egl gbm vaapi vdpau wayland xatracker
-PLIST_VARS+= osmesa xvmc
-PLIST_VARS+= glesv1 glesv2
+PKG_SUGGESTED_OPTIONS+= x11
-EGL_PLATFORMS+= x11
-
-.if ${OPSYS} != "Darwin"
-EGL_PLATFORMS+= drm
-.endif
-
-.if !empty(PKG_OPTIONS:Mwayland)
-EGL_PLATFORMS+= wayland
-PLIST.wayland= yes
-.include "../../devel/wayland/buildlink3.mk"
-.include "../../devel/wayland-protocols/buildlink3.mk"
+# The LLVM option enables JIT accelerated software rendering and is also
+# required to support the latest RADEON GPUs.
+#
+# Enable it by default on platforms where such GPUs might be encountered or
+# LLVM-accelerated software rendering might be useful.
+.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
+ ${MACHINE_ARCH} == "aarch64")
+PKG_SUGGESTED_OPTIONS+= llvm
.endif
-.if !empty(PKG_OPTIONS:Mdri)
-# 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.
-MESON_ARGS+= -Ddri3=true
-. if ${OPSYS} != "Darwin" && ${OPSYS} != "SunOS"
-MESON_ARGS+= -Degl=true
-MESON_ARGS+= -Dgbm=true
-PLIST.egl= yes
-PLIST.gbm= yes
-. else
-MESON_ARGS+= -Degl=false
-MESON_ARGS+= -Dgbm=false
-. endif
-
-. if !empty(PKG_OPTIONS:Mosmesa)
-MESON_ARGS+= -Dosmesa=classic
-PLIST.osmesa= yes
-. else
-MESON_ARGS+= -Dosmesa=none
-. endif
-
-. if !empty(PKG_OPTIONS:Mglesv1)
-MESON_ARGS+= -Dgles1=true
-PLIST.glesv1= yes
-. else
-MESON_ARGS+= -Dgles1=false
-. endif
-
-. if !empty(PKG_OPTIONS:Mglesv2)
-MESON_ARGS+= -Dgles2=true
-PLIST.glesv2= yes
-. else
-MESON_ARGS+= -Dgles2=false
-. endif
-
-PLIST.dri= yes
-
-. if ${OPSYS} != "Darwin"
-BUILDLINK_DEPMETHOD.libpciaccess= full
-. include "../../sysutils/libpciaccess/buildlink3.mk"
-. endif
-. include "../../graphics/MesaLib/dri.mk"
-
-DRI_DRIVERS= #
-GALLIUM_DRIVERS= #
-VULKAN_DRIVERS= #
-
-# Software rasterizer
-PLIST.swrast_dri= yes
-DRI_DRIVERS+= swrast
-
-# x86 only drivers
-. if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && ${OPSYS} != "Darwin"
-# svga / VMWare driver
-PLIST.svga= yes
-GALLIUM_DRIVERS+= svga
-
-# Intel chipsets, x86 only
-PLIST.i915= yes
-DRI_DRIVERS+= i915
-
-PLIST.i965= yes
-DRI_DRIVERS+= i965
+.include "../../mk/bsd.options.mk"
-. endif
+# Gallium drivers requiring LLVM
+PLIST_VARS+= r600 radeonsi
-# Vulkan support
-. if !empty(PKG_OPTIONS:Mvulkan)
-VULKAN_DRIVERS+= amd
-VULKAN_DRIVERS+= intel
-PLIST.vulkan= yes
-. endif
+# Windowing systems
+PLIST_VARS+= wayland glx
-# ARM drivers
-. if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)
-# Qualcomm SnapDragon, libdrm_freedreno.pc
-#GALLIUM_DRIVERS+= freedreno
-#PLIST.freedreno= yes
-
-# Broadcom VideoCore 4
-GALLIUM_DRIVERS+= vc4
-PLIST.vc4= yes
-. endif
+# Misc. features
+PLIST_VARS+= vdpau
-# qemu Linux guest driver
-. if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
-# XXX test this
-#GALLIUM_DRIVERS+= virgl
-#PLIST.virgl= yes
-. endif
-
-# theoretically cross platform PCI drivers
-. if ${OPSYS} != "Darwin" && empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) && \
- empty(MACHINE_PLATFORM:MNetBSD-*-mipsel)
+#
+# LLVM support
+#
+.if !empty(PKG_OPTIONS:Mllvm)
+MESON_ARGS+= -Dllvm=true
+BUILDLINK_API_DEPENDS.libLLVM+= libLLVM>=7.0.1nb2
+. include "../../devel/libelf/buildlink3.mk"
+. include "../../lang/libLLVM/buildlink3.mk"
-# AMD Radeon r600
+. if ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
PLIST.r600= yes
GALLIUM_DRIVERS+= r600
-
-# FULL_OS_VERSION_CMD= ${UNAME} -r
-# FULL_OS_VERSION= ${FULL_OS_VERSION_CMD:sh}
-
-# FreeBSD lacks nouveau support (there are official binaries from Nvidia)
-. if ${OPSYS} != "FreeBSD"
-# nVidia
-PLIST.nouveau= yes
-GALLIUM_DRIVERS+= nouveau
-. endif
-
-# classic DRI r100
-PLIST.r100= yes
-DRI_DRIVERS+= r100
-
-# classic DRI r200
-PLIST.r200= yes
-DRI_DRIVERS+= r200
-
-# FreeBSD lacks nouveau support (there are official binaries from Nvidia)
-. if ${OPSYS} != "FreeBSD"
-# classic DRI nouveau
-PLIST.nouveau_dri= yes
-DRI_DRIVERS+= nouveau
-. endif
-. endif
-# end cross platform PCI drivers
-
-. if !empty(PKG_OPTIONS:Mllvm)
-# VA-API and VDPAU
-. if !empty(PKG_OPTIONS:Mvaapi)
-. include "../../multimedia/libva/available.mk"
-. if ${VAAPI_AVAILABLE} == "yes"
-PLIST.vaapi= yes
-. include "../../multimedia/libva/buildlink3.mk"
-. endif
-. endif # vaapi
-. if !empty(PKG_OPTIONS:Mvdpau)
-. include "../../multimedia/libvdpau/available.mk"
-. if ${VDPAU_AVAILABLE} == "yes"
-PLIST.vdpau= yes
-. include "../../multimedia/libvdpau/buildlink3.mk"
-. endif
-. endif # vdpau
-
-# XA is useful for accelerating xf86-video-vmware
-. if !empty(PKG_OPTIONS:Mgallium-xa)
-MESON_ARGS+= -Dgallium-xa=true
-PLIST.xatracker= yes
-. else
-MESON_ARGS+= -Dgallium-xa=false
-. endif
-
-# AMD Radeon r300
-PLIST.r300= yes
-GALLIUM_DRIVERS+= r300
-# AMD Canary Islands GPUs
PLIST.radeonsi= yes
GALLIUM_DRIVERS+= radeonsi
-MESON_ARGS+= -Dllvm=true
-
-BUILDLINK_API_DEPENDS.libLLVM+= libLLVM>=7.0.1nb2
-. include "../../devel/libelf/buildlink3.mk"
-. include "../../lang/libLLVM/buildlink3.mk"
-. else # !llvm
-MESON_ARGS+= -Dgallium-xa=false
-MESON_ARGS+= -Dgallium-vdpau=false
-MESON_ARGS+= -Dllvm=false
-. endif # llvm
-PLIST_SUBST+= GLVER="1.2.0"
-MESON_ARGS+= -Dgallium-drivers=${GALLIUM_DRIVERS:ts,}
-MESON_ARGS+= -Ddri-drivers=${DRI_DRIVERS:ts,}
-MESON_ARGS+= -Dvulkan-drivers=${VULKAN_DRIVERS:ts,}
-MESON_ARGS+= -Dplatforms=${EGL_PLATFORMS:ts,}
-.else # !dri
-PLIST_SUBST+= GLVER="1.6.0"
-MESON_ARGS+= -Dgallium-drivers=
-MESON_ARGS+= -Ddri-drivers=
-MESON_ARGS+= -Dvulkan-drivers=
-MESON_ARGS+= -Ddri3=false
-MESON_ARGS+= -Degl=false
-MESON_ARGS+= -Dgbm=false
-MESON_ARGS+= -Dgles1=false
-MESON_ARGS+= -Dgles2=false
-MESON_ARGS+= -Dglx=xlib
-MESON_ARGS+= -Dplatforms=x11
+. endif
+.else
MESON_ARGS+= -Dllvm=false
-.endif # dri
+.endif
+
+#
+# Wayland support
+#
+.if !empty(PKG_OPTIONS:Mwayland)
+MESA_PLATFORMS+= wayland
+PLIST.wayland= yes
+. include "../../devel/wayland/buildlink3.mk"
+. include "../../devel/wayland-protocols/buildlink3.mk"
+.endif
-.if !empty(PKG_OPTIONS:Mgallium-xvmc)
-MESON_ARGS+= -Dgallium-xvmc=true
-.include "../../x11/libXvMC/buildlink3.mk"
-PLIST.xvmc= yes
+#
+# X11 support
+#
+.if !empty(PKG_OPTIONS:Mx11)
+MESA_PLATFORMS+= x11
+PLIST.glx= yes
+. if ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
+MESON_ARGS+= -Dglx=dri
+. include "../../multimedia/libvdpau/available.mk"
+. if ${VDPAU_AVAILABLE} == "yes"
+MESON_ARGS+= -Dgallium-vdpau=true
+PLIST.vdpau= yes
+. include "../../multimedia/libvdpau/buildlink3.mk"
+. else
+MESON_ARGS+= -Dgallium-vdpau=false
+. endif
+. endif
+. include "../../x11/libX11/buildlink3.mk"
+. include "../../x11/libXdamage/buildlink3.mk"
+. include "../../x11/libXext/buildlink3.mk"
+. include "../../x11/libXfixes/buildlink3.mk"
+. include "../../x11/libXrandr/buildlink3.mk"
+. include "../../x11/libXxf86vm/buildlink3.mk"
+. include "../../x11/libxcb/buildlink3.mk"
+. include "../../x11/libxshmfence/buildlink3.mk"
+. include "../../x11/xcb-proto/buildlink3.mk"
+. include "../../x11/xorgproto/buildlink3.mk"
.else
-MESON_ARGS+= -Dgallium-xvmc=false
+MESON_ARGS+= -Dglx=disabled
+MESON_ARGS+= -Dgallium-vdpau=false
.endif
Home |
Main Index |
Thread Index |
Old Index