summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2021-01-21 19:42:19 +0800
committerBenda Xu <heroxbd@gentoo.org>2021-01-24 15:45:42 +0800
commit48672742eb366fef64bc71f896e618d31bc3bfa4 (patch)
tree1a34576d8bd2b37eec546ecf5a5b9a84354fb70c /sci-libs
parentsci-libs/rocThrust: ROCm backend for Thrust. (diff)
downloadgentoo-48672742eb366fef64bc71f896e618d31bc3bfa4.tar.gz
gentoo-48672742eb366fef64bc71f896e618d31bc3bfa4.tar.bz2
gentoo-48672742eb366fef64bc71f896e618d31bc3bfa4.zip
sci-libs/hipCUB: wrapper library of rocPRIM or CUB.
Bug: https://bugs.gentoo.org/650804 Bug: https://github.com/gentoo/gentoo/pull/10724 Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Suggested-by: Wilfried Holzke <gentoo@holzke.net> Package-Manager: Portage-3.0.12, Repoman-3.0.1 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/hipCUB/Manifest1
-rw-r--r--sci-libs/hipCUB/hipCUB-4.0.0-r1.ebuild47
-rw-r--r--sci-libs/hipCUB/metadata.xml18
3 files changed, 66 insertions, 0 deletions
diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest
new file mode 100644
index 000000000000..e81dcfbc89c2
--- /dev/null
+++ b/sci-libs/hipCUB/Manifest
@@ -0,0 +1 @@
+DIST hipCUB-4.0.0.tar.gz 137513 BLAKE2B b7ef4d53037fba04771162ae8993def648f5e1401654286ffc6987bbb4b25baa1b1b14bc37035e1afe46eeffe3e564f244e339cdfd0e5a242574d248bf4683db SHA512 e778b94c86e09bf3b0bc043fb15ed8725387b875e8631a7e8599aee8da2d8085190effc9681d742fc0d286cc0c20762341f1f24699c8a52e9734611c716530d5
diff --git a/sci-libs/hipCUB/hipCUB-4.0.0-r1.ebuild b/sci-libs/hipCUB/hipCUB-4.0.0-r1.ebuild
new file mode 100644
index 000000000000..922c5df9c8ab
--- /dev/null
+++ b/sci-libs/hipCUB/hipCUB-4.0.0-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="A thin wrapper library on top of rocPRIM or CUB"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipCUB"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/hipCUB/archive/rocm-${PV}.tar.gz -> hipCUB-${PV}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64"
+SLOT="0"
+
+RDEPEND="=dev-util/hip-$(ver_cut 1-2)*
+ =sci-libs/rocPRIM-${PV}*"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/hipCUB-rocm-${PV}"
+
+src_prepare() {
+ sed -e "/PREFIX hipcub/d" \
+ -e "/DESTINATION/s:hipcub/include/:include/:" \
+ -e "/rocm_install_symlink_subdir(hipcub)/d" \
+ -e "/<INSTALL_INTERFACE/s:hipcub/include/:include/hipcub/:" -i hipcub/CMakeLists.txt || die
+
+ sed -e "s:\${ROCM_INSTALL_LIBDIR}:\${CMAKE_INSTALL_LIBDIR}:" -i cmake/ROCMExportTargetsHeaderOnly.cmake || die
+
+ eapply_user
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Grant access to the device
+ addwrite /dev/kfd
+ addpredict /dev/dri/
+
+ # Compiler to use
+ export CXX=hipcc
+
+ local mycmakeargs=(
+ -DBUILD_TEST=OFF
+ )
+
+ cmake_src_configure
+}
diff --git a/sci-libs/hipCUB/metadata.xml b/sci-libs/hipCUB/metadata.xml
new file mode 100644
index 000000000000..bc384a7a870c
--- /dev/null
+++ b/sci-libs/hipCUB/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>gentoo@holzke.net</email>
+ <name>Wilfried Holzke</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCm-Developer-Tools/hipCUB</remote-id>
+ </upstream>
+</pkgmetadata>