commit: 23a2be9419901f1bb14ad0d507b84cd94d786175 Author: Marek Szuba <marecki <AT> gentoo <DOT> org> AuthorDate: Wed Jul 3 14:55:59 2019 +0000 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> CommitDate: Wed Jul 3 16:11:41 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23a2be94
dev-util/spirv-llvm-translator: bump to version 8.0.1-1 and EAPI-7 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> Package-Manager: Portage-2.3.66, Repoman-2.3.11 dev-util/spirv-llvm-translator/Manifest | 1 + .../spirv-llvm-translator-8.0.1.1.ebuild | 65 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/dev-util/spirv-llvm-translator/Manifest b/dev-util/spirv-llvm-translator/Manifest index 336d1277a9f..88a049877b4 100644 --- a/dev-util/spirv-llvm-translator/Manifest +++ b/dev-util/spirv-llvm-translator/Manifest @@ -1,2 +1,3 @@ DIST spirv-llvm-translator-8.0.0.1-LowerOpenCL_new_block_representation.patch.xz 10108 BLAKE2B 96492a7d3ab25e1fe837ced225d50c7450595af52bc3aa6c17e02dc08c1cccaf7ca8dc5949da17da7cc6ea5fcae8688a5994a50bb7693a52493520e57981bc48 SHA512 574ca7b7fe054e82ee154556555e2d184f102faa7da08ce9d6ca5d2ca37463c7a86b3861b93969f9c886544551af8c8f95e57363ea017f7fc426b56d97eb7cf2 DIST spirv-llvm-translator-8.0.0.1.tar.gz 437384 BLAKE2B bca52bfec04d0adc08b00f5fdbcb6cf953be00f835d2a393545e77bd8776063ef91e8fb62c232b50cbeab58a0a01bea6e47b89c1756699bf35481e87823995de SHA512 85faf176d1ce79d19f10c88055f4a102a5952dcdcd6709e5e5cfdbf69eb958d51020a3ad34198c7c874b42ee8e318f1ce3169ea92853134dfff3dc5843f84414 +DIST spirv-llvm-translator-8.0.1.1.tar.gz 451282 BLAKE2B 6c1a5f7b9d280b040a48d987304f11c743180cb53d7068705a5be2c66a5235fd04344e31e3538cded1e9c5bce81155e00089de65b2b8baceebe54598a1305dd3 SHA512 b0e06b967caecf9b47921e7df1fef42c5c112ccf7962888c6e2f34358e9c27acb4a549cd855625fc942c4a6bcf0e5992e4c7e4d40ff962115733fc8901d04bcc diff --git a/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.1.1.ebuild b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.1.1.ebuild new file mode 100644 index 00000000000..cbf22d71b61 --- /dev/null +++ b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.1.1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-multilib flag-o-matic llvm + +MY_PN="SPIRV-LLVM-Translator" +MY_PV="$(ver_rs 3 -)" +MY_P="${MY_PN}-${MY_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${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="UoI-NCSA" +SLOT="8" +KEYWORDS="~amd64" +IUSE="test" + +S="${WORKDIR}/${MY_P}" + +COMMON="sys-devel/llvm:8=[${MULTILIB_USEDEP}]" +DEPEND="${COMMON} + test? ( dev-python/lit )" +RDEPEND="${COMMON}" + +LLVM_MAX_SLOT=8 + +PATCHES=( + "${FILESDIR}"/${PN}-8.0.0.1-no_pkgconfig_files.patch +) + +src_prepare() { + append-flags -fPIC + cmake-utils_src_prepare +} + +multilib_src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix)" + $(usex test "-DLLVM_INCLUDE_TESTS=ON" "") + ) + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile llvm-spirv +} + +multilib_src_install() { + cmake-utils_src_install + # CMake does not install the executable so do it by hand + if multilib_is_native_abi; then + exeinto "$(get_llvm_prefix)"/bin + doexe "${BUILD_DIR}"/tools/llvm-spirv/llvm-spirv + fi +} + +multilib_src_test() { + # TODO: figure out why 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 +}