Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Justin Boffemmyer (94f9fa07b7288b04415bb5c9d3943d86f47d2f2d)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Justin Boffemmyer (94f9fa07b7288b04415bb5c9d3943d86f47d2f2d)
  • Date: Sun, 19 Jan 2025 15:18:06 +0000

GIT changes to master grimoire by Justin Boffemmyer <flux AT sourcemage.org>:

ChangeLog | 4
MESON_FUNCTIONS | 46 +++++++++
graphics-libs/mesa/BUILD | 123 +++++++++++++++++++-----
graphics-libs/mesa/CONFIGURE | 219
++++++++++++++++++++++++++++++++-----------
graphics-libs/mesa/DEPENDS | 206 +++++++++++++++++++++++++++-------------
graphics-libs/mesa/DETAILS | 52 +++++-----
graphics-libs/mesa/HISTORY | 7 +
7 files changed, 486 insertions(+), 171 deletions(-)

New commits:
commit 94f9fa07b7288b04415bb5c9d3943d86f47d2f2d
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

graphics-libs/mesa: fix and supplement build options

Correct and update build options and dependencies to match what is
in the upstream build system.

commit f45b9d72307182a96f5034162c4f48e8e2b9315c
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

MESON_FUNCTIONS: add meson_opt() function

Implement a new meson_opt() function to automatically convert from
config_query* values to the required meson option values, coupled with
the meson option name. This function modifies the value of OPT and is
meant to only be called from BUILD.

diff --git a/ChangeLog b/ChangeLog
index e0e7376..70485f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2025-01-19 Justin Boffemmyer <flux AT sourcemage.org>
+ * MESON_FUNCTIONS: new function, meson_opt(), for converting
+ config_query* values into meson option values in BUILD
+
2025-01-19 Treeve Jelbert <treeve AT sourcemage.org>
* libs/upower-suspend: delete obsolete, unused spell
* gnome2-libs/devicekit-power: delete obsolete, unused spell
diff --git a/MESON_FUNCTIONS b/MESON_FUNCTIONS
index e9c0f35..57c6ee8 100755
--- a/MESON_FUNCTIONS
+++ b/MESON_FUNCTIONS
@@ -57,6 +57,52 @@ meson_install () {
DESTDIR="${INSTALL_ROOT}/" ${MESON_INSTALL} ${MESON_OPTS}
}

+#---------------------------------------------------------------------
+## Converts from y/n or list values to meson build options.
+##
+## @param setting_type (boolean, feature, list/array, or choice/combo,
+## defaults to feature)
+## @param setting_name
+## @param setting_value
+##
+## Note: this function automatically sets OPT. This function should
+## only be called from BUILD.
+#---------------------------------------------------------------------
+meson_opt() {
+ local name
+ local result
+ local type="$1"
+ case "$type" in
+ bool|boolean|feature|list|array|choice|combo)
+ name="$2"
+ shift 2
+ ;;
+ *)
+ type="feature"
+ name="$1"
+ shift 1
+ ;;
+ esac
+ case "$type" in
+ bool|boolean)
+ case "${1:-n}" in
+ y) result="true" ;;
+ n) result="false" ;;
+ esac
+ ;;
+ feature)
+ case "${1:-n}" in
+ y) result="enabled" ;;
+ n) result="disabled" ;;
+ esac
+ ;;
+ list|array|choice|combo)
+ result="${@// /,}"
+ ;;
+ esac
+ OPTS="$OPTS $name=$result"
+}
+
default_build() {
meson_build
}
diff --git a/graphics-libs/mesa/BUILD b/graphics-libs/mesa/BUILD
index 8c3e3fa..7aa93c1 100755
--- a/graphics-libs/mesa/BUILD
+++ b/graphics-libs/mesa/BUILD
@@ -5,36 +5,111 @@
# circumstances, and works with reduced performance where initial-exec
# prevents loading altogether. This is accompanied by a patch removing
the
# use of initial-exec and the related asm stubs.
-CFLAGS+=" -mtls-dialect=gnu2" &&
+CFLAGS="$CFLAGS -mtls-dialect=gnu2" &&
case "$HOST" in
-*-gnu) ;;
-*)
- local unportable=(intel intel-ui)
- message "${PROBLEM_COLOR}WARNING:$DEFAULT_COLOR" \
- "Disabling non-portable tools: ${unportable[*]}"
- MESA_TOOLS=" ${MESA_TOOLS} "
- for i in "${unportable[@]}"; do
- MESA_TOOLS="${MESA_TOOLS// $i / }"
- done
- MESA_TOOLS="${MESA_TOOLS# }"
- MESA_TOOLS="${MESA_TOOLS% }"
- ;;
+ *-gnu) ;;
+ *)
+ local unportable=(intel intel-ui)
+ message "${PROBLEM_COLOR}WARNING:$DEFAULT_COLOR" \
+ "Disabling non-portable tools: ${unportable[*]}"
+ MESA_TOOLS=" ${MESA_TOOLS} "
+ for i in "${unportable[@]}"; do
+ MESA_TOOLS="${MESA_TOOLS// $i / }"
+ done
+ MESA_TOOLS="${MESA_TOOLS## }"
+ MESA_TOOLS="${MESA_TOOLS%% }"
+ ;;
esac &&

