git: 6e197c6c59f3 - main - graphics/mesa: Update to 24.0.1

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Sat, 17 Feb 2024 14:54:17 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6e197c6c59f37a2b2369c90dc460fb94a8355056

commit 6e197c6c59f37a2b2369c90dc460fb94a8355056
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2024-02-15 17:58:22 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2024-02-17 14:53:56 +0000

    graphics/mesa: Update to 24.0.1
    
    Release notes (24.0.0): https://lists.freedesktop.org/archives/mesa-dev/2024-February/226138.html
    Release notes (24.0.1): https://lists.freedesktop.org/archives/mesa-dev/2024-February/226151.html
    
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
---
 graphics/mesa-dri/Makefile.common                  |  2 +-
 graphics/mesa-dri/distinfo                         |  6 +++---
 ...atch-src_gallium_winsys_amdgpu_drm_amdgpu__bo.c | 11 +++++++++++
 graphics/mesa-dri/files/patch-src_util_os__file.c  | 22 ----------------------
 lang/clover/Makefile                               |  4 ++++
 5 files changed, 19 insertions(+), 26 deletions(-)

diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common
index 0b7ba5f94e36..6adb4b342a9e 100644
--- a/graphics/mesa-dri/Makefile.common
+++ b/graphics/mesa-dri/Makefile.common
@@ -12,7 +12,7 @@
 MESAVERSION=	${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
 MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
 
-MESABASEVERSION=	23.3.5
+MESABASEVERSION=	24.0.1
 # if there is a subversion, don't include the '-' between 7.11-rc2.
 MESASUBVERSION=
 
diff --git a/graphics/mesa-dri/distinfo b/graphics/mesa-dri/distinfo
index 3ce2f6c01bb1..5ebb8c423aae 100644
--- a/graphics/mesa-dri/distinfo
+++ b/graphics/mesa-dri/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1706768999
-SHA256 (mesa-23.3.5.tar.xz) = 69ccb1278641ff5bad71ca0f866188aeb1a92aadc4dbb9d35f50aebec5b8b50f
-SIZE (mesa-23.3.5.tar.xz) = 19429564
+TIMESTAMP = 1708019786
+SHA256 (mesa-24.0.1.tar.xz) = f387192b08c471c545590dd12230a2a343244804b5fe866fec6aea02eab57613
+SIZE (mesa-24.0.1.tar.xz) = 19950992
 SHA256 (4a253aae7ca437201d2a31d2a11a1a5434fe41f1.patch) = 84f18f14788bd8f387e2fc754b945bf30f84b517dd917785ed5d8ef1d594e24a
 SIZE (4a253aae7ca437201d2a31d2a11a1a5434fe41f1.patch) = 1626
 SHA256 (7c565db35d39bdbf4e4f867ea19f78b97c8c126f.patch) = 5af88a22abfadb91f6626c9244ed2a365e2bb283e0a42399082d1e909136d5f3
diff --git a/graphics/mesa-dri/files/patch-src_gallium_winsys_amdgpu_drm_amdgpu__bo.c b/graphics/mesa-dri/files/patch-src_gallium_winsys_amdgpu_drm_amdgpu__bo.c
new file mode 100644
index 000000000000..75994a00618e
--- /dev/null
+++ b/graphics/mesa-dri/files/patch-src_gallium_winsys_amdgpu_drm_amdgpu__bo.c
@@ -0,0 +1,11 @@
+--- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c.orig	2024-02-16 16:21:40 UTC
++++ src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+@@ -709,7 +709,7 @@ struct pb_slab *amdgpu_bo_slab_alloc(void *priv, unsig
+    slab_bo->slab.group_index = group_index;
+    slab_bo->slab.entry_size = entry_size;
+    slab_bo->entries = os_malloc_aligned(slab_bo->slab.num_entries * sizeof(*slab_bo->entries),
+-                                        CACHE_LINE_SIZE);
++                                        MESA_CACHE_LINE_SIZE);
+    if (!slab_bo->entries)
+       goto fail;
+ 
diff --git a/graphics/mesa-dri/files/patch-src_util_os__file.c b/graphics/mesa-dri/files/patch-src_util_os__file.c
deleted file mode 100644
index f1bb54593c5a..000000000000
--- a/graphics/mesa-dri/files/patch-src_util_os__file.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/util/os_file.c.orig	2024-01-25 12:45:07 UTC
-+++ src/util/os_file.c
-@@ -207,13 +207,19 @@ os_same_file_description(int fd1, int fd2)
- int
- os_same_file_description(int fd1, int fd2)
- {
-+#ifdef SYS_kcmp
-    pid_t pid = getpid();
-+#endif
- 
-    /* Same file descriptor trivially implies same file description */
-    if (fd1 == fd2)
-       return 0;
- 
-+#ifdef SYS_kcmp
-    return syscall(SYS_kcmp, pid, pid, KCMP_FILE, fd1, fd2);
-+#else
-+   return -1;
-+#endif
- }
- 
- #else
diff --git a/lang/clover/Makefile b/lang/clover/Makefile
index 4b5b41604d07..cb318016c189 100644
--- a/lang/clover/Makefile
+++ b/lang/clover/Makefile
@@ -12,8 +12,10 @@ ONLY_FOR_ARCHS=	aarch64 amd64 i386 powerpc64 powerpc64le
 ONLY_FOR_ARCHS_REASON=	needs a GPU supported by the AMDGPU KMS driver
 
 BUILD_DEPENDS=	libclc>=0.3.0:devel/libclc \
+		spirv-tools>=0:graphics/spirv-tools \
 		opencl>=0:devel/opencl
 LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd \
+		libLLVMSPIRVLib.so.${LLVM_VERSION}:devel/spirv-llvm-translator@${LLVM_PORT:T} \
 		libzstd.so:archivers/zstd
 RUN_DEPENDS=	libclc>=0.3.0:devel/libclc \
 		opencl>=0:devel/opencl
@@ -48,6 +50,8 @@ MESON_ARGS+=	-Dplatforms="" \
 
 LDFLAGS_i386=		-Wl,-znotext
 
+CONFIGURE_ENV+=	PKG_CONFIG_PATH="${LLVM_PREFIX}/libdata/pkgconfig"
+
 .include "${MASTERDIR}/Makefile.targets"
 
 pre-patch: