commit:     d5326b32678303ec9ece262931f0b0e5588d4fc6
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 30 02:21:44 2023 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 04:35:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5326b32

sci-libs/rocRAND: bump to 5.6.0 and split out hipRAND.

Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild             |  1 +
 sci-libs/rocRAND/Manifest                          |  1 +
 .../rocRAND/files/rocRAND-5.1.3_no-symlink.patch   | 38 ++++++++++++++
 .../rocRAND/files/rocRAND-5.1.3_stdint-gcc13.patch | 33 ++++++++++++
 .../rocRAND/files/rocRAND-5.4.2_stdint-gcc13.patch | 59 ++++++++++++++++++++++
 sci-libs/rocRAND/rocRAND-5.1.3.ebuild              |  8 +--
 .../{rocRAND-5.1.3.ebuild => rocRAND-5.6.0.ebuild} | 29 +++--------
 7 files changed, 144 insertions(+), 25 deletions(-)

diff --git a/sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild 
b/sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild
index 00c17e869d2e..8d4bed88c3a0 100644
--- a/sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild
+++ b/sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild
@@ -108,6 +108,7 @@ src_configure() {
                -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
                -Wno-dev
                -DCMAKE_INSTALL_INCLUDEDIR="include/rocfft/"
+               -DROCM_SYMLINK_LIBS=OFF
                -DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
                -DBUILD_CLIENTS_SELFTEST=$(usex test ON OFF)
                -DPYTHON3_EXE=${EPYTHON}

diff --git a/sci-libs/rocRAND/Manifest b/sci-libs/rocRAND/Manifest
index 0016770f25d1..e49a7db31d6a 100644
--- a/sci-libs/rocRAND/Manifest
+++ b/sci-libs/rocRAND/Manifest
@@ -1,2 +1,3 @@
 DIST hipRAND-de941a7eb9ede2a862d719cd3ca23234a3692d07.tar.gz 80820 BLAKE2B 
f2894187455cf1da70c486e9efc336a01dc53589c56afe994858b2344c1e74e8d35260f70ad9cd80c5da1103dd9e98da6f5f2bf8e1ddf97023effc8a434a76ce
 SHA512 
cdc70799ddca456c37c2a65875b98acff74800aa2b4f28d77b27c38c32428dd5edb2837bf88bfb6fcc32bdae7f2b27f1b547831bad98101b04959b7ba6b74a85
 DIST rocRAND-5.1.3.tar.gz 11729425 BLAKE2B 
f61aaedb7b72ceba3868a2069c93db1e2cd88a7a0188a9d5a33f520af3b42235c0dca62495460fd5e7abbca5fe7acc01acfdc90e53ae9a6e45128df5da472f49
 SHA512 
12859e52b79e40fcd1fb97d0915c191bbbc24e31e00aac4dbeecb625f9978a00ece3d7a42d0f9d37516031c1fbeb66e14dcd476ea83fe32fb13e0dd5c3964a28
+DIST rocRAND-5.6.0.tar.gz 23189913 BLAKE2B 
2418a90c323f483d1f92630df7134bc060b9052f580259924e79680a7ec37857574973dda69dc3c28fdd5b88a5fc1d29757ed637fcde0730c53b9a5f09668aba
 SHA512 
cccd26a6b80a7705644803a85dad3a43de3f4e2f73f964f2b5aa410f71d3782b68d6cc1ad60b7f7be5193a94098ed3fa25cad30c3acbc141522cdd738d3328a5

diff --git a/sci-libs/rocRAND/files/rocRAND-5.1.3_no-symlink.patch 
b/sci-libs/rocRAND/files/rocRAND-5.1.3_no-symlink.patch
new file mode 100644
index 000000000000..e0a4b8d66ae1
--- /dev/null
+++ b/sci-libs/rocRAND/files/rocRAND-5.1.3_no-symlink.patch
@@ -0,0 +1,38 @@
+commit 3b24ff660f83e18cadd3da272f182aaf8f98a755
+Author: Liam Wrubleski <liam.wruble...@amd.com>
+Date:   Mon Jan 24 13:49:52 2022 -0700
+
+    Revert symlinks
+
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index 17a8c4c..89322d8 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -60,27 +60,6 @@ rocm_install(
+         "${CMAKE_BINARY_DIR}/library/include"
+ )
+ 
+-# Create symlinks
+-if(WIN32)
+-    set(SYMLINK_COMMAND "file(COPY \${SRC} DESTINATION \${DEST_DIR})" )
+-else()
+-    set(SYMLINK_COMMAND "execute_process(COMMAND ln -sf \${SRC_REL} 
\${DEST})" )
+-endif()
+-set(INSTALL_SYMLINK_COMMAND "
+-    set(SRC_DIR \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/include/rocrand)
+-    file(GLOB_RECURSE FILES RELATIVE \${SRC_DIR} \${SRC_DIR}/*)
+-    foreach(FILE \${FILES})
+-        set(SRC \${SRC_DIR}/\${FILE})
+-        set(DEST 
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/rocrand/include/\${FILE})
+-        get_filename_component(DEST_DIR \${DEST} DIRECTORY)
+-        file(MAKE_DIRECTORY \${DEST_DIR})
+-        file(RELATIVE_PATH SRC_REL \${DEST_DIR} \${SRC})
+-        message(STATUS \"symlink: \${SRC_REL} -> \${DEST}\")
+-        ${SYMLINK_COMMAND}
+-    endforeach()
+-")
+-rocm_install(CODE "${INSTALL_SYMLINK_COMMAND}")
+-
+ set(FORTRAN_SRCS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/rocrand/src/fortran")
+ configure_file(
+     src/rocrand-fortran-config.cmake.in

diff --git a/sci-libs/rocRAND/files/rocRAND-5.1.3_stdint-gcc13.patch 
b/sci-libs/rocRAND/files/rocRAND-5.1.3_stdint-gcc13.patch
new file mode 100644
index 000000000000..e80155f24da7
--- /dev/null
+++ b/sci-libs/rocRAND/files/rocRAND-5.1.3_stdint-gcc13.patch
@@ -0,0 +1,33 @@
+commit d79e778080766cf359d6658367e1c7ce0668daa4
+Author: Benda Xu <o...@debian.org>
+Date:   Sat Jul 29 23:03:22 2023 +0800
+
+    sobol*_direction_vector_generator.cpp: include stdint.h for uint*_t
+    
+    Reference: https://gcc.gnu.org/gcc-13/porting_to.html
+    Signed-off-by: Benda Xu <hero...@gentoo.org>
+
+diff --git a/tools/sobol32_direction_vector_generator.cpp 
b/tools/sobol32_direction_vector_generator.cpp
+index 16c4354..eb316c7 100644
+--- a/tools/sobol32_direction_vector_generator.cpp
++++ b/tools/sobol32_direction_vector_generator.cpp
+@@ -20,6 +20,7 @@
+ 
+ #include <iostream>
+ #include <fstream>
++#include <cstdint>
+ #include <string>
+ #include <iomanip>
+ 
+diff --git a/tools/sobol64_direction_vector_generator.cpp 
b/tools/sobol64_direction_vector_generator.cpp
+index e520903..ecdbdc4 100644
+--- a/tools/sobol64_direction_vector_generator.cpp
++++ b/tools/sobol64_direction_vector_generator.cpp
+@@ -20,6 +20,7 @@
+ 
+ #include <iostream>
+ #include <fstream>
++#include <cstdint>
+ #include <string>
+ #include <iomanip>
+ 

diff --git a/sci-libs/rocRAND/files/rocRAND-5.4.2_stdint-gcc13.patch 
b/sci-libs/rocRAND/files/rocRAND-5.4.2_stdint-gcc13.patch
new file mode 100644
index 000000000000..566ef5a1c45a
--- /dev/null
+++ b/sci-libs/rocRAND/files/rocRAND-5.4.2_stdint-gcc13.patch
@@ -0,0 +1,59 @@
+Upstream: https://github.com/ROCmSoftwarePlatform/rocRAND/pull/372
+
+commit 78c5631acd58d218af0c61af5acc57e9f47bc9c7
+Author: Benda Xu <o...@debian.org>
+Date:   Sat Jul 29 23:03:22 2023 +0800
+
+    sobol*_direction_vector_generator.cpp: include stdint.h for uint*_t
+    
+    Reference: https://gcc.gnu.org/gcc-13/porting_to.html
+    Signed-off-by: Benda Xu <hero...@gentoo.org>
+
+diff --git a/tools/scrambled_sobol32_direction_vector_generator.cpp 
b/tools/scrambled_sobol32_direction_vector_generator.cpp
+index 5623704..7addf4d 100644
+--- a/tools/scrambled_sobol32_direction_vector_generator.cpp
++++ b/tools/scrambled_sobol32_direction_vector_generator.cpp
+@@ -21,6 +21,7 @@
+ #include "../library/include/rocrand/rocrand_sobol32_precomputed.h"
+ #include <fstream>
+ #include <iomanip>
++#include <cstdint>
+ #include <iostream>
+ #include <string>
+ 
+diff --git a/tools/scrambled_sobol64_direction_vector_generator.cpp 
b/tools/scrambled_sobol64_direction_vector_generator.cpp
+index 0aecd3e..4189006 100644
+--- a/tools/scrambled_sobol64_direction_vector_generator.cpp
++++ b/tools/scrambled_sobol64_direction_vector_generator.cpp
+@@ -21,6 +21,7 @@
+ #include "../library/include/rocrand/rocrand_sobol64_precomputed.h"
+ #include <fstream>
+ #include <iomanip>
++#include <cstdint>
+ #include <iostream>
+ #include <string>
+ 
+diff --git a/tools/sobol32_direction_vector_generator.cpp 
b/tools/sobol32_direction_vector_generator.cpp
+index 16c4354..eb316c7 100644
+--- a/tools/sobol32_direction_vector_generator.cpp
++++ b/tools/sobol32_direction_vector_generator.cpp
+@@ -20,6 +20,7 @@
+ 
+ #include <iostream>
+ #include <fstream>
++#include <cstdint>
+ #include <string>
+ #include <iomanip>
+ 
+diff --git a/tools/sobol64_direction_vector_generator.cpp 
b/tools/sobol64_direction_vector_generator.cpp
+index e520903..ecdbdc4 100644
+--- a/tools/sobol64_direction_vector_generator.cpp
++++ b/tools/sobol64_direction_vector_generator.cpp
+@@ -20,6 +20,7 @@
+ 
+ #include <iostream>
+ #include <fstream>
++#include <cstdint>
+ #include <string>
+ #include <iomanip>
+ 

diff --git a/sci-libs/rocRAND/rocRAND-5.1.3.ebuild 
b/sci-libs/rocRAND/rocRAND-5.1.3.ebuild
index 26ca0c5042b1..f5f90b407482 100644
--- a/sci-libs/rocRAND/rocRAND-5.1.3.ebuild
+++ b/sci-libs/rocRAND/rocRAND-5.1.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -20,6 +20,9 @@ IUSE="benchmark test"
 REQUIRED_USE="${ROCM_REQUIRED_USE}"
 RESTRICT="!test? ( test )"
 
+PATCHES=( "${FILESDIR}"/${PN}-5.1.3_stdint-gcc13.patch
+       "${FILESDIR}"/${PN}-5.1.3_no-symlink.patch )
+
 RDEPEND="dev-util/hip"
 DEPEND="${RDEPEND}
 dev-util/rocm-cmake
@@ -35,8 +38,6 @@ src_prepare() {
        # change installed include and lib dir, and avoid symlink overwrite the 
installed headers
        # avoid setting RPATH
        sed -r -e "s:(hip|roc)rand/lib:\${CMAKE_INSTALL_LIBDIR}:" \
-               -e "s:(hip|roc)rand/include:include/\1rand:" \
-               -e '/\$\{INSTALL_SYMLINK_COMMAND\}/d' \
                -e "/INSTALL_RPATH/d" -i library/CMakeLists.txt || die
 
        # remove GIT dependency
@@ -54,6 +55,7 @@ src_configure() {
                -DCMAKE_SKIP_RPATH=On
                -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
                -DBUILD_HIPRAND=ON
+               -DROCM_SYMLINK_LIBS=OFF
                -DBUILD_TEST=$(usex test ON OFF)
                -DBUILD_BENCHMARK=$(usex benchmark ON OFF)
        )

diff --git a/sci-libs/rocRAND/rocRAND-5.1.3.ebuild 
b/sci-libs/rocRAND/rocRAND-5.6.0.ebuild
similarity index 57%
copy from sci-libs/rocRAND/rocRAND-5.1.3.ebuild
copy to sci-libs/rocRAND/rocRAND-5.6.0.ebuild
index 26ca0c5042b1..b7b4ac7cc950 100644
--- a/sci-libs/rocRAND/rocRAND-5.1.3.ebuild
+++ b/sci-libs/rocRAND/rocRAND-5.6.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -9,9 +9,7 @@ inherit cmake rocm
 
 DESCRIPTION="Generate pseudo-random and quasi-random numbers"
 HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocRAND";
-HIPRAND_COMMIT_HASH=de941a7eb9ede2a862d719cd3ca23234a3692d07
-SRC_URI="https://github.com/ROCmSoftwarePlatform/${PN}/archive/rocm-${PV}.tar.gz
 -> ${P}.tar.gz
-https://github.com/ROCmSoftwarePlatform/hipRAND/archive/${HIPRAND_COMMIT_HASH}.tar.gz
 -> hipRAND-${HIPRAND_COMMIT_HASH}.tar.gz"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/${PN}/archive/rocm-${PV}.tar.gz
 -> ${P}.tar.gz"
 
 LICENSE="MIT"
 KEYWORDS="~amd64"
@@ -20,6 +18,8 @@ IUSE="benchmark test"
 REQUIRED_USE="${ROCM_REQUIRED_USE}"
 RESTRICT="!test? ( test )"
 
+PATCHES=( "${FILESDIR}"/${PN}-5.4.2_stdint-gcc13.patch )
+
 RDEPEND="dev-util/hip"
 DEPEND="${RDEPEND}
 dev-util/rocm-cmake
@@ -29,23 +29,6 @@ BDEPEND="dev-util/rocm-cmake
 
 S="${WORKDIR}/rocRAND-rocm-${PV}"
 
-src_prepare() {
-       rmdir hipRAND || die
-       mv -v ../hipRAND-${HIPRAND_COMMIT_HASH} hipRAND || die
-       # change installed include and lib dir, and avoid symlink overwrite the 
installed headers
-       # avoid setting RPATH
-       sed -r -e "s:(hip|roc)rand/lib:\${CMAKE_INSTALL_LIBDIR}:" \
-               -e "s:(hip|roc)rand/include:include/\1rand:" \
-               -e '/\$\{INSTALL_SYMLINK_COMMAND\}/d' \
-               -e "/INSTALL_RPATH/d" -i library/CMakeLists.txt || die
-
-       # remove GIT dependency
-       sed -e "/find_package(Git/,+4d" -i cmake/Dependencies.cmake || die
-
-       eapply_user
-       cmake_src_prepare
-}
-
 src_configure() {
        addpredict /dev/kfd
        addpredict /dev/dri/
@@ -53,7 +36,9 @@ src_configure() {
        local mycmakeargs=(
                -DCMAKE_SKIP_RPATH=On
                -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
-               -DBUILD_HIPRAND=ON
+               -DBUILD_HIPRAND=OFF
+               -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
+               -DROCM_SYMLINK_LIBS=OFF
                -DBUILD_TEST=$(usex test ON OFF)
                -DBUILD_BENCHMARK=$(usex benchmark ON OFF)
        )

Reply via email to