-if is_depends_enabled "${SPELL}" libva &&
- ! list_find "${MESA_VA_CODECS}" "none"; then
- OPTS+=" video-codecs=${MESA_VA_CODECS// /,}"
+local link_llvm_shared
+case "$MESA_LINK_LLVM_SHARED" in
+ shared) link_llvm_shared="y" ;;
+ static) link_llvm_shared="n" ;;
+esac
+
+meson_opt list "platforms" "$MESA_PLATFORMS" &&
+
+meson_opt boolean "amd-use-llvm" "$MESA_AMD_LLVM" &&
+meson_opt boolean "draw-use-llvm" "$MESA_DRAW_LLVM" &&
+meson_opt feature "egl" "$MESA_EGL" &&
+meson_opt boolean "gallium-nine" "$MESA_GALLIUM_D3D9" &&
+meson_opt boolean "gallium-d3d10umd" "$MESA_GALLIUM_D3D10" &&
+meson_opt feature "gallium-d3d12-graphics" "$MESA_GALLIUM_D3D12_PIPELINE" &&
+meson_opt feature "gallium-d3d12-video" "$MESA_GALLIUM_D3D12_VIDEO" &&
+meson_opt boolean "gallium-extra-hud" "$MESA_GALLIUM_HUD" &&
+meson_opt feature "gallium-opencl" "$MESA_OPENCL" &&
+meson_opt boolean "gallium-rusticl" "$MESA_RUSTICL" &&
+meson_opt feature "gallium-xa" "$MESA_GALLIUM_XA" &&
+meson_opt feature "gbm" "$MESA_GBM" &&
+meson_opt feature "gles1" "$MESA_GLES1" &&
+meson_opt feature "gles2" "$MESA_GLES23" &&
+meson_opt feature "glvnd" "$MESA_GLVND" &&
+meson_opt choice "glx" "$MESA_GLX" &&
+meson_opt boolean "glx-direct" "$MESA_GLX_DIRECT" &&
+meson_opt boolean "glx-read-only-text" "$MESA_GLX_READONLY" &&
+meson_opt boolean "llvm-orcjit" "$MESA_LLVM_ORCJIT" &&
+meson_opt boolean "opencl-spirv" "$MESA_OPENCL_SPIRV" &&
+meson_opt boolean "opengl" "$MESA_OPENGL" &&
+meson_opt boolean "osmesa" "$MESA_OSMESA" &&
+meson_opt boolean "perfetto" "$MESA_PERFETTO" &&
+meson_opt boolean "gpuvis" "$MESA_GPUVIS" &&
+meson_opt feature "intel-rt" "$MESA_INTEL_RAYTRACE" &&
+meson_opt feature "shader-cache" "$MESA_SHADER_CACHE" &&
+meson_opt feature "shared-llvm" "$link_llvm_shared" &&
+meson_opt boolean "spirv-to-dxil" "$MESA_SPIRV_DXIL" &&
+meson_opt boolean "teflon" "$MESA_TEFLON" &&
+meson_opt feature "xlib-lease" "$MESA_XLIB_LEASE" &&
+meson_opt feature "xmlconfig" "$MESA_XMLCONFIG" &&
+
+if [ -z "$MESA_GALLIUM" ] || list_find "$MESA_GALLIUM" none ;then
+ meson_opt list "gallium-drivers" ""
+else
+ meson_opt list "gallium-drivers" "$MESA_GALLIUM"
+fi &&
+
+if [ -n "$MESA_RUSTICL_DRIVERS" ] ;then
+ meson_opt list "gallium-rusticl-enable-drivers" "$MESA_RUSTICL_DRIVERS"
+fi &&
+
+if [[ "$MESA_EGL" == y ]] && [ -n "$MESA_EGL_DEFAULT" ] ;then
+ meson_opt choice "egl-native-platform" "$MESA_EGL_DEFAULT"
+fi &&
+
+if [ -z "$MESA_LIBCLC_STATIC_LINK" ] || list_find "$MESA_LIBCLC_STATIC_LINK"
none ;then
+ meson_opt list "static-libclc" ""
+else
+ meson_opt list "static-libclc" "$MESA_LIBCLC_STATIC_LINK"
+fi &&
+
+if [ -n "$MESA_PERFETTO_SOURCES" ] ;then
+ meson_opt list "datasources" "$MESA_PERFETTO_SOURCES"
+fi &&
+
+if [ -z "$MESA_TOOLS" ] || list_find "$MESA_TOOLS" none ;then
+ meson_opt list "tools" ""
+else
+ meson_opt list "tools" "$MESA_TOOLS"
fi &&

