dev-util/mesa_clc: Version bump to 25.2.0

Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
Matt Turner
2025-08-06 13:19:02 -04:00
parent 5251e7a5db
commit 53bcac0ca8
2 changed files with 124 additions and 0 deletions

View File

@@ -7,3 +7,4 @@ DIST mesa-25.1.7.tar.xz 47151188 BLAKE2B 262de8d329e275a819e0e57378e0b538fd39b21
DIST mesa-25.2.0-rc1.tar.xz 43438880 BLAKE2B d71a16f5a5e3450e7e504039209a131438b5eadf0549713681ad2eaffe2b7aeff51b552c91a04fd682ea90b284bf15ccba62f19abe85a6303e30bd04636b6e07 SHA512 40e397bec45280c71db3bbe5bb1d3470b9a6475596b67b39653a9751d6d10087335b32499158e7b025a1ca057247880b8fb3b8a0e072d26a74c9a5af0313fecd
DIST mesa-25.2.0-rc2.tar.xz 43452840 BLAKE2B 01e4f93837c9d3823c7d286a2d2e101abea03314b75ffb3f570e07db375c7321f4ebbd9c63d70fd707a928258e30a6a2bc04a7ddd18205d086c4352e4d0646c3 SHA512 dcfefc104d32964dd52adee8d0a53fe0e1a144d5e02afb3ed1aae6a46b34bd28b7245becdf70abec46337e2581a3a86ba447650cd53adf9cfea9f04dd43159d1
DIST mesa-25.2.0-rc3.tar.xz 43474864 BLAKE2B bddbe28148c6ca481da39f1eaa9615f61067860413ff1abd86c39e4991b947a0115adb64e5eadb6b0ac7ecb457ee9510752c6179064f6b78d17911f9eb6cf001 SHA512 321262c5624805198ab2d3bd35ff2c7bdffa611d5aff1eeac2f4e2d347bebb7749e1c08e95ec820bbf811904d27d723d2047dbdff8e4983186c3b0eeb0b5bc29
DIST mesa-25.2.0.tar.xz 43549344 BLAKE2B 9473c68e890992a4d88430da5896b7d209461fe0a8150909a179ed25229541e516744db09ff3f18ce38892270fe59a456569b850ccf2cc3d7b26efe0a9895d2d SHA512 f36e4f9f619becfc89f9cf3704d21f5f1532f1e658808fd30c0edce8c28cd65dc6578a21333e896aa5eaccf09da99efd9127a8d3d46681e8360f618cf63bab94

View File

@@ -0,0 +1,123 @@
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( {18..20} )
PYTHON_COMPAT=( python3_{11..14} )
inherit llvm-r1 meson python-any-r1
MY_PV="${PV/_/-}"
DESCRIPTION="mesa_clc tool used for building OpenCL C to SPIR-V"
HOMEPAGE="https://mesa3d.org/"
if [[ ${PV} == 9999 ]]; then
S="${WORKDIR}/mesa_clc-${MY_PV}"
EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
inherit git-r3
else
S="${WORKDIR}/mesa-${MY_PV}"
SRC_URI="https://archive.mesa3d.org/mesa-${MY_PV}.tar.xz"
KEYWORDS="~amd64 ~arm64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
VIDEO_CARDS="asahi panfrost"
for card in ${VIDEO_CARDS}; do
IUSE_VIDEO_CARDS+=" video_cards_${card}"
done
IUSE="${IUSE_VIDEO_CARDS} debug"
RDEPEND="
dev-util/spirv-tools
$(llvm_gen_dep '
dev-util/spirv-llvm-translator:${LLVM_SLOT}
llvm-core/clang:${LLVM_SLOT}=
=llvm-core/libclc-${LLVM_SLOT}*
llvm-core/llvm:${LLVM_SLOT}=
')
"
DEPEND="${RDEPEND}
dev-libs/expat
>=sys-libs/zlib-1.2.8:=
x11-libs/libdrm
"
BDEPEND="
${PYTHON_DEPS}
$(python_gen_any_dep "
>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
dev-python/packaging[\${PYTHON_USEDEP}]
dev-python/pyyaml[\${PYTHON_USEDEP}]
")
virtual/pkgconfig
"
python_check_deps() {
python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" || return 1
}
pkg_setup() {
llvm-r1_pkg_setup
python-any-r1_pkg_setup
}
src_configure() {
tools_enable video_cards_asahi asahi
tools_enable video_cards_panfrost panfrost
tools_list() {
local tools="$(sort -u <<< "${1// /$'\n'}")"
echo "${tools//$'\n'/,}"
}
PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
use debug && EMESON_BUILDTYPE=debug
local emesonargs=(
-Dllvm=enabled
-Dshared-llvm=enabled
-Dmesa-clc=enabled
-Dinstall-mesa-clc=true
-Dprecomp-compiler=enabled
-Dinstall-precomp-compiler=true
-Dtools=$(tools_list "${TOOLS[*]}")
-Dgallium-drivers=''
-Dvulkan-drivers=''
# Set platforms empty to avoid the default "auto" setting. If
# platforms is empty meson.build will add surfaceless.
-Dplatforms=''
-Dglx=disabled
-Dlibunwind=disabled
-Dzstd=disabled
-Db_ndebug=$(usex debug false true)
)
meson_src_configure
}
src_install() {
dobin "${BUILD_DIR}"/src/compiler/clc/mesa_clc
dobin "${BUILD_DIR}"/src/compiler/spirv/vtn_bindgen2
use video_cards_asahi && dobin "${BUILD_DIR}"/src/asahi/clc/asahi_clc
use video_cards_panfrost && dobin "${BUILD_DIR}"/src/panfrost/clc/panfrost_compile
}
# $1 - VIDEO_CARDS flag (check skipped for "--")
# other args - names of tools to enable
tools_enable() {
if [[ $1 == -- ]] || use $1; then
shift
TOOLS+=("$@")
fi
}