From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4E631138334 for ; Mon, 7 Oct 2019 12:23:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1E3B0E0809; Mon, 7 Oct 2019 12:23:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 012CEE0809 for ; Mon, 7 Oct 2019 12:23:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A8EF934B9D0 for ; Mon, 7 Oct 2019 12:23:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 36FA57FF for ; Mon, 7 Oct 2019 12:23:10 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1570450956.a0eaa982a9810a52b839aadc6768daaad482fd37.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/spirv-llvm-translator/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.1.2-r1.ebuild X-VCS-Directories: dev-util/spirv-llvm-translator/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: a0eaa982a9810a52b839aadc6768daaad482fd37 X-VCS-Branch: master Date: Mon, 7 Oct 2019 12:23:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d6daf12e-6efa-4554-b64d-f2e780942363 X-Archives-Hash: 36be9936f3e5156dfd95a92804b95ec3 commit: a0eaa982a9810a52b839aadc6768daaad482fd37 Author: Marek Szuba gentoo org> AuthorDate: Mon Oct 7 12:09:14 2019 +0000 Commit: Marek Szuba gentoo org> CommitDate: Mon Oct 7 12:22:36 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0eaa982 dev-util/spirv-llvm-translator: pass $LLVM_MAX_SLOT to get_llvm_prefix() When invoked without max_slot, get_llvm_prefix() iterates over *all* LLVM slots known to llvm.eclass - including those exceeding LLVM_MAX_SLOT. As a consequence, an ebuild can e.g. end up getting installed into llvm:9 directories in spite of having been linked against llvm:8. Closes: https://bugs.gentoo.org/696048 Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Marek Szuba gentoo.org> .../spirv-llvm-translator-8.0.1.2-r1.ebuild | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.1.2-r1.ebuild b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.1.2-r1.ebuild new file mode 100644 index 00000000000..c65c717bbfa --- /dev/null +++ b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.1.2-r1.ebuild @@ -0,0 +1,55 @@ +# 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 tools" + +S="${WORKDIR}/${MY_P}" + +COMMON="sys-devel/clang:8=[${MULTILIB_USEDEP}]" +DEPEND="${COMMON} + test? ( dev-python/lit )" +RDEPEND="${COMMON}" + +REQUIRED_USE="test? ( tools )" + +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 ${LLVM_MAX_SLOT})" + -DLLVM_BUILD_TOOLS=$(usex tools "ON" "OFF") + $(usex test "-DLLVM_INCLUDE_TESTS=ON" "") + ) + cmake-utils_src_configure +} + +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 +}