-local vulkan=${MESA_VULKAN//none} &&
-local gallium=${MESA_GALLIUM//none} &&
+if [ -z "$MESA_VIDEO_CODECS" ] || list_find "$MESA_VIDEO_CODECS" none ;then
+ meson_opt list "video-codecs" ""
+else
+ meson_opt list "video-codecs" "$MESA_VIDEO_CODECS"
+fi &&

+if [ -z "$MESA_VULKAN" ] || list_find "$MESA_VULKAN" none ;then
+ meson_opt list "vulkan-drivers" ""
+else
+ meson_opt list "vulkan-drivers" "$MESA_VULKAN"
+fi &&

-OPTS+=" gallium-drivers=${gallium// /,} \
- vulkan-drivers=${vulkan// /,} \
- platforms=${MESA_EGL// /,} \
- glx=${MESA_GLX// /,} \
- tools=${MESA_TOOLS// /,} \
- $MESA_GLES1 $MESA_GLES2" &&
+if [ -z "$MESA_VULKAN_LAYERS" ] || list_find "$MESA_VULKAN_LAYERS" none ;then
+ meson_opt list "vulkan-layers" ""
+else
+ meson_opt list "vulkan-layers" "$MESA_VULKAN_LAYERS"
+fi &&

+OPTS="${OPTS// / }" &&
+OPTS="${OPTS## }" &&
+OPTS="${OPTS%% }" &&
default_build
diff --git a/graphics-libs/mesa/CONFIGURE b/graphics-libs/mesa/CONFIGURE
index 661ee34..54acee1 100755
--- a/graphics-libs/mesa/CONFIGURE
+++ b/graphics-libs/mesa/CONFIGURE
@@ -1,84 +1,193 @@
-persistent_remove MESALIB_OPTS &&
-persistent_remove MESALIB_VULKAN &&
-persistent_remove MESALIB_BUILD &&
-persistent_remove MESALIB_GALLIUM &&
-persistent_remove MESALIB_DRIVERS &&
-persistent_remove MESA_OSMESA &&
-persistent_remove MESA_DRI &&
-persistent_remove MESA_ARCH &&
-list_remove MESA_GLX "gallium-xlib" &&
-list_remove MESA_TOOLS "xvmc" &&
-
-# adjust some flags
-MESA_GLES1=${MESA_GLES1/true/enabled} &&
-MESA_GLES2=${MESA_GLES2/true/enabled} &&
-MESA_GLES1=${MESA_GLES1/false/disabled} &&
-MESA_GLES2=${MESA_GLES2/false/disabled} &&
-MESA_EGL=${MESA_EGL/drm/} &&
-MESA_VULKAN=${MESA_VULKAN/\-experimental/} &&
-
. "${GRIMOIRE}/config_query_multi.function" &&
. "${GRIMOIRE}/MESON_CONFIGURE" &&

-config_query_multi MESA_EGL "window systems to support,recommend x11" x11
wayland &&
+config_query_multi MESA_PLATFORMS "Which window systems to support?" \
+ auto \
+ wayland \
+ x11 \
+ &&
+
+config_query_multi MESA_DRM "Which libdrm hardware to use?" \
+ AMD \
+ INTEL \
+ NOUVEAU \
+ RADEON \
+ &&

-config_query_multi MESA_DRM "which libdrm hardware" AMD INTEL NOUVEAU RADEON
&&
# only suggest drivers for specified hardware
-local AVAILABLE_GALLIUM="svga swrast virgl zink" &&
-local AVAILABLE_VULKAN="swrast" &&
+local AVAILABLE_GALLIUM="d3d12 llvmpipe softpipe svga virgl zink" &&
+local AVAILABLE_VULKAN="swrast virtio" &&
if list_find "$MESA_DRM" AMD;then
- AVAILABLE_VULKAN="amd ${AVAILABLE_VULKAN}"
+ AVAILABLE_VULKAN="amd ${AVAILABLE_VULKAN}" &&
+ config_query MESA_AMD_LLVM "Use LLVM for the AMD drivers?" y
fi &&
if list_find "$MESA_DRM" RADEON;then
AVAILABLE_GALLIUM="r300 r600 radeonsi ${AVAILABLE_GALLIUM}"
fi &&
if list_find "$MESA_DRM" INTEL;then
AVAILABLE_GALLIUM="i915 iris crocus ${AVAILABLE_GALLIUM}" &&
- AVAILABLE_VULKAN="intel ${AVAILABLE_VULKAN}"
+ AVAILABLE_VULKAN="intel intel_hasvk ${AVAILABLE_VULKAN}"
fi &&
if list_find "$MESA_DRM" NOUVEAU;then
AVAILABLE_GALLIUM="nouveau ${AVAILABLE_GALLIUM}" &&
AVAILABLE_VULKAN="nouveau ${AVAILABLE_VULKAN}"
fi &&

-config_query_multi MESA_GLX "glx build types, recommend dri" disabled dri
xlib &&
+config_query_multi MESA_GALLIUM "Which gallium (accelerated) drivers to
build?" \
+ none \
+ all \
+ auto \
+ $(echo $AVAILABLE_GALLIUM | sort) \
+ &&
+
+if [ -n "$MESA_GALLIUM" ] && ! list_find "$MESA_GALLIUM" none ;then
+ config_query MESA_GALLIUM_HUD "Enable HUD block/NIC I/O HUD status
support?" n &&
+
+ local allow_xa
+ for driver in nouveau freedreno i915 svga ;do
+ if list_find "$MESA_GALLIUM" $driver ;then
+ allow_xa="y"
+ fi
+ done
+ if [[ "$allow_xa" == "y" ]] ;then
+ config_query MESA_GALLIUM_XA "Build gallium XA frontend?" n
+ fi &&
+
+ if list_find "$MESA_GALLIUM" llvmpipe || list_find "$MESA_GALLIUM"
softpipe ;then
+ config_query MESA_GALLIUM_D3D9 "Build gallium Direct3D9 (nine)
frontend?" n &&
+ config_query MESA_GALLIUM_D3D10 "Build gallium Direct3D10 (WDDM UMD)
frontend?" n
+ fi &&
+
+ if list_find "$MESA_GALLIUM" d3d12 ;then
+ config_query MESA_GALLIUM_D3D12_PIPELINE "Build gallium with Direct3D12
graphics pipeline support?" n &&
+ config_query MESA_GALLIUM_D3D12_VIDEO "Build gallium with Direct3D12
video support?" n
+ fi &&
+
+ config_query MESA_OPENCL "Build gallium OpenCL (clover) frontend?" n &&
+
+ if [[ "$MESA_OPENCL" == "y" ]] ;then
+ config_query MESA_OPENCL_SPIRV "Enable SPIR-V support in OpenCL (clover)
frontend?" n
+ fi &&
+
+ config_query MESA_RUSTICL "Build gallium rusticl frontend?" n &&
+
+ if [[ "$MESA_RUSTICL" == "y" ]] ;then
+ config_query_multi MESA_RUSTICL_DRIVERS "Which drivers to enable with
rusticl by default?" \
+ auto \
+ asahi
+ fi
+fi &&
+
+config_query_multi MESA_VULKAN "Which Vulkan drivers to build?" \
+ none \
+ all \
+ auto \
+ $(echo $AVAILABLE_VULKAN | sort) \
+ &&
+
+if [ -n "$MESA_VULKAN" ] && ! list_find "$MESA_VULKAN" none ;then
+ config_query_multi MESA_VULKAN_LAYERS "Which Vulkan layers to build?" \
+ none \
+ device-select \
+ intel-nullhw \
+ overlay \
+ screenshot \
+ &&
+
+ config_query MESA_XLIB_LEASE "Enable VK_EXT_acquire_xlib_display?" n
+fi &&
+
+config_query MESA_SHADER_CACHE "Support on-disk shader caching?" n &&
+
+# EGL requires DRI, which is only enabled if gallium is enabled
+if ! list_find "$MESA_GALLIUM" none ;then
+ config_query MESA_EGL "Enable EGL platform support?" n &&
+
+ if [[ "$MESA_EGL" == "y" ]] ;then
+ config_query_list MESA_EGL_DEFAULT "Which window system should EGL
assume for EGL_DEFAULT_DISPLAY" \
+ auto \
+ drm \
+ surfaceless \
+ wayland \
+ x11
+ fi
+fi &&
+
+config_query MESA_GLES1 "Support OpenGL ES 1.x?" n &&
+config_query MESA_GLES23 "Support OpenGL ES 2.x and 3.x?" n &&
+config_query MESA_OPENGL "Enable desktop OpenGL support?" y &&
+config_query MESA_GBM "Enable gbm platform support?" n &&
+config_query MESA_OSMESA "Build OSmesa to support off-screen rendering?" n &&
+
+config_query_list MESA_GLX "Which glx build type (auto or dri recommended)?"
\
+ auto \
+ disabled \
+ dri \
+ xlib \
+ &&
+
if list_find "${MESA_GLX}" "disabled"; then
MESA_GLX="disabled"
+else
+ config_query MESA_GLX_DIRECT "Enable direct rendering in GLX and EGL for
DRI?" y &&
+ config_query MESA_GLX_READONLY "Disable writable .text section on x86
(decreases performance)?" n
fi &&

-# Gallium support
-
-message "${MESSAGE_COLOR}If you want to enable VDPAU you have to select at
least one of the r300, r600,$DEFAULT_COLOR" &&
-message "${MESSAGE_COLOR}radeonsi or nouveau gallium
drivers:${DEFAULT_COLOR}" &&
-config_query_multi MESA_GALLIUM \
- "which gallium (accellerated) drivers to build" \
- none all $AVAILABLE_GALLIUM &&
-if list_find "$MESA_GALLIUM" all;then
- MESA_GALLIUM="$AVAILABLE_GALLIUM"
+if [[ "$MESA_EGL" == "y" ]] || ! list_find "$MESA_GLX" disabled ;then
+ config_query MESA_GLVND "Enable GLVND support?" n
fi &&

-# Vulkan support
-config_query_multi MESA_VULKAN \
- "which Vulkan drivers to build" \
- none all $AVAILABLE_VULKAN &&
-if list_find "$MESA_VULKAN" all; then
- MESA_VULKAN="$AVAILABLE_VULKAN"
+config_query MESA_SPIRV_DXIL "Build support for the SPIR-V to DXIL library?"
n &&
+
+config_query_multi MESA_TOOLS "Which tools to build?" \
+ none \
+ all \
+ dlclose-skip \
+ drm-shim \
+ etnaviv \
+ freedreno \
+ glsl \
+ intel \
+ intel-ui \
+ nir \
+ nouveau \
+ &&
+
+config_query MESA_PERFETTO "Enable performance analysis with Perfetto" n &&
+
+if [[ "${MESA_PERFETTO#perfetto=}" == "true" ]] ;then
+ config_query_multi MESA_PERFETTO_SOURCES "Perfetto datasources to build" \
+ auto \
+ intel
fi &&

-config_query_option MESA_GLES1 "support GLES1 - embedded systems" n
gles1=enabled gles1=disabled &&
-config_query_option MESA_GLES2 "support GLES2/3 - embedded systems" n
gles2=enabled gles2=disabled &&
+config_query MESA_TEFLON "Enable TensorFlow Lite delegate" n &&
+config_query MESA_GPUVIS "Enable tracing markers for gpuvis" n &&
+
+if list_find "$MESA_DRM" INTEL;then
+ config_query MESA_INTEL_RT "Build Intel raytracing support (on supported
hardware)?" n
+fi &&

-config_query_multi MESA_TOOLS "which tools to build" \
- etnaviv \
- freedreno \
- glsl \
- intel \
- intel-ui \
- nir \
- nouveau &&
+config_query_multi MESA_VIDEO_CODECS "Which codecs to build?" \
+ none \
+ all \
+ all_free \
+ av1dec \
+ av1enc \
+ h264dec \
+ h264enc \
+ h265dec \
+ h265enc \
+ vc1dec \
+ vp9dec \
+ &&

-config_query_multi MESA_OMX "OMax support" auto disabled tizonia bellagio
&&
+config_query MESA_XMLCONFIG "Enable custom xmlconfig (driconf) support
(requires expat)?" n &&

-# strip any leading spaces from the driver lists
-MESA_GALLIUM="${MESA_GALLIUM# }" &&
-MESA_VULKAN="${MESA_VULKAN# }"
+# strip any leading or trailing spaces from the driver lists
+MESA_GALLIUM="${MESA_GALLIUM## }" &&
+MESA_GALLIUM="${MESA_GALLIUM%% }" &&
+persistent_add MESA_GALLIUM &&
+MESA_VULKAN="${MESA_VULKAN## }" &&
+MESA_VULKAN="${MESA_VULKAN%% }" &&
+persistent_add MESA_VULKAN
diff --git a/graphics-libs/mesa/DEPENDS b/graphics-libs/mesa/DEPENDS
index 86a1be1..697206f 100755
--- a/graphics-libs/mesa/DEPENDS
+++ b/graphics-libs/mesa/DEPENDS
@@ -1,89 +1,161 @@
. "$GRIMOIRE"/VDEPENDS &&
. "${GRIMOIRE}/MESON_DEPENDS" &&
-depends -sub "CXX" gcc &&
-depends bison &&
-depends flex &&
-depends GETTEXT &&
-depends glslang &&
-depends -sub "$MESA_DRM" libdrm &&
-depends util-macros &&
-depends expat &&
-depends -sub "PYTHON3" mako &&
-
-depends nettle &&
-depends zlib &&
+. "${GRIMOIRE}/build_system_handler.function" &&
+. "${GRIMOIRE}/config_query_multi.function" &&

+buildsys_depends bison &&
+buildsys_depends flex &&
+buildsys_depends -sub "CXX" gcc
+buildsys_depends GETTEXT &&
+buildsys_depends glslang &&
+buildsys_depends -sub "$MESA_DRM" libdrm &&
+buildsys_depends -sub "PYTHON3" mako &&
+buildsys_depends nettle &&
+buildsys_depends util-macros &&
+
+if [[ "$MESA_BRANCH" == "scm" ]] ;then
+ buildsys_depends pyyaml &&
+ buildsys_depends git
+fi &&
+
+local need_llvm &&
local LLVM_SUB_DEPS &&
-if list_find "$MESA_GALLIUM" "nouveau"; then LLVM_SUB_DEPS="RTTI
${LLVM_SUB_DEPS}"; fi &&

-if (list_find "${MESA_GALLIUM}" "radeonsi") ||
- (list_find "$MESA_VULKAN" amd); then
- LLVM_SUB_DEPS="TARGET-AMDGPU ${LLVM_SUB_DEPS}" &&
- depends LIBELF
+if list_find "$MESA_GALLIUM" llvmpipe ;then
+ need_llvm="y" &&
+ config_query MESA_LLVM_ORCJIT "Build llvmpipe with LLVM ORCJIT support?" n
fi &&
-if [[ -z "${LLVM_SUB_DEPS}" ]]; then
- optional_depends llvm 'llvm=enabled' 'llvm=disabled' 'LLVM support'
-else
- depends -sub "${LLVM_SUB_DEPS# }" llvm "llvm=enabled"
+
+if list_find "$MESA_VULKAN" amd ;then
+ if "$MESA_AMD_LLVM" == "y" ]] ;then
+ need_llvm="y"
+ fi
fi &&

