pkgsrc-WIP-changes archive

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

mesa: update to 25.2.0



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Wed Aug 20 14:03:46 2025 +0200
Changeset:	7433bb515604134d9b639c50d1f127c267b8eadf

Modified Files:
	mesa/Makefile
	mesa/PLIST
	mesa/buildlink3.mk
	mesa/distinfo
	mesa/features.mk
	mesa/options.mk
	mesa/patches/patch-src_glx_glxcurrent.c
Removed Files:
	mesa/builtin.mk

Log Message:
mesa: update to 25.2.0

- adjust bl3.mk file so it can be symlinked into graphics/MesaLib and
  have pkgsrc pull in wip/mesa. Should add a MESA_VERSION user settable
  knob to pkgsrc proper at some point.

Mostly tested on Linux, other platforms might need more PLIST fixes.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7433bb515604134d9b639c50d1f127c267b8eadf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mesa/Makefile                           | 26 +++-------
 mesa/PLIST                              | 25 ++++-----
 mesa/buildlink3.mk                      | 24 ++++-----
 mesa/builtin.mk                         | 89 ---------------------------------
 mesa/distinfo                           |  8 +--
 mesa/features.mk                        |  3 --
 mesa/options.mk                         |  3 +-
 mesa/patches/patch-src_glx_glxcurrent.c |  8 +--
 8 files changed, 38 insertions(+), 148 deletions(-)

diffs:
diff --git a/mesa/Makefile b/mesa/Makefile
index ec488cf8e8..fb7e8790e1 100644
--- a/mesa/Makefile
+++ b/mesa/Makefile
@@ -1,12 +1,12 @@
 # $NetBSD: $
 
-#DISTNAME=	mesa-25.0.5
-DISTNAME=	mesa-24.3.4
+DISTNAME=	mesa-25.2.0
 CATEGORIES=	graphics
 MASTER_SITES=	https://mesa.freedesktop.org/archive/
+MASTER_SITES+=	https://mesa3d.org/archive/
 EXTRACT_SUFX=	.tar.xz
 
-MAINTAINER=	nia%NetBSD.org@localhost
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://www.mesa3d.org/
 COMMENT=	Open source OpenGL implementation
 LICENSE=	mit
@@ -42,7 +42,7 @@ PLIST_VARS+=		i830 i915 i965 r100 r200 nouveau_dri
 PLIST_VARS+=		r300 svga nouveau iris
 
 # other features
-PLIST_VARS+=		arm kms vaapi xa
+PLIST_VARS+=		arm kms vaapi
 
 .if ${MESALIB_SUPPORTS_DRI} == "yes"
 BUILDLINK_API_DEPENDS.libdrm+=	libdrm>=2.4.100
@@ -52,14 +52,6 @@ BUILDLINK_API_DEPENDS.libdrm+=	libdrm>=2.4.100
 .  endif
 MESON_ARGS+=		-Degl=enabled
 MESON_ARGS+=		-Dgbm=enabled
-.  if ${_MESALIB_ARCH_SUPPORTS_XA} == "yes"
-# XA state tracker requires at least one of the following gallium drivers:
-# nouveau, freedreno, i915, svga
-MESON_ARGS+=		-Dgallium-xa=enabled
-PLIST.xa=		yes
-.  else
-MESON_ARGS+=		-Dgallium-xa=disabled
-.  endif
 .  if ${X11_TYPE} == "native" && !exists(${X11BASE}/include/xcb/dri3.h)
 MESON_ARGS+=		-Ddri3=false
 .  endif
@@ -132,9 +124,6 @@ CXXFLAGS+=	-march=i586
 MESON_ARGS+=	-Dgles1=enabled
 MESON_ARGS+=	-Dgles2=enabled
 MESON_ARGS+=	-Dopengl=true
-MESON_ARGS+=	-Dosmesa=true
-MESON_ARGS+=	-Dshared-glapi=enabled
-#MESON_ARGS+=	-Dgallium-xvmc=disabled
 
 CPPFLAGS+=	-DHAVE_NOATEXIT
 CPPFLAGS+=	-DSYSCONFDIR=${PKG_SYSCONFDIR}
