Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocThrust/
Date: Mon, 02 May 2022 06:02:10
Message-Id: 1651471319.4810bc80d38fd749445685970922dc91512c297e.heroxbd@gentoo
1 commit: 4810bc80d38fd749445685970922dc91512c297e
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 2 05:36:50 2022 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 06:01:59 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4810bc80
7
8 sci-libs/rocThrust: remove unused cmake flags.
9
10 unbundle against hip slots.
11
12 add gtest to the test dependency.
13
14 Closes: https://bugs.gentoo.org/831968
15 Package-Manager: Portage-3.0.30, Repoman-3.0.3
16 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
17
18 ...t-4.3.0-r1.ebuild => rocThrust-4.3.0-r2.ebuild} | 7 +-
19 sci-libs/rocThrust/rocThrust-4.3.0.ebuild | 76 ----------------------
20 2 files changed, 4 insertions(+), 79 deletions(-)
21
22 diff --git a/sci-libs/rocThrust/rocThrust-4.3.0-r1.ebuild b/sci-libs/rocThrust/rocThrust-4.3.0-r2.ebuild
23 similarity index 91%
24 rename from sci-libs/rocThrust/rocThrust-4.3.0-r1.ebuild
25 rename to sci-libs/rocThrust/rocThrust-4.3.0-r2.ebuild
26 index fc6045bf31f2..ff4a85ba172d 100644
27 --- a/sci-libs/rocThrust/rocThrust-4.3.0-r1.ebuild
28 +++ b/sci-libs/rocThrust/rocThrust-4.3.0-r2.ebuild
29 @@ -16,9 +16,11 @@ IUSE="benchmark test"
30
31 RESTRICT="!test? ( test )"
32
33 -RDEPEND="dev-util/hip:${SLOT}
34 +RDEPEND="dev-util/hip
35 sci-libs/rocPRIM:${SLOT}"
36 -DEPEND="${RDEPEND}"
37 +DEPEND="${RDEPEND}
38 + test? ( dev-cpp/gtest )"
39 +BDEPEND=">=dev-util/cmake-3.22"
40
41 S="${WORKDIR}/rocThrust-rocm-${PV}"
42
43 @@ -56,7 +58,6 @@ src_configure() {
44 -DBUILD_TEST=$(usex test ON OFF)
45 -DBUILD_BENCHMARKS=$(usex benchmark ON OFF)
46 ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
47 - -D__skip_rocmclang="ON" ## fix cmake-3.21 configuration issue caused by officialy support programming language "HIP"
48 )
49
50 cmake_src_configure
51
52 diff --git a/sci-libs/rocThrust/rocThrust-4.3.0.ebuild b/sci-libs/rocThrust/rocThrust-4.3.0.ebuild
53 deleted file mode 100644
54 index 5063cf4dbce5..000000000000
55 --- a/sci-libs/rocThrust/rocThrust-4.3.0.ebuild
56 +++ /dev/null
57 @@ -1,76 +0,0 @@
58 -# Copyright 1999-2021 Gentoo Authors
59 -# Distributed under the terms of the GNU General Public License v2
60 -
61 -EAPI=7
62 -
63 -inherit cmake
64 -
65 -DESCRIPTION="HIP back-end for the parallel algorithm library Thrust"
66 -HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocThrust"
67 -SRC_URI="https://github.com/ROCmSoftwarePlatform/rocThrust/archive/rocm-${PV}.tar.gz -> rocThrust-${PV}.tar.gz"
68 -
69 -LICENSE="Apache-2.0"
70 -KEYWORDS="~amd64"
71 -SLOT="0/$(ver_cut 1-2)"
72 -IUSE="benchmark test"
73 -
74 -RESTRICT="!test? ( test )"
75 -
76 -RDEPEND="dev-util/hip:${SLOT}
77 - sci-libs/rocPRIM:${SLOT}"
78 -DEPEND="${RDEPEND}"
79 -
80 -S="${WORKDIR}/rocThrust-rocm-${PV}"
81 -
82 -PATCHES=( "${FILESDIR}/${PN}-4.0-operator_new.patch"
83 - "${FILESDIR}/${P}-deprecate-hcc_detail.patch" )
84 -
85 -src_prepare() {
86 - sed -e "/PREFIX rocthrust/d" \
87 - -e "/DESTINATION/s:rocthrust/include/thrust:include/rocthrust/thrust:" \
88 - -e "/rocm_install_symlink_subdir(rocthrust)/d" \
89 - -e "/<INSTALL_INTERFACE/s:rocthrust/include/:include/rocthrust/:" -i thrust/CMakeLists.txt || die
90 -
91 - sed -e "s:\${CMAKE_INSTALL_INCLUDEDIR}:&/rocthrust:" \
92 - -e "s:\${ROCM_INSTALL_LIBDIR}:\${CMAKE_INSTALL_LIBDIR}:" -i cmake/ROCMExportTargetsHeaderOnly.cmake || die
93 -
94 - # disable downloading googletest and googlebenchmark
95 - sed -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die
96 -
97 - # remove GIT dependency
98 - sed -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die
99 -
100 - eapply_user
101 - cmake_src_prepare
102 -}
103 -
104 -src_configure() {
105 - # Grant access to the device
106 - addwrite /dev/kfd
107 - addpredict /dev/dri/
108 -
109 - # Compiler to use
110 - export CXX=hipcc
111 -
112 - local mycmakeargs=(
113 - -DBUILD_TEST=$(usex test ON OFF)
114 - -DBUILD_BENCHMARKS=$(usex benchmark ON OFF)
115 - ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
116 - -D__skip_rocmclang="ON" ## fix cmake-3.21 configuration issue caused by officialy support programming language "HIP"
117 - )
118 -
119 - cmake_src_configure
120 -}
121 -
122 -src_test() {
123 - # Grant access to the device
124 - addwrite /dev/kfd
125 - addwrite /dev/dri/
126 - cmake_src_test
127 -}
128 -
129 -src_install() {
130 - cmake_src_install
131 -
132 - use benchmark && dobin "${BUILD_DIR}"/benchmarks/benchmark_thrust_bench
133 -}