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>
This commit is contained in:
Benda Xu
2021-01-21 19:42:19 +08:00
parent 21458c9061
commit 48672742eb
3 changed files with 66 additions and 0 deletions

1
sci-libs/hipCUB/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST hipCUB-4.0.0.tar.gz 137513 BLAKE2B b7ef4d53037fba04771162ae8993def648f5e1401654286ffc6987bbb4b25baa1b1b14bc37035e1afe46eeffe3e564f244e339cdfd0e5a242574d248bf4683db SHA512 e778b94c86e09bf3b0bc043fb15ed8725387b875e8631a7e8599aee8da2d8085190effc9681d742fc0d286cc0c20762341f1f24699c8a52e9734611c716530d5

View File

@@ -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
}

View File

@@ -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>