@@ -173,15 +162,14 @@ PKGCONFIG_OVERRIDE+=		output/meson-private/glesv2.pc
 PKGCONFIG_OVERRIDE+=		output/meson-private/dri.pc
 PKGCONFIG_OVERRIDE+=		output/meson-private/gbm.pc
 PKGCONFIG_OVERRIDE+=		output/meson-private/egl.pc
-PKGCONFIG_OVERRIDE+=		output/meson-private/osmesa.pc
-PKGCONFIG_OVERRIDE+=		output/meson-private/xatracker.pc
 PKGCONFIG_OVERRIDE+=		output/meson-private/gl.pc
 
 post-install:
 	${MV} ${DESTDIR}${PREFIX}/share/drirc.d/00-mesa-defaults.conf ${DESTDIR}${EGDIR}
 .if ${OPSYS} == "Darwin"
-	install_name_tool -id ${PREFIX}/lib/dri/swrast_dri.so \
-	    ${DESTDIR}${PREFIX}/lib/dri/swrast_dri.so
+#	install_name_tool -id ${PREFIX}/lib/dri/swrast_dri.so \
+#	    ${DESTDIR}${PREFIX}/lib/dri/swrast_dri.so
+	install_name_tool -change @rpath/libgallium-${PKGVERSION_NOREV}.dylib ${PREFIX}/lib/libgallium-${PKGVERSION_NOREV}.dylib ${DESTDIR}${PREFIX}/lib/libGL.1.dylib
 .endif
 
 .include "../../devel/meson/build.mk"
diff --git a/mesa/PLIST b/mesa/PLIST
index 9e87fc7c38..3cdec6ef3f 100644
--- a/mesa/PLIST
+++ b/mesa/PLIST
@@ -10,7 +10,6 @@ include/GL/glext.h
 ${PLIST.glx}include/GL/glx.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
@@ -25,9 +24,8 @@ include/GLES3/gl3ext.h
 include/GLES3/gl3platform.h
 include/KHR/khrplatform.h
 ${PLIST.kms}include/gbm.h
-${PLIST.xa}include/xa_composite.h
-${PLIST.xa}include/xa_context.h
-${PLIST.xa}include/xa_tracker.h
+@comment XXX should it be PLIST.kms?
+include/gbm_backend_abi.h
 ${PLIST.arm}lib/dri/armada-drm_dri.so
 ${PLIST.arm}lib/dri/exynos_dri.so
 ${PLIST.arm}lib/dri/gm12u320_dri.so
@@ -74,11 +72,13 @@ ${PLIST.arm}lib/dri/st7735r_dri.so
 ${PLIST.arm}lib/dri/sti_dri.so
 ${PLIST.arm}lib/dri/stm_dri.so
 ${PLIST.arm}lib/dri/sun4i-drm_dri.so
+@comment not on apple ?
 lib/dri/swrast_dri.so
 ${PLIST.arm}lib/dri/udl_dri.so
 ${PLIST.arm}lib/dri/vkms_dri.so
 ${PLIST.svga}lib/dri/vmwgfx_dri.so
 ${PLIST.arm}lib/dri/zynqmp-dpsub_dri.so
+@comment not on apple?
 lib/gbm/dri_gbm.so
 ${PLIST.kms}lib/libEGL.so
 ${PLIST.kms}lib/libEGL.so.1
@@ -92,32 +92,24 @@ 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
-lib/libgallium-24.3.4.so
+lib/libgallium-${PKGVERSION}.so
 ${PLIST.kms}lib/libgbm.so
 ${PLIST.kms}lib/libgbm.so.1
 ${PLIST.kms}lib/libgbm.so.1.0.0
-lib/libglapi.so
-lib/libglapi.so.0
-lib/libglapi.so.0.0.0
+@comment lib/libglapi.so
+@comment lib/libglapi.so.0
+@comment lib/libglapi.so.0.0.0
 ${PLIST.vulkan}${PLIST.arm}lib/libvulkan_broadcom.so
 ${PLIST.vulkan}${PLIST.arm}lib/libvulkan_freedreno.so
 ${PLIST.vulkan_intel}lib/libvulkan_intel.so
 ${PLIST.vulkan}lib/libvulkan_lvp.so
 ${PLIST.vulkan}lib/libvulkan_radeon.so
