commit:     48672742eb366fef64bc71f896e618d31bc3bfa4
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 11:42:19 2021 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun Jan 24 07:45:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48672742

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 <AT> gmail.com>
Suggested-by: Wilfried Holzke <gentoo <AT> holzke.net>
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 sci-libs/hipCUB/Manifest               |  1 +
 sci-libs/hipCUB/hipCUB-4.0.0-r1.ebuild | 47 ++++++++++++++++++++++++++++++++++
 sci-libs/hipCUB/metadata.xml           | 18 +++++++++++++
 3 files changed, 66 insertions(+)

diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest
new file mode 100644
index 00000000000..e81dcfbc89c
--- /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 00000000000..922c5df9c8a
--- /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 00000000000..bc384a7a870
--- /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>s...@gentoo.org</email>
+  </maintainer>
+  <maintainer type="person">
+    <email>candr...@gentoo.org</email>
+    <name>Craig Andrews</name>
+  </maintainer>
+  <maintainer type="person">
+    <email>gen...@holzke.net</email>
+    <name>Wilfried Holzke</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">ROCm-Developer-Tools/hipCUB</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to