pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib graphics/MesaLib: make this build & i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3d6e4b6c5895
branches:  trunk
changeset: 382313:3d6e4b6c5895
user:      he <he%pkgsrc.org@localhost>
date:      Mon Jul 25 09:49:06 2022 +0000

description:
graphics/MesaLib: make this build & install on NetBSD/powerpc.

 * Add hacks.mk to make -latomic visible for 64-bit atomics.
 * Turn off nouveau build, as we do not have the DRI libs for that.
 * Introduce PLIST.xa, turned off on powerpc, apparently this requires
   one of nouveau, freedreno, i815 or svga gallium drivers.

diffstat:

 graphics/MesaLib/Makefile |  11 ++++++++++-
 graphics/MesaLib/PLIST    |  16 ++++++++--------
 graphics/MesaLib/hacks.mk |  13 +++++++++++++
 3 files changed, 31 insertions(+), 9 deletions(-)

diffs (98 lines):

diff -r 41119df81027 -r 3d6e4b6c5895 graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Mon Jul 25 09:34:44 2022 +0000
+++ b/graphics/MesaLib/Makefile Mon Jul 25 09:49:06 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.200 2022/07/07 14:05:25 wiz Exp $
+# $NetBSD: Makefile,v 1.201 2022/07/25 09:49:06 he Exp $
 
 DISTNAME=      mesa-21.3.9
 PKGNAME=       ${DISTNAME:S/mesa/MesaLib/}
@@ -53,7 +53,13 @@
 .  endif
 MESON_ARGS+=           -Degl=true
 MESON_ARGS+=           -Dgbm=true
+PLIST_VARS+=           xa
+.  if empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)
+# XA state tracker requires at least one of the following gallium drivers:
+# nouveau, freedreno, i915, svga
 MESON_ARGS+=           -Dgallium-xa=enabled
+PLIST.xa=              yes
+.  endif
 .  if ${X11_TYPE} == "native" && !exists(${X11BASE}/include/xcb/dri3.h)
 MESON_ARGS+=           -Ddri3=false
 .  endif
@@ -74,10 +80,13 @@
 .  endif
 # FreeBSD lacks nouveau support (there are official binaries from Nvidia)
 .  if ${OPSYS} != "FreeBSD"
+.    if empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)
+# nouveau not available on this platform
 PLIST.nouveau=         yes
 PLIST.nouveau_dri=     yes
 GALLIUM_DRIVERS+=      nouveau
 DRI_DRIVERS+=          nouveau
+.    endif
 .  endif
 .  if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
 # qemu Linux guest driver
diff -r 41119df81027 -r 3d6e4b6c5895 graphics/MesaLib/PLIST
--- a/graphics/MesaLib/PLIST    Mon Jul 25 09:34:44 2022 +0000
+++ b/graphics/MesaLib/PLIST    Mon Jul 25 09:49:06 2022 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.47 2022/03/13 15:50:05 tnn Exp $
+@comment $NetBSD: PLIST,v 1.48 2022/07/25 09:49:06 he Exp $
 ${PLIST.kms}include/EGL/egl.h
 ${PLIST.kms}include/EGL/eglext.h
 ${PLIST.kms}include/EGL/eglextchromium.h
@@ -25,9 +25,9 @@
 include/GLES3/gl3platform.h
 include/KHR/khrplatform.h
 ${PLIST.kms}include/gbm.h
-${PLIST.kms}include/xa_composite.h
-${PLIST.kms}include/xa_context.h
-${PLIST.kms}include/xa_tracker.h
+${PLIST.xa}${PLIST.kms}include/xa_composite.h
+${PLIST.xa}${PLIST.kms}include/xa_context.h
+${PLIST.xa}${PLIST.kms}include/xa_tracker.h
 ${PLIST.arm}lib/dri/armada-drm_dri.so
 ${PLIST.arm}lib/dri/etnaviv_dri.so
 ${PLIST.arm}lib/dri/exynos_dri.so
@@ -100,9 +100,9 @@
 ${PLIST.vulkan_intel}lib/libvulkan_intel.so
 ${PLIST.vulkan}lib/libvulkan_lvp.so
 ${PLIST.vulkan}lib/libvulkan_radeon.so
-${PLIST.kms}lib/libxatracker.so
-${PLIST.kms}lib/libxatracker.so.2
-${PLIST.kms}lib/libxatracker.so.2.5.0
+${PLIST.xa}${PLIST.kms}lib/libxatracker.so
+${PLIST.xa}${PLIST.kms}lib/libxatracker.so.2
+${PLIST.xa}${PLIST.kms}lib/libxatracker.so.2.5.0
 lib/pkgconfig/dri.pc
 ${PLIST.kms}lib/pkgconfig/egl.pc
 ${PLIST.kms}lib/pkgconfig/gbm.pc
@@ -110,7 +110,7 @@
 lib/pkgconfig/glesv1_cm.pc
 lib/pkgconfig/glesv2.pc
 lib/pkgconfig/osmesa.pc
-${PLIST.kms}lib/pkgconfig/xatracker.pc
+${PLIST.xa}${PLIST.kms}lib/pkgconfig/xatracker.pc
 ${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so
 ${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so.1
 ${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so.1.0
diff -r 41119df81027 -r 3d6e4b6c5895 graphics/MesaLib/hacks.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/hacks.mk Mon Jul 25 09:49:06 2022 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: hacks.mk,v 1.15 2022/07/25 09:49:06 he Exp $
+
+.if !defined(GRAPHICS_MESALIB_HACKS_MK)
+GRAPHICS_MESALIB__HACKS_MK=    defined
+
+# [Sun Jul 24 20:23:03 CEST 2022 : he]
+# On NetBSD/powerpc, use devel/libatomic to get 8-byte atomics.
+.if ${MACHINE_ARCH} == "powerpc" && ${OPSYS} == "NetBSD"
+PKG_HACKS+=    powerpc-atomics
+.include "../../devel/libatomic/buildlink3.mk"
+.endif
+
+.endif # GRAPHICS_MESALIB_HACKS_MK



Home | Main Index | Thread Index | Old Index