Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: sys-cluster/scorep/
Date: Thu, 30 Jun 2022 17:39:48
Message-Id: 1656584777.fe6fcdd17ca1f612a11b4e5d25c91eecd7d954fc.flow@gentoo
1 commit: fe6fcdd17ca1f612a11b4e5d25c91eecd7d954fc
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 30 10:25:11 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 30 10:26:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fe6fcdd1
7
8 sys-cluster/scorep: new version that respect *FLAGS
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 sys-cluster/scorep/Manifest | 1 +
13 sys-cluster/scorep/scorep-7.1-r1.ebuild | 167 ++++++++++++++++++++++++++++++++
14 2 files changed, 168 insertions(+)
15
16 diff --git a/sys-cluster/scorep/Manifest b/sys-cluster/scorep/Manifest
17 index 1464caa23..73dec39d8 100644
18 --- a/sys-cluster/scorep/Manifest
19 +++ b/sys-cluster/scorep/Manifest
20 @@ -1 +1,2 @@
21 DIST scorep-7.1.tar.gz 19979160 BLAKE2B be0f3d6534410c9c510e22110f92227dcdf52b77eba735913c92bcd67fed915d59a6988090f90abd777a9c4b0d821de7264d7b40d0687c8f684e4af72e42c43b SHA512 19da94e64eb9e3fb27f2c37087df2acc511645aa16abf80bb73c19eddab9efa004325d64eb0031df2f10a250976c9c2b1faf3169ebd32909703bf678c9abeb1a
22 +DIST scorep-edf930df.tar.gz 20238984 BLAKE2B 9a469102a5bace67633efcf8d90908bd42f7b3a90b34139034d94aace9ebf31d38a96266257df41c3b1c754eef69b9bc5fa32be5565d1b3f59f00314a04b8e98 SHA512 1332c12facc64f68c3e382fbc578834a845eec69528603eb860b6e46b9d69c079d0c962e343f02fbe51976546c02860c3f0b4a8b96882bdb606a9577020f5c84
23
24 diff --git a/sys-cluster/scorep/scorep-7.1-r1.ebuild b/sys-cluster/scorep/scorep-7.1-r1.ebuild
25 new file mode 100644
26 index 000000000..e44d04bb6
27 --- /dev/null
28 +++ b/sys-cluster/scorep/scorep-7.1-r1.ebuild
29 @@ -0,0 +1,167 @@
30 +# Copyright 2019-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +FORTRAN_NEED_OPENMP=1
36 +FORTRAN_STANDARD=90
37 +LLVM_MAX_SLOT=14
38 +
39 +inherit llvm fortran-2 toolchain-funcs
40 +
41 +DESCRIPTION="Scalable Performance Measurement Infrastructure for Parallel Codes"
42 +HOMEPAGE="https://www.vi-hps.org/projects/score-p"
43 +SRC_URI="https://perftools.pages.jsc.fz-juelich.de/cicd/${PN}/branches/gentoo-${PN}-score/sources.edf930df.tar.gz -> ${PN}-edf930df.tar.gz"
44 +# https://perftools.pages.jsc.fz-juelich.de/cicd/${PN}/tags/${P}/${P}.tar.gz
45 +S="${WORKDIR}/sources.edf930df"
46 +
47 +LICENSE="BSD"
48 +SLOT="0"
49 +KEYWORDS="~amd64"
50 +IUSE="debug gcc-plugin llvm mpi online-access opencl openshmem pmi unwind"
51 +#TODO: openacc
52 +
53 +CDEPEND="
54 + dev-libs/cubelib
55 + dev-libs/cubew
56 + dev-libs/papi
57 + sys-cluster/opari2
58 + >=sys-cluster/otf2-3.0
59 + sys-libs/binutils-libs:=
60 + sys-libs/zlib
61 +
62 + llvm? (
63 + sys-devel/clang:"${LLVM_MAX_SLOT}"
64 + <sys-devel/llvm-"${LLVM_MAX_SLOT}":=
65 + || (
66 + sys-devel/llvm:12
67 + sys-devel/llvm:13
68 + sys-devel/llvm:"${LLVM_MAX_SLOT}"
69 + )
70 + )
71 + mpi? ( virtual/mpi )
72 + openshmem? ( sys-cluster/SOS )
73 + pmi? ( || ( sys-cluster/slurm sys-cluster/pmix[pmi] ) )
74 + unwind? ( || ( sys-libs/libunwind sys-libs/llvm-libunwind ) )
75 +"
76 +RDEPEND="
77 + ${CDEPEND}
78 + opencl? ( virtual/opencl )
79 +"
80 +DEPEND="
81 + ${CDEPEND}
82 + opencl? ( dev-util/opencl-headers )
83 +"
84 +
85 +pkg_setup() {
86 + use llvm && llvm_pkg_setup
87 + fortran-2_pkg_setup
88 +}
89 +
90 +src_prepare() {
91 + tc-export CC CXX FC F77 CPP AR
92 + # eautoreconf will need custom autotools
93 + rm build-config/common/platforms/platform-* || die
94 +
95 + cat > build-config/common/platforms/platform-backend-user-provided <<-EOF || die
96 + CC=${CC}
97 + CXX=${CXX}
98 + FC=${FC}
99 + F77=${F77}
100 + CPP=${CPP}
101 + CXXCPP=${CPP}
102 + EOF
103 +
104 + cat > build-config/common/platforms/platform-frontend-user-provided <<-EOF || die
105 + CC_FOR_BUILD=${CC}
106 + F77_FOR_BUILD=${F77}
107 + FC_FOR_BUILD=${FC}
108 + CXX_FOR_BUILD=${CXX}
109 + LDFLAGS_FOR_BUILD=${LDFLAGS}
110 + CFLAGS_FOR_BUILD=${CFLAGS}
111 + CXXFLAGS_FOR_BUILD=${CXXFLAGS}
112 + CPPFLAGS_FOR_BUILD=${CPPFLAGS}
113 + FCFLAGS_FOR_BUILD=${FCFLAGS}
114 + FFLAGS_FOR_BUILD=${FFLAGS}
115 + EOF
116 +
117 + cat > build-config/common/platforms/platform-mpi-user-provided <<-EOF || die
118 + MPICC=mpicc
119 + MPICXX=mpicxx
120 + MPIF77=mpif77
121 + MPIFC=mpif90
122 + MPI_CPPFLAGS=${CPPFLAGS}
123 + MPI_CFLAGS=${CFLAGS}
124 + MPI_CXXFLAGS=${CXXFLAGS}
125 + MPI_FFLAGS=${FFLAGS}
126 + MPI_FCFLAGS=${FCFLAGS}
127 + MPI_LDFLAGS=${LDFLAGS}
128 + EOF
129 +
130 + cat > build-config/common/platforms/platform-shmem-user-provided <<-EOF || die
131 + SHMEMCC=oshcc
132 + SHMEMCXX=oshc++
133 + SHMEMF77=oshfort
134 + SHMEMFC=oshfort
135 + SHMEM_CPPFLAGS=${CPPFLAGS}
136 + SHMEM_CFLAGS=${CFLAGS}
137 + SHMEM_CXXFLAGS=${CXXFLAGS}
138 + SHMEM_FFLAGS=${FFLAGS}
139 + SHMEM_FCFLAGS=${FCFLAGS}
140 + SHMEM_LDFLAGS=${LDFLAGS}
141 + SHMEM_LIBS=-lsma
142 + SHMEM_LIB_NAME=libsma
143 + SHMEM_NAME=sandia-openshmem
144 + EOF
145 +
146 + rm -r vendor || die
147 + default
148 +}
149 +
150 +src_configure() {
151 +
152 + local myconf=(
153 + --disable-cuda
154 + --disable-experimental-platform
155 + --disable-openacc
156 + --disable-platform-mic
157 + --disable-static
158 + --enable-shared
159 + --with-cubelib
160 + --with-cubew
161 + --with-custom-compilers
162 + --with-libbfd
163 + --with-opari2
164 + --with-otf2
165 + --with-papi-header="/usr/include"
166 + --with-papi-lib="/usr/$(get_libdir)"
167 + --without-libcuda
168 + --without-libcudart
169 + --without-libcupti
170 + --without-liblustreapi
171 + --without-libnvidia-ml
172 + --without-librca
173 + --without-pdt
174 +
175 + $(use_enable debug)
176 + $(use_with gcc-plugin)
177 + $(use_with online-access)
178 + $(use_with opencl libOpenCL)
179 + $(use_with openshmem shmem openshmem)
180 + $(use_with pmi)
181 + $(use_with unwind libunwind)
182 + )
183 + if use llvm; then
184 + myconf+=( "--with-llvm=$(get_llvm_prefix)/bin" )
185 + else
186 + myconf+=( "--without-llvm" )
187 + fi
188 + use mpi || myconf+=( "--without-mpi" )
189 +
190 + econf CXXFLAGS_FOR_BUILD_SCORE="${CXXFLAGS}" CFLAGS_FOR_BUILD_SCORE="${CFLAGS}" LDFLAGS_FOR_BUILD_SCORE="${LDFLAGS}" "${myconf[@]}"
191 +}
192 +
193 +src_install() {
194 + default
195 + find "${ED}" -name '*.la' -delete || die
196 +}