summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Henke <Jan.Henke@taujhe.de>2021-12-23 21:46:21 +0100
committerSam James <sam@gentoo.org>2021-12-27 01:35:56 +0000
commit12d9888238882ab0e9e0285664e488656f842424 (patch)
tree824b45d2bcb0773508630fc2896dc3cf3f608eea /dev-util/spirv-llvm-translator
parentprofiles/base: mask broken sci-libs/flann[doc] (diff)
downloadgentoo-12d9888238882ab0e9e0285664e488656f842424.tar.gz
gentoo-12d9888238882ab0e9e0285664e488656f842424.tar.bz2
gentoo-12d9888238882ab0e9e0285664e488656f842424.zip
dev-util/spirv-llvm-translator: Version bump (13.0.0)
Besides bumping the matching LLVM version, this version requires the upstream SPIRV header files, so an additonal CMAKE argument is required to point to the installed headers (and they are a new build time dependency). LLVM eclass sadly does not support EAPI 8 yet, so this ebuild remains at 7. Closes: https://bugs.gentoo.org/829845 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Jan Henke <Jan.Henke@taujhe.de> Closes: https://github.com/gentoo/gentoo/pull/23485 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/spirv-llvm-translator')
-rw-r--r--dev-util/spirv-llvm-translator/Manifest2
-rw-r--r--dev-util/spirv-llvm-translator/spirv-llvm-translator-13.0.0.ebuild60
2 files changed, 62 insertions, 0 deletions
diff --git a/dev-util/spirv-llvm-translator/Manifest b/dev-util/spirv-llvm-translator/Manifest
index d57d8a32e3ff..cb2ec4d8a7b7 100644
--- a/dev-util/spirv-llvm-translator/Manifest
+++ b/dev-util/spirv-llvm-translator/Manifest
@@ -1,2 +1,4 @@
DIST spirv-llvm-translator-11.1.0_pre20210212.tar.gz 702962 BLAKE2B 0c46b898e2d6c293b1db7b4aa65af7830869329cebc35e930b73f98dc038ae50d6adbdd9c6951e2ad427982d2a565c0925ecd056105cc37222b0d8ce7eb2e43b SHA512 3b8503be3ad65422f59ddbfd715a913dd6dab9416a14aea9e6a6793b2c959edaaab5433a3e253ee84c0b3644024a1f8a6b563af65e7aaad209c5f51e524cc96b
DIST spirv-llvm-translator-12.0.0.tar.gz 1378222 BLAKE2B 059409364403316f84521e231bc14cade2875c2b914acea95619b0920ae4f13babb26411b20fead1d7a028320fa3aea637d087d869759cb23e3266753b5b2f46 SHA512 c23ef81802d2bf743564762815d7375a804bdf8029efd7430faea0b48b5e30a9778c1175f52309b522a07aadf8ff77461b912c1fb3b95af9b09273a483eac82a
+DIST spirv-llvm-translator-13.0.0-rename-OpConstFunctionPointerINTEL.patch.bz2 3632 BLAKE2B b2c3ed9ff1040fef12cd5b7962c71f2e52febbf1e1d1d06bee079093940c32e67f7c246c92876207f296677bd655f91447d0ce837f191cd0d4cfb66adfb11a62 SHA512 bba6a9b838ebf0bd29f5fa906fefcecdb1b3832b15ac1af8a1ed86da0e988385172b1a51468a4d8d97352c4a57c3e224f12d7e24b7a202a38353e2dbd3a2c27c
+DIST spirv-llvm-translator-13.0.0.tar.gz 1436324 BLAKE2B 254450f153a0f0d7c0a75005705f4a7d90effa1e6bcde0d6b931195e4a925ddc34896e66b686c55583d50ab99a9e1e45ad1c0600f7fa4eaa2039642460e9b711 SHA512 1ce7a38c2c3447249e19d50063a7a2acf32699905572950e4f102d8ce1680785433035154b7b55782d5a56211a50e042aef775836f37c33fe847b347a02b5a04
diff --git a/dev-util/spirv-llvm-translator/spirv-llvm-translator-13.0.0.ebuild b/dev-util/spirv-llvm-translator/spirv-llvm-translator-13.0.0.ebuild
new file mode 100644
index 000000000000..6c354c4cd277
--- /dev/null
+++ b/dev-util/spirv-llvm-translator/spirv-llvm-translator-13.0.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+
+inherit cmake-multilib flag-o-matic llvm
+
+MY_PN="SPIRV-LLVM-Translator"
+MY_P="${MY_PN}-${PV}"
+
+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/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-rename-OpConstFunctionPointerINTEL.patch.bz2"
+
+LICENSE="UoI-NCSA"
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64"
+IUSE="test +tools"
+
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="sys-devel/clang:${SLOT}=[${MULTILIB_USEDEP}]
+ dev-util/spirv-headers"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( dev-python/lit )"
+
+REQUIRED_USE="test? ( tools )"
+
+LLVM_MAX_SLOT="${SLOT}"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-rename-OpConstFunctionPointerINTEL.patch
+)
+
+src_prepare() {
+ append-flags -fPIC
+ cmake_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
+ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="${BROOT}/usr/include/spirv"
+ -DLLVM_BUILD_TOOLS=$(usex tools "ON" "OFF")
+ -DLLVM_SPIRV_INCLUDE_TESTS=$(usex test "ON" "OFF")
+ )
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # Some tests fail on amd64 when ABI==x86
+ if multilib_is_native_abi; then
+ lit "${BUILD_DIR}/test" || die "Error running tests for ABI ${ABI}"
+ fi
+}