dev-util/spirv-llvm-translator: Add 22.0.0_pre20251107

llvm-core/libclc no longer builds against 21.x.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2025-11-08 10:40:16 +01:00
parent b3b85a326e
commit 13b18ecda1
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
2 changed files with 69 additions and 0 deletions

View File

@ -1,3 +1,4 @@
DIST SPIRV-LLVM-Translator-8ef804541897a80384ae8aaaf0265ef014d0d747.tar.gz 1858936 BLAKE2B 6bc6a075054acde99724b4bb83903098ca4da4f896fe082c8cb8f2cc51044b3c0dbbf4e14b87d6df1de237bb46c77d9b0bed2555032ab29638ee717f581fd71a SHA512 f88315a4ff3ecbcf2108295ae73d891b45ac3867c9a24e1de855a113d59148a41fe03fc76886aa284738c4d01d92f52a51d410078fe501e4da4e1650919f91b2
DIST spirv-headers-01e0577914a75a2569c846778c2f93aa8e6feddd.tar.gz 545892 BLAKE2B 7e6e0b6e0963a983e89c5f54e99c8013c6a4f491c87440aedb3bf747ef4e99f14bb0e2a85d67570531dcb536d39b94dbbe7459f8f8d0209eca929d66d50eb03b SHA512 e2b90e95b6f492e640cd27c090d7072f0d03c8fc7382be67cbe176fc8f3fdd78b59f5f0b906198e09808fde645427f409cb9ab8fe4843de7f7dc5b510d454a0a
DIST spirv-llvm-translator-15.0.15.tar.gz 1635429 BLAKE2B 821cd883481c63263b57b0fbf97776174e3e1f939639c4b83c244afdfcb0c06a73f829b56388f0f52eb2215fe4c04e96bc6ec24926947d055c5d9534cf5f470e SHA512 5f80d57ac61f5ed634bd8e967a1f365e27849555a39e5ca86cfbee0bbce80d8da05fec96b78d91bb7a5026da6c088e9b70593067aecb6b0fe4ce8e2fb2d749be
DIST spirv-llvm-translator-15.0.17.tar.gz 1654324 BLAKE2B 10226173ee596719a7eac7aa0b0eea5a0f919934602a68933357e71560088fd31e589d9428f6353d296d49c165c8cec0b7477a328966eedae3cefd36d58e07a3 SHA512 b997857b6d0f696729034ccc47f024f6db47c495178bd441f5658ae50f57cefdec7d3219ce1c2392f53b7729a43e7ca0161b030b727bc08562b6c173b32091a1

View File

@ -0,0 +1,68 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
HASH_SPIRV="01e0577914a75a2569c846778c2f93aa8e6feddd"
LLVM_COMPAT=( 22 )
MY_PN="SPIRV-LLVM-Translator"
EGIT_COMMIT=8ef804541897a80384ae8aaaf0265ef014d0d747
MY_P=${MY_PN}-${EGIT_COMMIT}
inherit cmake-multilib flag-o-matic llvm-r2 multiprocessing
DESCRIPTION="Bi-directional translator between SPIR-V and LLVM IR"
HOMEPAGE="https://github.com/KhronosGroup/SPIRV-LLVM-Translator"
SRC_URI="
https://github.com/KhronosGroup/${MY_PN}/archive/${EGIT_COMMIT}.tar.gz
-> ${MY_P}.tar.gz
https://github.com/KhronosGroup/SPIRV-Headers/archive/${HASH_SPIRV}.tar.gz
-> spirv-headers-${HASH_SPIRV}.tar.gz
"
S="${WORKDIR}/${MY_P}"
LICENSE="UoI-NCSA"
SLOT="$(ver_cut 1)"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-util/spirv-tools[${MULTILIB_USEDEP}]
llvm-core/llvm:${SLOT}=[${MULTILIB_USEDEP}]
"
# We need to use currently newer spirv-headers, as stable release is too old..
# DEPEND="${RDEPEND}
# >=dev-util/spirv-headers-1.4.313.0
# "
BDEPEND="
virtual/pkgconfig
test? (
dev-python/lit
llvm-core/clang:${SLOT}
)
"
src_prepare() {
append-flags -fPIC
cmake_src_prepare
# do not force a specific LLVM version to find_package(), this only
# causes issues and we force a specific path anyway
sed -i -e '/find_package/s:${BASE_LLVM_VERSION}::' CMakeLists.txt || die
}
multilib_src_configure() {
local mycmakeargs=(
-DCCACHE_ALLOWED="OFF"
-DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix)"
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="${WORKDIR}/SPIRV-Headers-${HASH_SPIRV}"
-DLLVM_SPIRV_INCLUDE_TESTS=$(usex test "ON" "OFF")
-Wno-dev
)
cmake_src_configure
}
multilib_src_test() {
lit -vv "-j${LIT_JOBS:-$(makeopts_jobs)}" "${BUILD_DIR}/test" || die
}