diff --git a/graphics/libosmesa/Makefile b/graphics/libosmesa/Makefile index 6b1f54b3efc0..21a6cd84ebd3 100644 --- a/graphics/libosmesa/Makefile +++ b/graphics/libosmesa/Makefile @@ -1,53 +1,57 @@ PORTNAME= libosmesa PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Off-Screen Mesa implementation of the OpenGL API WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst LIB_DEPENDS+= libglapi.so:graphics/mesa-libs USES= llvm:lib,noexport xorg USE_XORG= xorgproto USE_LDCONFIG= yes .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" # Disable some options MESON_ARGS+= -Dgallium-drivers="swrast" \ -Dvulkan-drivers="" \ -Dplatforms="" \ -Dandroid-libbacktrace=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ -Dgallium-va=disabled \ -Dgallium-opencl=disabled \ -Dgallium-xa=disabled \ -Dgallium-nine=false \ -Dgles1=disabled \ -Dgles2=disabled \ -Dglvnd=disabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dopengl=true \ -Dglx=disabled \ -Degl=disabled \ -Dgbm=disabled \ -Dtools="" \ -Dvalgrind=disabled \ -Dxlib-lease=disabled \ -Dzstd=disabled LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dosmesa=true +.if ${ARCH} != amd64 +MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 +.endif + post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include/GL ${INSTALL_DATA} ${WRKSRC}/include/GL/osmesa.h \ ${STAGEDIR}${PREFIX}/include/GL .include diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile index 415780f9d683..20f3b32d5fe5 100644 --- a/graphics/mesa-dri/Makefile +++ b/graphics/mesa-dri/Makefile @@ -1,138 +1,139 @@ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ WWW= https://www.mesa3d.org/ BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} LIB_DEPENDS+= libglapi.so:graphics/mesa-libs USES+= llvm:lib,noexport OPTIONS_DEFINE= ZSTD OPTIONS_GROUP= GALLIUM PLATFORM VULKAN OPTIONS_DEFAULT= WAYLAND X11 ZSTD OPTIONS_SUB= yes ZSTD_DESC= Use ZSTD for shader cache ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_MESON_ENABLED= zstd OPTIONS_GROUP_PLATFORM= X11 WAYLAND X11_DESC= Enable X11 support for GBM/EGL WAYLAND_DESC= Enable Wayland support for GBM/EGL and Vulkan WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland OPTIONS_GROUP_GALLIUM= crocus i915 iris panfrost r300 r600 radeonsi svga swrast zink GALLIUM_DESC= Unified OpenGL drivers crocus_DESC= Intel GPU Gen4 (Broadwater) to Gen7 (Haswell) i915_DESC= Intel GPU Gen3 (Grantsdale to Pineview) iris_DESC= Intel GPU Gen8 (Broadwell) and newer iris_BUILD_DEPENDS= libclc>0:devel/libclc \ spirv-tools>0:graphics/spirv-tools \ spirv-llvm-translator-${LLVM_PORT:T}>0:devel/spirv-llvm-translator@${LLVM_PORT:T} iris_RUN_DEPENDS= spirv-tools>0:graphics/spirv-tools \ spirv-llvm-translator-${LLVM_PORT:T}>0:devel/spirv-llvm-translator@${LLVM_PORT:T} iris_CONFIGURE_ENV= PKG_CONFIG_PATH="${LLVM_PREFIX}/libdata/pkgconfig" iris_IMPLIES= SPIRV panfrost_DESC= ARM Midgard and Bifrost r300_DESC= AMD/ATI R300, R400 and R500 r600_DESC= AMD/ATI R600, R700, Evergreen, Northern Islands radeonsi_DESC= AMD/ATI Southern Islands and newer svga_DESC= VMWare Virtual GPU swrast_DESC= Software Rasterizer zink_DESC= OpenGL on top of Khronos’ Vulkan API OPTIONS_EXCLUDE+= ${ARCH:Marmv7:C/.+/crocus i915 iris panfrost r300 r600 radeonsi svga zink/} OPTIONS_EXCLUDE+= ${ARCH:Naarch64:C/.+/panfrost/} OPTIONS_EXCLUDE+= ${ARCH:Namd64:Ni386:Nx86_64:C/.+/crocus i915 iris svga/} MESON_ARGS+= -Dgallium-drivers=${GALLIUM_DRIVERS:ts,} . for _gd in ${OPTIONS_GROUP_GALLIUM} OPTIONS_DEFAULT+= ${_gd} ${_gd}_VARS+= GALLIUM_DRIVERS+=${_gd} . endfor OPTIONS_GROUP_VULKAN= anv radv swrast_vk VULKAN_DESC= Vulkan drivers anv_DESC= Intel GPU Gen9 and newer Vulkan support anv_BUILD_DEPENDS= glslangValidator:graphics/glslang \ libclc>0:devel/libclc \ spirv-tools>0:graphics/spirv-tools \ spirv-llvm-translator-${LLVM_PORT:T}>0:devel/spirv-llvm-translator@${LLVM_PORT:T} anv_RUN_DEPENDS= spirv-tools>0:graphics/spirv-tools \ spirv-llvm-translator-${LLVM_PORT:T}>0:devel/spirv-llvm-translator@${LLVM_PORT:T} anv_CONFIGURE_ENV= PKG_CONFIG_PATH="${LLVM_PREFIX}/libdata/pkgconfig" +anv_MESON_ON= ${"${ARCH:Mamd64}":?:-Dintel-rt=disabled} # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 radv_DESC= AMD/ATI Southern Islands and newer Vulkan support radv_BUILD_DEPENDS= glslangValidator:graphics/glslang swrast_vk_DESC= Software Rasterizer Vulkan support OPTIONS_EXCLUDE+= ${ARCH:Marmv7:C/.+/anv radv/} OPTIONS_EXCLUDE+= ${ARCH:Namd64:Ni386:Nx86_64:C/.+/anv/} MESON_ARGS+= -Dvulkan-drivers=${VULKAN_DRIVERS:ts,} . for _vd in ${OPTIONS_GROUP_VULKAN} OPTIONS_DEFAULT+= ${_vd} ${_vd}_VARS+= VULKAN_DRIVERS+=${_vd:S/anv/intel/:S/radv/amd/:S/swrast_vk/swrast/} . endfor .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" LDFLAGS_i386= -Wl,-znotext .if ${PORT_OPTIONS:MX11} MESA_PLATFORMS+= x11 USE_XORG+= xcb xorgproto xrandr x11 xdamage xext xfixes xshmfence xv .else MESON_ARGS+= -Dxlib-lease=disabled .endif .if ${PORT_OPTIONS:MWAYLAND} MESA_PLATFORMS+= wayland .endif MESON_ARGS+= -Dplatforms="${MESA_PLATFORMS:ts,:tl}" # Vulkan Video extensions (keep in sync with mesa-gallium-va) MESON_ARGS+= -Dvideo-codecs="vc1dec,h264dec,h264enc,h265dec,h265enc,av1dec,av1enc,vp9dec" # Disable some options MESON_ARGS+= -Dandroid-libbacktrace=disabled \ -Dgallium-xa=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-va=disabled \ -Dgles1=enabled \ -Dgles2=enabled \ -Dglvnd=disabled \ -Dglx=disabled \ -Degl=enabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dvalgrind=disabled .for _gd in ${OPTIONS_GROUP_GALLIUM} . if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}} PLIST_SUB+= ${_gd}="" . else PLIST_SUB+= ${_gd}="@comment " . endif .endfor PLIST_SUB += ARCH=${ARCH:S/amd/x86_/} .for _vd in ${OPTIONS_GROUP_VULKAN} . if defined(VULKAN_DRIVERS) && ${VULKAN_DRIVERS:M${_vd}} PLIST_SUB+= ${_vd}="" . else PLIST_SUB+= ${_vd}="@comment " . endif .endfor post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL ${INSTALL_DATA} ${FILESDIR}/01-freebsd.conf \ ${STAGEDIR}${PREFIX}/share/drirc.d .include diff --git a/graphics/mesa-gallium-va/Makefile b/graphics/mesa-gallium-va/Makefile index af651b16f606..2c00d8195f86 100644 --- a/graphics/mesa-gallium-va/Makefile +++ b/graphics/mesa-gallium-va/Makefile @@ -1,63 +1,67 @@ PORTNAME= mesa-gallium-va PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Mesa Gallium VAAPI drivers WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware BUILD_DEPENDS= libva>=0:multimedia/libva LIB_DEPENDS= libzstd.so:archivers/zstd USES= llvm:lib,noexport OPTIONS_DEFINE= X11 OPTIONS_DEFAULT= X11 X11_DESC= Enable X11 support X11_USES= xorg X11_USE= xorg=xorgproto,x11,xcb,xdamage,xext,xfixes,xshmfence,xxf86vm,xrandr .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dvideo-codecs="vc1dec,h264dec,h264enc,h265dec,h265enc,av1dec,av1enc,vp9dec" \ -Dgallium-drivers="radeonsi,r600" \ -Dvulkan-drivers="" \ -Dandroid-libbacktrace=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ -Dgallium-xa=disabled \ -Dgallium-opencl=disabled \ -Dgallium-nine=false \ -Dgbm=disabled \ -Dgles1=disabled \ -Dgles2=disabled \ -Dglvnd=disabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dvalgrind=disabled \ -Dglx=disabled \ -Ddri3=enabled LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dgallium-va=enabled +.if ${ARCH} != amd64 +MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 +.endif + .if ${PORT_OPTIONS:MX11} MESON_ARGS+= -Dplatforms="x11" .else MESON_ARGS+= -Dglx=disabled \ -Degl=disabled \ -Dopengl=false \ -Dshared-glapi=disabled \ -Dxlib-lease=disabled \ -Dplatforms="" .endif .include diff --git a/graphics/mesa-gallium-vdpau/Makefile b/graphics/mesa-gallium-vdpau/Makefile index fd7b0930a1d0..8ad6ca75cfb5 100644 --- a/graphics/mesa-gallium-vdpau/Makefile +++ b/graphics/mesa-gallium-vdpau/Makefile @@ -1,61 +1,65 @@ PORTNAME= mesa-gallium-vdpau PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Mesa Gallium VDPAU drivers WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware BUILD_DEPENDS= libvdpau>=0:multimedia/libvdpau LIB_DEPENDS= libzstd.so:archivers/zstd USES= llvm:lib,noexport OPTIONS_DEFINE= X11 OPTIONS_DEFAULT= X11 X11_DESC= Enable X11 support X11_USES= xorg X11_USE= xorg=xorgproto,x11,xcb,xdamage,xext,xfixes,xshmfence,xxf86vm,xrandr .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dgallium-drivers="r600,radeonsi" \ -Dvulkan-drivers="" \ -Dandroid-libbacktrace=disabled \ -Dgallium-va=disabled \ -Dgallium-omx=disabled \ -Dgallium-xa=disabled \ -Dgallium-opencl=disabled \ -Dgallium-nine=false \ -Dgbm=disabled \ -Dgles1=disabled \ -Dgles2=disabled \ -Dglvnd=disabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dvalgrind=disabled \ -Dglx=disabled \ -Ddri3=enabled LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dgallium-vdpau=enabled +.if ${ARCH} != amd64 +MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 +.endif + .if ${PORT_OPTIONS:MX11} MESON_ARGS+= -Dplatforms="x11" .else MESON_ARGS+= -Dglx=disabled \ -Degl=disabled \ -Dopengl=false \ -Dshared-glapi=disabled \ -Dplatforms="" .endif .include diff --git a/graphics/mesa-gallium-xa/Makefile b/graphics/mesa-gallium-xa/Makefile index 59c61d00add7..3d09f7ab433a 100644 --- a/graphics/mesa-gallium-xa/Makefile +++ b/graphics/mesa-gallium-xa/Makefile @@ -1,47 +1,51 @@ PORTNAME= mesa-gallium-xa PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Mesa Gallium XA state tracker WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= used only by VMware supported architectures USES= llvm:lib,noexport xorg USE_XORG= xorgproto .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dgallium-drivers="svga" \ -Dvulkan-drivers="" \ -Dplatforms="" \ -Dandroid-libbacktrace=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ -Dgallium-va=disabled \ -Dgallium-opencl=disabled \ -Dgallium-nine=false \ -Degl=disabled \ -Dgbm=disabled \ -Dgles1=disabled \ -Dgles2=disabled \ -Dglx=disabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dopengl=false \ -Dshared-glapi=disabled \ -Dosmesa=false \ -Dvalgrind=disabled \ -Dglvnd=disabled \ -Dxlib-lease=disabled LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dgallium-xa=enabled +.if ${ARCH} != amd64 +MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 +.endif + .include diff --git a/graphics/mesa-libs/Makefile b/graphics/mesa-libs/Makefile index 79d721335f8f..1ac08aefc48b 100644 --- a/graphics/mesa-libs/Makefile +++ b/graphics/mesa-libs/Makefile @@ -1,79 +1,83 @@ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst USES= llvm:noexport BUILD_DEPENDS= libglvnd>=0:graphics/libglvnd OPTIONS_GROUP= PLATFORM OPTIONS_GROUP_PLATFORM= X11 WAYLAND X11_DESC= Enable X11 support for GBM/EGL WAYLAND_DESC= Enable Wayland support for GBM/EGL WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-server.so:graphics/wayland OPTIONS_DEFINE= ZSTD OPTIONS_DEFAULT= WAYLAND X11 ZSTD OPTIONS_SUB= yes ZSTD_DESC= Use ZSTD for shader cache ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_MESON_ENABLED= zstd USE_LDCONFIG= yes .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dandroid-libbacktrace=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ -Dgallium-va=disabled \ -Dgallium-xa=disabled \ -Dgallium-nine=false \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dtools="" \ -Dvalgrind=disabled \ -Degl=enabled \ -Dgbm=enabled \ -Dvulkan-drivers="" \ -Dglvnd=enabled # Building EGL and GBM requires a driver so add r300 MESON_ARGS+= -Dgallium-drivers="r300" .if ${PORT_OPTIONS:MX11} MESA_PLATFORMS+= x11 USE_XORG+= xorgproto x11 xcb xdamage xext \ xfixes xshmfence xxf86vm xrandr PLIST_SUB+= GLX="" .else MESON_ARGS+= -Dglx=disabled -Dxlib-lease=disabled PLIST_SUB+= GLX="@comment " .endif .if ${PORT_OPTIONS:MWAYLAND} MESA_PLATFORMS+= wayland .endif MESON_ARGS+= -Dplatforms="${MESA_PLATFORMS:ts,:tl}" +.if ${ARCH} != amd64 +MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 +.endif + .if ${ARCH} == "i386" # PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set LDFLAGS+=-Wl,-z,notext .endif post-install: # Fallback if GLX_EXT_libglvnd is missing or vendor library doesn't exist @${ECHO_CMD} "libGLX_indirect.so.0 libGLX_mesa.so.0" \ >${STAGEDIR}${PREFIX}/etc/libmap.d/mesa.conf .include diff --git a/lang/clover/Makefile b/lang/clover/Makefile index ac29c174dbed..fd68336056f7 100644 --- a/lang/clover/Makefile +++ b/lang/clover/Makefile @@ -1,63 +1,67 @@ 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 \ -Dglvnd=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" +.if ${ARCH} != amd64 +MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 +.endif + 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