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 @@ -1,101 +1,101 @@ # Makefile.common - shared code between MesaLib ports. # # !!! Here be dragons !!! (they seem to be everywhere these days) # # Remember to upgrade the following ports everytime you bump MESAVERSION: # # - graphics/libosmesa # - graphics/mesa-dri # - graphics/mesa-libs # - lang/clover 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= MASTER_SITES= https://mesa.freedesktop.org/archive/ \ https://mesa.freedesktop.org/archive/${MESABASEVERSION}/ \ ftp://ftp.freedesktop.org/pub/mesa/ \ ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX} PATCH_SITES= https://gitlab.freedesktop.org/mesa/mesa/-/commit/ PATCHFILES+= 4a253aae7ca437201d2a31d2a11a1a5434fe41f1.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26284 PATCHFILES+= 7c565db35d39bdbf4e4f867ea19f78b97c8c126f.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27184 MAINTAINER= x11@FreeBSD.org LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR} LIB_DEPENDS+= libexpat.so:textproc/expat2 .if ${COMPONENT} != clover .if ${PORT_OPTIONS:MPLATFORM_X11} USES+= xorg .endif .endif .if ${COMPONENT} != osmesa LIB_DEPENDS+= libdrm.so:graphics/libdrm .endif USES+= compiler:c++11-lib bison meson pathfix pkgconfig \ python:build shebangfix tar:xz .if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # --build-id isn't supported by old GNU ld.bfd in base # Also ld.bfd have problems that seems related to --as-needed USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin .endif # only have one port to check with portscout. .if ${PORTNAME} != mesa-dri PORTSCOUT= ignore:1 .endif python_OLD_CMD= /usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ src/gallium/drivers/svga/svgadump/svga_dump.py \ src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ src/mesa/main/get_*.py src/util/format_srgb.py \ src/amd/*/*.py src/intel/genxml/gen_pack_header.py MASTERDIR= ${.CURDIR:H:H}/graphics/mesa-dri PATCHDIR= ${MASTERDIR}/files WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} DESCR= ${.CURDIR}/pkg-descr PLIST= ${.CURDIR}/pkg-plist PKGHELP= ${.CURDIR}/pkg-help PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall .include BINARY_ALIAS+= python3=${PYTHON_VERSION} CONFIGURE_ENV+= LLVM_CONFIG=${LLVM_CONFIG} # Deal with unclean env if the user have elfutils installed # and build the port directly without poudriere .if exists(${LOCALBASE}/include/libelf.h) LIB_DEPENDS+= libelf.so:devel/elfutils MESON_ARGS+= -Dlibelf=enabled .else MESON_ARGS+= -Dlibelf=disabled .endif # Some symbols in mesa's linker version scripts are not always defined, # depending on configuration options. Suppress errors with lld >= 17 due to # these undefined symbols. LDFLAGS+= -Wl,--undefined-version LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_VERSION}/lib MESON_ARGS+= -Dllvm=enabled \ -Dlibunwind=disabled 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,7 +1,7 @@ -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 SIZE (7c565db35d39bdbf4e4f867ea19f78b97c8c126f.patch) = 897 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 @@ -1,60 +1,64 @@ PORTNAME= clover PORTVERSION= ${MESAVERSION} CATEGORIES= lang COMMENT= Mesa OpenCL implementation for AMD GPUs WWW= https://dri.freedesktop.org/wiki/GalliumCompute/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst 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 USES= llvm:lib,max=16,noexport .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dplatforms="" \ -Dvulkan-drivers="" \ -Dandroid-libbacktrace=disabled \ -Dgallium-nine=false \ -Dgallium-omx=disabled \ -Dgallium-opencl=disabled \ -Dgallium-va=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-xa=disabled \ -Dgles1=disabled \ -Dgles2=disabled \ -Dmicrosoft-clc=disabled \ -Dopengl=false \ -Dglx=disabled \ -Degl=disabled \ -Dgbm=disabled \ -Dtools="" \ -Dxlib-lease=disabled \ -Dlmsensors=disabled \ -Dvalgrind=disabled \ -Dgallium-opencl=icd \ -Dgallium-drivers=r600,radeonsi LDFLAGS_i386= -Wl,-znotext +CONFIGURE_ENV+= PKG_CONFIG_PATH="${LLVM_PREFIX}/libdata/pkgconfig" + .include "${MASTERDIR}/Makefile.targets" pre-patch: @if [ -e ${LOCALBASE}/bin/llvm-config${LLVM_VERSION} ] && \ ! [ -e ${LOCALBASE}/bin/clang${LLVM_VERSION} ]; then \ ${ECHO_MSG} "Your llvm${LLVM_VERSION} is not built with clang support, which is required."; \ ${FALSE}; \ fi .include