summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-09-13 17:05:07 +0200
committerMarek Szuba <marecki@gentoo.org>2020-09-13 17:05:07 +0200
commitcbe8bf889cd37e279c43cd7bb67ef4612b6b91a5 (patch)
treedf0e92600676df0cda2facf977112839bfc8c9df /dev-libs/vc-intrinsics
parentdev-libs/opencl-clang: bump to 10.0.0.2 (diff)
downloadgentoo-cbe8bf889cd37e279c43cd7bb67ef4612b6b91a5.tar.gz
gentoo-cbe8bf889cd37e279c43cd7bb67ef4612b6b91a5.tar.bz2
gentoo-cbe8bf889cd37e279c43cd7bb67ef4612b6b91a5.zip
dev-libs/vc-intrinsics: new package
Required by recent versions of dev-util/intel-graphics-compiler Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-libs/vc-intrinsics')
-rw-r--r--dev-libs/vc-intrinsics/Manifest1
-rw-r--r--dev-libs/vc-intrinsics/files/vc-intrinsics-0_p20200904-cmake_libdir.patch21
-rw-r--r--dev-libs/vc-intrinsics/metadata.xml12
-rw-r--r--dev-libs/vc-intrinsics/vc-intrinsics-0_p20200904.ebuild62
4 files changed, 96 insertions, 0 deletions
diff --git a/dev-libs/vc-intrinsics/Manifest b/dev-libs/vc-intrinsics/Manifest
new file mode 100644
index 000000000000..72388dd5455e
--- /dev/null
+++ b/dev-libs/vc-intrinsics/Manifest
@@ -0,0 +1 @@
+DIST vc-intrinsics-0_p20200904.tar.gz 97118 BLAKE2B 7f1a4f0b3b5f8abba8972668877562fbc6835ce8cfa9e0b336541ee6db72ff1469917320b63dee7d193af89593bb318c9fcd000ba5e8d62df5729f69cfdcb9c7 SHA512 7b5f87dabcf1c093c50721390dba9c82a1f0da1a087d00af4bf1c2e080bffa531b8d16fe8faacfaeb4862b528929865263d0e84a5ebee6a76eef1436dc4e2ec9
diff --git a/dev-libs/vc-intrinsics/files/vc-intrinsics-0_p20200904-cmake_libdir.patch b/dev-libs/vc-intrinsics/files/vc-intrinsics-0_p20200904-cmake_libdir.patch
new file mode 100644
index 000000000000..694cb1e28562
--- /dev/null
+++ b/dev-libs/vc-intrinsics/files/vc-intrinsics-0_p20200904-cmake_libdir.patch
@@ -0,0 +1,21 @@
+--- a/GenXIntrinsics/CMakeLists.txt
++++ b/GenXIntrinsics/CMakeLists.txt
+@@ -52,15 +52,15 @@
+ # we need to limit it to external build
+ if(BUILD_EXTERNAL)
+ install(TARGETS LLVMGenXIntrinsics EXPORT LLVMGenXIntrinsicsTargets
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION ${TARGET_LIBDIR}
++ ARCHIVE DESTINATION ${TARGET_LIBDIR}
+ RUNTIME DESTINATION bin
+ INCLUDES DESTINATION include
+ )
+
+ install(EXPORT LLVMGenXIntrinsicsTargets
+ FILE LLVMGenXIntrinsicsConfig.cmake
+- DESTINATION lib/cmake/LLVMGenXIntrinsics
++ DESTINATION ${TARGET_LIBDIR}/cmake/LLVMGenXIntrinsics
+ )
+ endif() # BUILD_EXTERNAL
+ endif() # INSTALL_REQUIRED
diff --git a/dev-libs/vc-intrinsics/metadata.xml b/dev-libs/vc-intrinsics/metadata.xml
new file mode 100644
index 000000000000..ce94ad6317e7
--- /dev/null
+++ b/dev-libs/vc-intrinsics/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">intel/vc-intrinsics</remote-id>
+ </upstream>
+</pkgmetadata>
+
diff --git a/dev-libs/vc-intrinsics/vc-intrinsics-0_p20200904.ebuild b/dev-libs/vc-intrinsics/vc-intrinsics-0_p20200904.ebuild
new file mode 100644
index 000000000000..7ecd07659322
--- /dev/null
+++ b/dev-libs/vc-intrinsics/vc-intrinsics-0_p20200904.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+CMAKE_ECLASS=cmake
+
+inherit cmake-multilib llvm python-any-r1
+
+MY_PV="830067832d4af0fbd5710e9a45669a02fcfb7c3f"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="LLVM intrinsics representing SIMD semantics of a program targeting GPU"
+HOMEPAGE="https://github.com/intel/vc-intrinsics"
+SRC_URI="https://github.com/intel/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="10"
+KEYWORDS="~amd64"
+IUSE="test"
+
+LLVM_MAX_SLOT=10
+
+COMMON="sys-devel/llvm:10=[${MULTILIB_USEDEP}]"
+DEPEND="${COMMON}"
+RDEPEND="${COMMON}"
+BDEPEND="${PYTHON_DEPS}
+ test? ( dev-python/lit )"
+
+RESTRICT="!test? ( test )"
+
+DOCS=( Readme.md )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0_p20200904-cmake_libdir.patch
+)
+
+S="${WORKDIR}/${MY_P}"
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
+ -DLLVM_DIR="$(get_llvm_prefix ${LLVM_MAX_SLOT})"/$(get_libdir)/cmake/llvm
+ -DTARGET_LIBDIR=$(get_libdir)
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DVC_INTR_ENABLE_LIT_TESTS=ON
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}"/usr/bin/lit
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # These tests only work on native builds
+ if multilib_is_native_abi; then
+ cmake_build check-vc-intrinsics
+ fi
+}