[Bug 238906] graphics/mesa-dri: Allow building without LLVM

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 22 Feb 2025 21:41:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238906

--- Comment #24 from Helge Oldach <freebsd@oldach.net> ---
Keep in mind mesa-dri wants mesa-libs which has USES=llvm:noexport.

For my specific graphic card model I have only X11 and swrast enabled and
everything else off (for mesa-libs and mesa-dri). Since this PR got closed 5
years ago, I've been fine with below tweak. I think it would suite the
RPi4/aarch64 case likewise?



diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile
index be54794d3a73..f60286a54d24 100644
--- a/graphics/mesa-dri/Makefile
+++ b/graphics/mesa-dri/Makefile
@@ -10,8 +10,6 @@ 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
diff --git a/graphics/mesa-dri/Makefile.common
b/graphics/mesa-dri/Makefile.common
index a97e27012721..2e7dafb0835c 100644
--- a/graphics/mesa-dri/Makefile.common
+++ b/graphics/mesa-dri/Makefile.common
@@ -77,5 +77,5 @@ MESON_ARGS+=  -Dlibelf=disabled
 LDFLAGS+=      -Wl,--undefined-version

 LDFLAGS+=      -Wl,-rpath=${LOCALBASE}/llvm${LLVM_VERSION}/lib
-MESON_ARGS+=   -Dllvm=enabled \
+MESON_ARGS+=   -Dllvm=disabled \
                -Dlibunwind=disabled
diff --git a/graphics/mesa-libs/Makefile b/graphics/mesa-libs/Makefile
index 7ffe5201b2a5..4c99f446a048 100644
--- a/graphics/mesa-libs/Makefile
+++ b/graphics/mesa-libs/Makefile
@@ -9,8 +9,6 @@ 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

-- 
You are receiving this mail because:
You are the assignee for the bug.