summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2019-10-07 13:13:12 +0100
committerMarek Szuba <marecki@gentoo.org>2019-10-07 13:22:43 +0100
commitedfe01afc3718d43fd5c00dd9aefa56416a84898 (patch)
treef1f792e8acf630341e5ad7cf0580a6b54c4b33e2 /dev-libs/opencl-clang
parentdev-util/spirv-llvm-translator: remove old (diff)
downloadgentoo-edfe01afc3718d43fd5c00dd9aefa56416a84898.tar.gz
gentoo-edfe01afc3718d43fd5c00dd9aefa56416a84898.tar.bz2
gentoo-edfe01afc3718d43fd5c00dd9aefa56416a84898.zip
dev-libs/opencl-clang: 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. Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-libs/opencl-clang')
-rw-r--r--dev-libs/opencl-clang/opencl-clang-8.0.1_p20191001-r1.ebuild36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-libs/opencl-clang/opencl-clang-8.0.1_p20191001-r1.ebuild b/dev-libs/opencl-clang/opencl-clang-8.0.1_p20191001-r1.ebuild
new file mode 100644
index 000000000000..616cb77c650d
--- /dev/null
+++ b/dev-libs/opencl-clang/opencl-clang-8.0.1_p20191001-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib llvm vcs-snapshot
+
+EGIT_COMMIT="94af090661d7c953c516c97a25ed053c744a0737"
+
+DESCRIPTION="OpenCL-oriented thin wrapper library around clang"
+HOMEPAGE="https://github.com/intel/opencl-clang"
+SRC_URI="https://github.com/intel/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="UoI-NCSA"
+SLOT="8"
+KEYWORDS="~amd64"
+
+BDEPEND="dev-vcs/git"
+COMMON="sys-devel/clang:8=[static-analyzer,${MULTILIB_USEDEP}]"
+DEPEND="${COMMON}
+ dev-util/spirv-llvm-translator:8=[${MULTILIB_USEDEP}]"
+RDEPEND="${COMMON}"
+
+LLVM_MAX_SLOT=8
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.0-clang_library_dir.patch
+)
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
+ -DCLANG_LIBRARY_DIRS="${EPREFIX}"/usr/lib/clang
+ )
+ cmake-utils_src_configure
+}