-if list_find "${MESA_VULKAN}" "nouveau"; then
- depends rust &&
- depends rust-bindgen
+if list_find "$MESA_GALLIUM" nouveau ;then
+ need_llvm="y" &&
+ LLVM_SUB_DEPS="RTTI $LLVM_SUB_DEPS"
fi &&

-if list_find "$MESA_GLX" dri;then
- depends libxext &&
- depends libxxf86vm &&
- depends libxfixes &&
- depends libxcb
+if list_find "$MESA_GALLIUM" radeonsi || list_find "$MESA_VULKAN" amd ;then
+ need_llvm="y" &&
+ LLVM_SUB_DEPS="TARGET-AMDGPU $LLVM_SUB_DEPS" &&
+ buildsys_depends LIBELF
fi &&
-if list_find "$MESA_EGL" "x11"; then
- depends libxdamage &&
- depends libx11 &&
- depends xorgproto &&
- depends libxshmfence &&
- depends libxrandr
+
+if list_find "$MESA_VULKAN" nouveau ;then
+ buildsys_depends rust &&
+ buildsys_depends rust-bindgen
fi &&
-if list_find "$MESA_EGL" wayland;then
- depends wayland &&
- depends wayland-protocols
+
+if list_find "$MESA_GLX" dri ;then
+ buildsys_depends libxext &&
+ buildsys_depends libxxf86vm &&
+ buildsys_depends libxfixes &&
+ buildsys_depends libxcb
fi &&

