You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.5 KiB
63 lines
1.5 KiB
4 years ago
|
# Copyright 1999-2020 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
|
||
|
|
||
|
EGIT_COMMIT="4f1a3270f2431aa98f1bff30d1a32c9d8f4729bf"
|
||
|
MY_PN="SPIRV-LLVM-Translator"
|
||
|
MY_P="${MY_PN}-${EGIT_COMMIT}"
|
||
|
|
||
|
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 -> ${P}.tar.gz"
|
||
|
|
||
|
LICENSE="UoI-NCSA"
|
||
|
SLOT="10"
|
||
|
KEYWORDS="~amd64"
|
||
|
IUSE="test tools"
|
||
|
|
||
|
# I have yet to see a non-release spirv-llvm-translator ebuild pass ANY tests.
|
||
|
# This is probably something silly like the test suite expecting different
|
||
|
# directory names but I really can't be bothered to debug VCS snapshots.
|
||
|
RESTRICT="test"
|
||
|
|
||
|
S="${WORKDIR}/${MY_P}"
|
||
|
|
||
|
COMMON="sys-devel/clang:10=[${MULTILIB_USEDEP}]"
|
||
|
DEPEND="${COMMON}"
|
||
|
RDEPEND="${COMMON}"
|
||
|
BDEPEND="test? ( dev-python/lit )"
|
||
|
|
||
|
REQUIRED_USE="test? ( tools )"
|
||
|
|
||
|
LLVM_MAX_SLOT=10
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${PN}-8.0.0.1-no_pkgconfig_files.patch
|
||
|
)
|
||
|
|
||
|
src_prepare() {
|
||
|
append-flags -fPIC
|
||
|
cmake_src_prepare
|
||
|
}
|
||
|
|
||
|
multilib_src_configure() {
|
||
|
local mycmakeargs=(
|
||
|
-DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
|
||
|
-DLLVM_BUILD_TOOLS=$(usex tools "ON" "OFF")
|
||
|
$(usex test "-DLLVM_INCLUDE_TESTS=ON" "")
|
||
|
)
|
||
|
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
|
||
|
}
|