-${PLIST.xa}lib/libxatracker.so
-${PLIST.xa}lib/libxatracker.so.2
-${PLIST.xa}lib/libxatracker.so.2.5.0
 lib/pkgconfig/dri.pc
 ${PLIST.kms}lib/pkgconfig/egl.pc
 ${PLIST.kms}lib/pkgconfig/gbm.pc
 ${PLIST.glx}lib/pkgconfig/gl.pc
 lib/pkgconfig/glesv1_cm.pc
 lib/pkgconfig/glesv2.pc
-lib/pkgconfig/osmesa.pc
-${PLIST.xa}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
@@ -134,6 +126,7 @@ ${PLIST.radeonsi}${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so
 ${PLIST.radeonsi}${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1
 ${PLIST.radeonsi}${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0
 ${PLIST.radeonsi}${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0.0
+${PLIST.vulkan}share/drirc.d/00-radv-defaults.conf
 share/examples/mesa/00-mesa-defaults.conf
 ${PLIST.vulkan}${PLIST.arm}share/vulkan/icd.d/broadcom_icd.${MACHINE_ARCH}.json
 ${PLIST.vulkan}${PLIST.arm}share/vulkan/icd.d/freedreno_icd.${MACHINE_ARCH}.json
diff --git a/mesa/buildlink3.mk b/mesa/buildlink3.mk
index 79f5628307..361e230398 100644
--- a/mesa/buildlink3.mk
+++ b/mesa/buildlink3.mk
@@ -1,26 +1,26 @@
 # $NetBSD: buildlink3.mk,v 1.68 2023/08/14 05:24:30 wiz Exp $
 
-BUILDLINK_TREE+=	MesaLib
+BUILDLINK_TREE+=	mesa
 
-.if !defined(MESALIB_BUILDLINK3_MK)
-MESALIB_BUILDLINK3_MK:=
+.if !defined(MESA_BUILDLINK3_MK)
+MESA_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.MesaLib+=	MesaLib>=3.4.2
-BUILDLINK_ABI_DEPENDS.MesaLib+=	MesaLib>=21.3.9nb3
-BUILDLINK_PKGSRCDIR.MesaLib?=	../../graphics/MesaLib
+BUILDLINK_API_DEPENDS.mesa+=	mesa>=25
+BUILDLINK_ABI_DEPENDS.mesa+=	mesa>=25
+BUILDLINK_PKGSRCDIR.mesa?=	../../wip/mesa
 
-.include "../../graphics/MesaLib/features.mk"
+.include "../../wip/mesa/features.mk"
 
 # 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
+BUILDLINK_LDFLAGS.mesa+=	-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
+pkgbase:= mesa
 
 .include "../../mk/pkg-build-options.mk"
 
-.if !empty(PKG_BUILD_OPTIONS.MesaLib:Mx11)
+.if !empty(PKG_BUILD_OPTIONS.mesa:Mx11)
 .  include "../../x11/libX11/buildlink3.mk"
 .  include "../../x11/libXdamage/buildlink3.mk"
 .  include "../../x11/libXext/buildlink3.mk"
@@ -38,6 +38,6 @@ pkgbase:= MesaLib
 .endif
 
 .include "../../mk/pthread.buildlink3.mk"
-.endif # MESALIB_BUILDLINK3_MK
+.endif # MESA_BUILDLINK3_MK
 
-BUILDLINK_TREE+=	-MesaLib
+BUILDLINK_TREE+=	-mesa
diff --git a/mesa/builtin.mk b/mesa/builtin.mk
deleted file mode 100644
index b2c566d8e0..0000000000
--- a/mesa/builtin.mk
+++ /dev/null
@@ -1,89 +0,0 @@
-# $NetBSD: builtin.mk,v 1.23 2019/08/30 19:06:34 nia Exp $
-
-BUILTIN_PKG:=	MesaLib
-
-BUILTIN_FIND_FILES_VAR:=	H_MESALIB PC_GL
-BUILTIN_FIND_FILES.H_MESALIB=	${X11BASE}/include/GL/glx.h
-BUILTIN_FIND_FILES.PC_GL=	${X11BASE}/lib/pkgconfig/gl.pc
-BUILTIN_FIND_FILES.PC_GL+=	${X11BASE}/lib${LIBABISUFFIX}/pkgconfig/gl.pc
-
-.include "../../mk/buildlink3/bsd.builtin.mk"
-
-###
-### Determine if there is a built-in implementation of the package and
-### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
-###
-.if !defined(IS_BUILTIN.MesaLib)
-.  if empty(PC_GL:M__nonexistent__)
-IS_BUILTIN.MesaLib=	yes
-.  elif empty(H_MESALIB:M__nonexistent__)
-IS_BUILTIN.MesaLib=	yes
-.  else
-IS_BUILTIN.MesaLib=	no
-.  endif
-.endif
-
-MAKEVARS+=	IS_BUILTIN.MesaLib
-
-###
-### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
-### a package name to represent the built-in package.
-###
-.if !defined(BUILTIN_PKG.MesaLib) && \
-    !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS])
-.  if empty(PC_GL:M__nonexistent__)
-BUILTIN_VERSION.Mesa!= ${SED} -n -e 's/Version: //p' ${PC_GL}
-.  elif empty(H_MESALIB:M__nonexistent__)
-.    include "version.mk"
-.  else # ?
-BUILTIN_VERSION.Mesa:= 0.something-weird-happened
-.  endif
-BUILTIN_PKG.MesaLib=	MesaLib-${BUILTIN_VERSION.Mesa}
-MAKEVARS+=	BUILTIN_VERSION.Mesa
-.endif
-MAKEVARS+=	BUILTIN_PKG.MesaLib
-
-###
-### Determine whether we should use the built-in implementation if it
-### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
-###
-.if !defined(USE_BUILTIN.MesaLib)
-.  if ${PREFER.MesaLib} == "pkgsrc"
-USE_BUILTIN.MesaLib=	no
-.  else
-USE_BUILTIN.MesaLib=	${IS_BUILTIN.MesaLib}
-.    if defined(BUILTIN_PKG.MesaLib) && \
-        !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS])
-USE_BUILTIN.MesaLib=	yes
-.      for dep in ${BUILDLINK_API_DEPENDS.MesaLib}
-.        if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
-USE_BUILTIN.MesaLib!=							\
-	if ${PKG_ADMIN} pmatch ${dep:Q} ${BUILTIN_PKG.MesaLib}; then \
-		${ECHO} yes;						\
-	else								\
-		${ECHO} no;						\
-	fi
-.        endif
-.      endfor
-.    endif
-.  endif  # PREFER.MesaLib
-.endif
-
-MAKEVARS+=	USE_BUILTIN.MesaLib
-
-###
-### The section below only applies if we are not including this file
-### solely to determine whether a built-in implementation exists.
-###
-CHECK_BUILTIN.MesaLib?=	no
-.if !empty(CHECK_BUILTIN.MesaLib:M[nN][oO])
-
-.  if !empty(USE_BUILTIN.MesaLib:M[nN][oO])
-.    include "../../mk/pthread.buildlink3.mk"
-.    include "../../mk/pthread.builtin.mk"
-BUILTIN_PKG:=	MesaLib
-.  endif
-
-.  include "../../mk/x11.builtin.mk"
-
-.endif	# CHECK_BUILTIN.MesaLib
diff --git a/mesa/distinfo b/mesa/distinfo
index 17a8e6cac1..fdc97b36a9 100644
--- a/mesa/distinfo
+++ b/mesa/distinfo
@@ -1,12 +1,12 @@
 $NetBSD: distinfo,v 1.166 2023/07/18 19:33:31 ryoon Exp $
 