-if [[ "${MESA_BRANCH}" == "scm" ]]; then
- depends pyyaml &&
- depends git
+if list_find "$MESA_PLATFORMS" x11; then
+ buildsys_depends libxdamage &&
+ buildsys_depends libx11 &&
+ buildsys_depends xorgproto &&
+ buildsys_depends libxshmfence &&
+ buildsys_depends libxrandr
fi &&

-optional_depends libvdpau 'gallium-vdpau=enabled' 'gallium-vdpau=disabled'
'gallium vdpau state tracker' &&
-optional_depends libva 'gallium-va=enabled' 'gallium-va=disabled'
'gallium va state tracker' &&
-if is_depends_enabled "${SPELL}" libva; then
- . "${GRIMOIRE}/config_query_multi.function" &&
- config_query_multi MESA_VA_CODECS "Would you like to enable some patented
codecs?" \
- none all vc1dec h264dec h264enc h265dec
h265enc &&
- MESA_VA_CODECS="${MESA_VA_CODECS# }" &&
- if list_find "${MESA_VA_CODECS}" "all"; then
- MESA_VA_CODECS="vc1dec h264dec h264enc h265dec h265enc"
- fi
+if list_find "$MESA_PLATFORMS" wayland ;then
+ buildsys_depends wayland &&
+ buildsys_depends wayland-protocols
+fi &&
+
+if [[ "$MESA_GLVND" == "y" ]] ;then
+ vdepends <<< "libglvnd >= 1.3.2"
else
- persistent_remove MESA_VA_CODECS
+ buildsys_optional_depends smgl-gl_select \
+ "Allow switching among different OPENGL
providers"
fi &&
-#optional_depends libomxil 'gallium-omx=bellagio' 'gallium-omx=disabled'
'gallium omx bellagio state tracker' &&
-#optional_depends tizonia 'gallium-omx=tizonia' 'gallium-omx=disabled'
'gallium omx state tracker' &&
-#optional_depends libxa '' '' 'gallium xa state tracker' &&
-optional_depends lm_sensors "lmsensors=enabled" "lmsensors=disabled" "HUD
Sensor support" &&
-optional_depends valgrind "valgrind=enabled" "valgrind=disabled" "debugging"
&&
-optional_depends libunwind "libunwind=enabled" "libunwind=disabled" "for
stack-traces" &&
-optional_depends libselinux "selinux=true" "selinux=false" "SELinux-aware
Mesa" &&
-optional_depends libglvnd "glvnd=true" "glvnd=false" "enable GLVND support'"
&&
-optional_depends zstd "" "" "to compress disk cache" &&
-
-if is_depends_enabled "$SPELL" libglvnd; then
- vdepends <<< 'libglvnd >= 1.3.2 flags: glvnd=true'
+
+if list_find "$MESA_TOOLS" intel-ui ;then
+ buildsys_depends gtk+3
+fi &&
+
+if [[ "${need_llvm}" == "y" ]] ;then
+ if [ -n "$LLVM_SUB_DEPS" ] ;then
+ buildsys_depends -sub "${LLVM_SUB_DEPS## }" llvm -o llvm
+ else
+ buildsys_depends llvm -o llvm
+ fi
else
- optional_depends smgl-gl_select '' '' 'allow select OPENGL provider'
+ buildsys_optional_depends llvm -o llvm "Enable LLVM support"
+fi &&
+
+if is_depends_enabled "$SPELL" llvm ;then
+ config_query_multi MESA_LIBCLC_STATIC_LINK "Which libclc SPIR-V targets to
link statically?" \
+ none \
+ all \
+ spirv \
+ spirv64 \
+ &&
+ config_query_list MESA_LINK_LLVM_SHARED "How to link against LLVM (shared
recommended)?" \
+ shared \
+ static \
+ &&
+ if ! list_find "$MESA_GALLIUM" none ;then
+ config_query MESA_DRAW_LLVM "Use LLVM for the Gallium draw module?" y
+ fi
+fi &&
+
+local allow_va_and_vdpau
+for driver in r600 radeonsi nouveau d3d12 virgl ;do
+ if [[ "$driver" == "d3d12" ]] && [[ "$MESA_GALLIUM_D3D12_VIDEO" != "y" ]]
;then
+ continue
+ fi &&
+ if list_find "$MESA_GALLIUM" $driver ;then
+ allow_va_and_vdpau="y"
+ fi
+done
+
+if [[ "$allow_va_and_vdpau" == "y" ]] ;then
+ buildsys_optional_depends libvdpau \
+ -o gallium-vdpau \
+ "gallium vdpau state tracker" \
+ &&
+
+ buildsys_optional_depends libva \
+ -o gallium-va \
+ "gallium va state tracker"
+fi &&
+
+buildsys_optional_depends lm_sensors \
+ -o lmsensors \
+ "HUD Sensor support" \
+ &&
+
+buildsys_optional_depends libunwind \
+ -o libunwind \
+ "for stack-traces" \
+ &&
+
+buildsys_optional_depends valgrind \
+ -o valgrind \
+ "for debugging with valgrind" \
+ &&
+
+buildsys_optional_depends zstd \
+ -o zstd \
+ "Use ZSTD (over ZLIB) to build drivers" \
+ &&
+
+buildsys_optional_depends zlib \
+ -o zlib \
+ "Use ZLIB to build drivers" \
+ &&
+
+if [[ "$MESA_INTEL_RAYTRACE" == "y" ]] ;then
+ buildsys_depends python-ply
fi &&

