git: e313acaea33b - main - graphics/mesa: Unbreak on !amd64

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 22 Aug 2024 08:33:25 UTC
The branch main has been updated by manu:

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

commit e313acaea33b7ad94efcc4455d17d9284968cb68
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2024-08-22 07:40:14 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2024-08-22 08:33:24 +0000

    graphics/mesa: Unbreak on !amd64
    
    Disable intel-rt for all arches except amd64 as it's only supported there.
    
    PR:              280979
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
---
 graphics/libosmesa/Makefile          | 4 ++++
 graphics/mesa-dri/Makefile           | 1 +
 graphics/mesa-gallium-va/Makefile    | 4 ++++
 graphics/mesa-gallium-vdpau/Makefile | 4 ++++
 graphics/mesa-gallium-xa/Makefile    | 4 ++++
 graphics/mesa-libs/Makefile          | 4 ++++
 lang/clover/Makefile                 | 4 ++++
 7 files changed, 25 insertions(+)

diff --git a/graphics/libosmesa/Makefile b/graphics/libosmesa/Makefile
index 6b1f54b3efc0..21a6cd84ebd3 100644
--- a/graphics/libosmesa/Makefile
+++ b/graphics/libosmesa/Makefile
@@ -45,6 +45,10 @@ 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 \
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
@@ -65,6 +65,7 @@ anv_BUILD_DEPENDS=	glslangValidator:graphics/glslang \
 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
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
@@ -49,6 +49,10 @@ 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
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
@@ -48,6 +48,10 @@ 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
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
@@ -44,4 +44,8 @@ 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 <bsd.port.post.mk>
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
@@ -66,6 +66,10 @@ MESA_PLATFORMS+=	wayland
 
 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
diff --git a/lang/clover/Makefile b/lang/clover/Makefile
index ac29c174dbed..fd68336056f7 100644
--- a/lang/clover/Makefile
+++ b/lang/clover/Makefile
@@ -53,6 +53,10 @@ 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 \