-BLAKE2s (mesa-24.3.4.tar.xz) = b20694d859f021fda01b2dbfd3b36b0020d5fd34bcc5037ba4d4ce11eab3d1d3
-SHA512 (mesa-24.3.4.tar.xz) = 9c23cd86fda4cf0289c5a78b08ceea8b01e5b141d86ee3e659fa46e62ff9586ff92a4984d2a340b5bf209c4c7f3414bf99f3ced19feee8fb39ef99fe572dbd55
-Size (mesa-24.3.4.tar.xz) = 30691532 bytes
+BLAKE2s (mesa-25.2.0.tar.xz) = 75438d3c559f99647603695f8280a137c00d3f06404d48304a55e49b7e845068
+SHA512 (mesa-25.2.0.tar.xz) = f36e4f9f619becfc89f9cf3704d21f5f1532f1e658808fd30c0edce8c28cd65dc6578a21333e896aa5eaccf09da99efd9127a8d3d46681e8360f618cf63bab94
+Size (mesa-25.2.0.tar.xz) = 43549344 bytes
 SHA1 (patch-src_egl_drivers_dri2_platform__drm.c) = c982acaf2246858a06a52f548b6103800c0d7c45
 SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = c6958cf29da9154c673f8c64790ac2bb46ed74bd
 SHA1 (patch-src_gallium_drivers_r600_sfn_sfn__valuefactory.cpp) = 14a0bc9f0cb7d0f4bc7ba8de49cf162af4e27ddf
 SHA1 (patch-src_glx_glxclient.h) = 4812c1b17bfff6cb43192790aa5cfee5c6c3149d