-if list_find "$MESA_TOOLS" intel-ui;then
- depends gtk+3
+if [[ "$MESA_XMLCONFIG" == "y" ]] ;then
+ buildsys_depends expat &&
+ suggest_depends driconf "to create custom xmlconfig (driconf) files"
fi
diff --git a/graphics-libs/mesa/DETAILS b/graphics-libs/mesa/DETAILS
index 735d49a..31ab4da 100755
--- a/graphics-libs/mesa/DETAILS
+++ b/graphics-libs/mesa/DETAILS
@@ -1,40 +1,42 @@
-. "${GRIMOIRE}/FUNCTIONS"
-. "${GRIMOIRE}/MESON_FUNCTIONS"
- SPELL=mesa
+. "${GRIMOIRE}/FUNCTIONS" &&
+. "${GRIMOIRE}/MESON_FUNCTIONS" &&
+
+ SPELL=mesa
+SPELL_BUILD_SYSTEM=meson
if [[ "${MESA_BRANCH}" == "scm" ]]; then
- VERSION=$(get_scm_version)
- SOURCE="${SPELL}-git.tar.xz"
- FORCE_DOWNLOAD="on"
-
SOURCE_URL[0]="git_http://gitlab.freedesktop.org/${SPELL}/${SPELL}.git:${SPELL}-git:main";
- SOURCE_IGNORE="volatile"
-SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-git"
+ VERSION=$(get_scm_version)
+ SOURCE="${SPELL}-git.tar.xz"
+ FORCE_DOWNLOAD="on"
+
SOURCE_URL[0]="git_http://gitlab.freedesktop.org/${SPELL}/${SPELL}.git:${SPELL}-git:main";
+ SOURCE_IGNORE="volatile"
+ SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-git"
else
- VERSION="24.3.3"
-
SOURCE_HASH="sha256:105afc00a4496fa4d29da74e227085544919ec7c86bd92b0b6e7fcc32c7125f4:UPSTREAM_HASH"
- SOURCE=mesa-$VERSION.tar.xz
+ VERSION="24.3.3"
+
SOURCE_HASH="sha256:105afc00a4496fa4d29da74e227085544919ec7c86bd92b0b6e7fcc32c7125f4:UPSTREAM_HASH"
+ SOURCE="mesa-$VERSION.tar.xz"
# Watch: https://archive.mesa3d.org/ mesa-([0-9.]+)[.]tar
- SOURCE_URL[0]="https://mesa.freedesktop.org/archive/${SOURCE}";
-SOURCE_DIRECTORY="${BUILD_DIRECTORY}/mesa-${VERSION}"
+ SOURCE_URL[0]="https://mesa.freedesktop.org/archive/${SOURCE}";
+ SOURCE_DIRECTORY="${BUILD_DIRECTORY}/mesa-${VERSION}"
fi
- LICENSE[0]=GPL
- WEB_SITE=https://www.mesa3d.org/
- KEYWORDS="graphics libs"
- ENTERED=20171020
- SHORT="Mesa implementation of the OpenGL(TM) API"
+ LICENSE[0]="GPL"
+ WEB_SITE="https://www.mesa3d.org/";
+ KEYWORDS="graphics libs"
+ ENTERED=20171020
+ SHORT="Mesa implementation of the OpenGL(TM) API"
cat << EOF
-this is a complete rewrite of the original mesalib spell, using the meson
+this is a complete rewrite of the original mesalib spell, using the meson
build system

