commit:     097a991107b116e11b0b6c8cc6ec347f6ed64ed2
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Dec  9 09:43:41 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 21:46:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=097a9911

sci-libs/rocRAND: add 6.3.0

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/rocRAND/Manifest             |  1 +
 sci-libs/rocRAND/rocRAND-6.3.0.ebuild | 64 +++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)

diff --git a/sci-libs/rocRAND/Manifest b/sci-libs/rocRAND/Manifest
index 81980f21cb0e..40045361a8ce 100644
--- a/sci-libs/rocRAND/Manifest
+++ b/sci-libs/rocRAND/Manifest
@@ -3,3 +3,4 @@ DIST rocRAND-5.1.3.tar.gz 11729425 BLAKE2B 
f61aaedb7b72ceba3868a2069c93db1e2cd88
 DIST rocRAND-5.6.0.tar.gz 23189913 BLAKE2B 
2418a90c323f483d1f92630df7134bc060b9052f580259924e79680a7ec37857574973dda69dc3c28fdd5b88a5fc1d29757ed637fcde0730c53b9a5f09668aba
 SHA512 
cccd26a6b80a7705644803a85dad3a43de3f4e2f73f964f2b5aa410f71d3782b68d6cc1ad60b7f7be5193a94098ed3fa25cad30c3acbc141522cdd738d3328a5
 DIST rocRAND-5.7.1.tar.gz 23189653 BLAKE2B 
c70ab6f3b718c2430394f63b93bee15fa72daae704883fdb203b98b0dc4763b46bc27886af64c48bf4ebe8da9b919158b8cd346f70f9b76bf0492ce3b2c1e20e
 SHA512 
4d74bce9fbd3cb45e3f057d38df747270c6986fea7ad524f7a88109b6a53a4ea5dcd60d4bbf2364888501e9444245fb6898bb79fccad0e37b61e819e8c4ed863
 DIST rocRAND-6.1.1.tar.gz 26683143 BLAKE2B 
4108584c6372adbf2f9ef887cf1aa08f5afdfa489ba0739d247e693628f3e23978fe023c2896e7bff666b8822b0011fd3f635338b013898f8d76b3f31ec21f6c
 SHA512 
d8df0e6bf843719e59434c952ef56b112ada23d0c226bec9f2974ed762500202ac809f495de61a4086289e35c2f4b670f4ed7dcd7092a158c0a731c368950a44
+DIST rocRAND-6.3.0.tar.gz 44906536 BLAKE2B 
204ba943ba840d78dfc7a69f762dca270f7cb9633dcb9f47df0832958b0c6bf279b0154539c01d0a6037aed9c8ec38edbd566fc102410687d188ff7299d23515
 SHA512 
aa8f6abc798ac1b24908ec5ef45b38bc63ee79ccf7c333b42f16cb0155f22d1fea34753e61de93a4eaf485457124f23626dd79d35021e3e896bff915a2722455

diff --git a/sci-libs/rocRAND/rocRAND-6.3.0.ebuild 
b/sci-libs/rocRAND/rocRAND-6.3.0.ebuild
new file mode 100644
index 000000000000..e3b1aa20b634
--- /dev/null
+++ b/sci-libs/rocRAND/rocRAND-6.3.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_VERSION=${PV}
+
+inherit cmake rocm
+
+DESCRIPTION="Generate pseudo-random and quasi-random numbers"
+HOMEPAGE="https://github.com/ROCm/rocRAND";
+SRC_URI="https://github.com/ROCm/${PN}/archive/rocm-${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/rocRAND-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+IUSE="benchmark test"
+REQUIRED_USE="${ROCM_REQUIRED_USE}"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-5.7.1_fix_generator_alignment.patch
+)
+
+RDEPEND="dev-util/hip"
+DEPEND="${RDEPEND}
+       dev-build/rocm-cmake
+       benchmark? ( dev-cpp/benchmark )
+       test? ( dev-cpp/gtest )"
+BDEPEND="dev-build/rocm-cmake
+       >=dev-build/cmake-3.22"
+
+src_configure() {
+       rocm_use_hipcc
+
+       local mycmakeargs=(
+               -DCMAKE_SKIP_RPATH=ON
+               -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
+               -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
+               -DROCM_SYMLINK_LIBS=OFF
+               -DBUILD_TEST=$(usex test ON OFF)
+               -DBUILD_BENCHMARK=$(usex benchmark ON OFF)
+       )
+
+       cmake_src_configure
+}
+
+src_test() {
+       check_amdgpu
+       export LD_LIBRARY_PATH="${BUILD_DIR}/library"
+       # uses HMM to fit tests to default <512M iGPU VRAM
+       ROCRAND_USE_HMM="1" cmake_src_test -j1
+}
+
+src_install() {
+       cmake_src_install
+
+       if use benchmark; then
+               cd "${BUILD_DIR}"/benchmark
+               dobin benchmark_rocrand_*
+       fi
+}

Reply via email to