-SHA1 (patch-src_glx_glxcurrent.c) = 38de869a62f3c20b44a0e6cbd3046953f4f2542d
+SHA1 (patch-src_glx_glxcurrent.c) = be95c084b834275ca65a38f446487c68889e1ab5
 SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c
 SHA1 (patch-src_util_os__file.c) = 6761051028c97f763075fd7526373e9fa131be08
diff --git a/mesa/features.mk b/mesa/features.mk
index e27ce23083..a208220e74 100644
--- a/mesa/features.mk
+++ b/mesa/features.mk
@@ -23,9 +23,6 @@ MESALIB_SUPPORTS_OSMESA?=	yes
 MESALIB_SUPPORTS_GLESv2?=	yes
 .  if ${MESALIB_SUPPORTS_DRI} == "yes"
 MESALIB_SUPPORTS_EGL?=		yes
-.    if ${_MESALIB_ARCH_SUPPORTS_XA} == "yes"
-MESALIB_SUPPORTS_XA?=		yes
-.    endif
 .  endif
 .else
 .  if exists(${X11BASE}/include/EGL/egl.h)
diff --git a/mesa/options.mk b/mesa/options.mk
index f650b945e8..ffce563f1b 100644
--- a/mesa/options.mk
+++ b/mesa/options.mk
@@ -1,6 +1,6 @@
 # $NetBSD: options.mk,v 1.85 2023/07/19 18:32:49 tnn Exp $
 
-PKG_OPTIONS_VAR=		PKG_OPTIONS.MesaLib
+PKG_OPTIONS_VAR=		PKG_OPTIONS.mesa
 
 .include "features.mk"
 
@@ -96,6 +96,7 @@ MESON_ARGS+=		-Dllvm=disabled
 #
 PLIST_VARS+=		 vulkan vulkan_intel
 .if !empty(PKG_OPTIONS:Mvulkan)
+.include "../../wip/glslang/buildlink3.mk"
 VULKAN_DRIVERS+=	amd
 VULKAN_DRIVERS+=	swrast
 PLIST.vulkan=		yes
diff --git a/mesa/patches/patch-src_glx_glxcurrent.c b/mesa/patches/patch-src_glx_glxcurrent.c
index 160100a8bc..e4c4d02aae 100644
--- a/mesa/patches/patch-src_glx_glxcurrent.c
+++ b/mesa/patches/patch-src_glx_glxcurrent.c
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_glx_glxcurrent.c,v 1.6 2023/07/18 19:33:31 ryoon Exp $
+$NetBSD$
 
 NetBSD only supports zero-initialized initial-exec tls variables in conjuction
 with dlopen(3) at the moment.
 
---- src/glx/glxcurrent.c.orig	2021-08-04 18:49:29.150474000 +0000
+--- src/glx/glxcurrent.c.orig	2025-08-13 14:41:43.198379856 +0000
 +++ src/glx/glxcurrent.c
-@@ -76,7 +90,11 @@ _X_HIDDEN pthread_mutex_t __glXmutex = P
+@@ -51,7 +51,11 @@ pthread_mutex_t __glXmutex = PTHREAD_MUT
   * \b never be \c NULL.  This is important!  Because of this
   * \c __glXGetCurrentContext can be implemented as trivial macro.
   */
@@ -15,5 +15,5 @@ with dlopen(3) at the moment.
  __THREAD_INITIAL_EXEC void *__glX_tls_Context = &dummyContext;
 +#endif
  
- _X_HIDDEN void
+ void
  __glXSetCurrentContext(struct glx_context * c)


Home | Main Index | Thread Index | Old Index