-The Mesa project began as an open-source implementation of the OpenGL
specification - a
+The Mesa project began as an open-source implementation of the OpenGL
specification - a
system for rendering interactive 3D graphics.

-Over the years the project has grown to implement more graphics APIs,
including OpenGL
+Over the years the project has grown to implement more graphics APIs,
including OpenGL
ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC and Vulkan.

-A variety of device drivers allows the Mesa libraries to be used in many
different
-environments ranging from software emulation to complete hardware
acceleration for
+A variety of device drivers allows the Mesa libraries to be used in many
different
+environments ranging from software emulation to complete hardware
acceleration for
modern GPUs.

-Mesa ties into several other open-source projects: the Direct Rendering
Infrastructure
+Mesa ties into several other open-source projects: the Direct Rendering
Infrastructure
and X.org to provide OpenGL support on Linux, FreeBSD and other operating
systems.
EOF
diff --git a/graphics-libs/mesa/HISTORY b/graphics-libs/mesa/HISTORY
index cfc38ca..9dc0e02 100644
--- a/graphics-libs/mesa/HISTORY
+++ b/graphics-libs/mesa/HISTORY
@@ -1,3 +1,10 @@
+2025-01-19 Justin Boffemmyer <flux AT sourcemage.org>
+ * BUILD: update llvm target sub-dependency naming, use meson_opt to
+ * CONFIGURE: update and complete to match current upstream options
+ * DEPENDS: update and correct dependencies, switch to buildsys for
+ * DETAILS: specify spell build system as meson
+ specify build options
+
2025-01-05 Justin Boffemmyer <flux AT sourcemage.org>
* DEPENDS: update llvm target sub-dependency naming



  • [[SM-Commit] ] GIT changes to master grimoire by Justin Boffemmyer (94f9fa07b7288b04415bb5c9d3943d86f47d2f2d), Justin Boffemmyer, 01/19/2025

Archive powered by MHonArc 2.6.24.

Top of Page