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/extrae/
Date: Fri, 03 Jun 2022 10:44:43
Message-Id: 1654185304.e1499a574732f641844ec73596f429991fffbfc4.flow@gentoo
1 commit: e1499a574732f641844ec73596f429991fffbfc4
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 2 15:54:04 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 2 15:55:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e1499a57
7
8 sys-cluster/extrae: add 4.0.1
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 sys-cluster/extrae/Manifest | 1 +
13 sys-cluster/extrae/extrae-4.0.1.ebuild | 234 +++++++++++++++++++++++++++++++++
14 2 files changed, 235 insertions(+)
15
16 diff --git a/sys-cluster/extrae/Manifest b/sys-cluster/extrae/Manifest
17 index 17608e9bc..1f6352936 100644
18 --- a/sys-cluster/extrae/Manifest
19 +++ b/sys-cluster/extrae/Manifest
20 @@ -1 +1,2 @@
21 DIST extrae-3.8.3.tar.gz 1056317 BLAKE2B 9efe7011ba9474de66deb8c679f10eff37cc3d5699b42cb1b076ed43b539bbc15ecc613b3f17b03df9e93a219ebcafd3e1d56229db9c0d4e7a0a56d5c3edd591 SHA512 3fba66447790e0a1c71c0e5a61f67ad966cdd4e19742799ecc50124a916ef599fff747027ccc803584f0ab2d1d76c29ded7072a70dd0aed5a3be7ff6ecbb8709
22 +DIST extrae-4.0.1.tar.gz 1082141 BLAKE2B a049f744aa1d2f6770e620939c5d7981098e86908843f0b9d38d06a4aa9103ed2d551a34301dbf57857316340031d536a814d82a9ab0aab5ab70b063171ff52c SHA512 58cbe06b1eb738dba3c9d38a96ca8a9bf442c492214e086876af25b8d7e01c379b46281f6815763e87e0e69214636f95486d48b1b6ce088b54d24b4d77ff0920
23
24 diff --git a/sys-cluster/extrae/extrae-4.0.1.ebuild b/sys-cluster/extrae/extrae-4.0.1.ebuild
25 new file mode 100644
26 index 000000000..8bcd5ef13
27 --- /dev/null
28 +++ b/sys-cluster/extrae/extrae-4.0.1.ebuild
29 @@ -0,0 +1,234 @@
30 +# Copyright 2019-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( pypy3 python3_{8..11} )
36 +
37 +inherit autotools java-pkg-opt-2 python-single-r1
38 +
39 +DESCRIPTION="Instrumentation framework to generate execution traces of parallel runtimes"
40 +HOMEPAGE="https://github.com/bsc-performance-tools/extrae"
41 +SRC_URI="https://github.com/bsc-performance-tools/extrae/archive/${PV}.tar.gz -> ${P}.tar.gz"
42 +
43 +LICENSE="LGPL-2.1"
44 +SLOT="0"
45 +KEYWORDS="~amd64"
46 +
47 +IUSE_INSTRUMENT="
48 + +instrument_dynamic-memory
49 + +instrument_io
50 + +instrument_syscall
51 +"
52 +IUSE="${IUSE_INSTRUMENT} clustering dlsym doc dyninst heterogeneous inotify memkind
53 +merge-in-trace nanos online opencl openmp openshmem +parallel-merge pebs-sampling
54 +peruse +posix-clock pthread sampling +single-mpi-lib sionlib smpss spectral +xml"
55 +
56 +#aspectj needs foo/lib/aspectj.jar and foo/bin/ajc
57 +#TODO: cuda cupti gm mx gaspi aspectj
58 +#TODO: support llvm libunwind, llvm rt, elftoolchain
59 +
60 +# aspectj? ( >=dev-java/aspectj-1.9.6 )
61 +CDEPEND="
62 + ${PYTHON_DEPS}
63 + dev-libs/libxml2
64 + dev-libs/papi
65 + !sys-cluster/openmpi[libompitrace(+)]
66 + sys-libs/binutils-libs
67 + sys-libs/libunwind
68 + sys-libs/zlib
69 + virtual/mpi
70 +
71 + clustering? ( sys-cluster/clusteringsuite[treedbscan] )
72 + dyninst? (
73 + dev-libs/boost:=
74 + dev-libs/libdwarf
75 + sys-cluster/dyninst
76 + virtual/libelf
77 + )
78 + inotify? ( dev-libs/libevent )
79 + memkind? ( dev-libs/memkind )
80 + online? ( sys-cluster/synapse )
81 + opencl? ( dev-util/opencl-headers )
82 + openshmem? ( sys-cluster/SOS )
83 + peruse? ( sys-cluster/openmpi[peruse(-)] )
84 + sionlib? ( sys-cluster/sionlib:= )
85 + spectral? (
86 + sci-libs/fftw
87 + sys-cluster/spectral
88 + )
89 +"
90 +DEPEND="
91 + ${CDEPEND}
92 + java? ( virtual/jdk:1.8 )
93 +"
94 +RDEPEND="
95 + ${CDEPEND}
96 + java? ( virtual/jre:1.8 )
97 + virtual/opencl
98 +"
99 +BDEPEND="
100 + sys-devel/binutils-config
101 + doc? (
102 + app-text/ghostscript-gpl
103 + dev-python/sphinx
104 + dev-tex/latexmk
105 + dev-texlive/texlive-latexextra
106 + )
107 + java? ( app-admin/chrpath )
108 +"
109 +
110 +PATCHES=(
111 + "${FILESDIR}/${PN}-3.8.3-link-sionlib.patch"
112 +)
113 +REQUIRED_USE="
114 + ${PYTHON_REQUIRED_USE}
115 +
116 + || ( ${IUSE_INSTRUMENT//+/} )
117 +
118 + java? ( pthread )
119 +"
120 +# aspectj? ( java )
121 +# cupti? ( cuda )
122 +
123 +src_prepare() {
124 + default
125 + eautoreconf
126 +}
127 +
128 +src_configure() {
129 + export VARTEXFONTS="${T}/fonts"
130 +
131 + local myconf=(
132 + --disable-mic
133 + --disable-pmapi
134 + --disable-static
135 + --enable-shared
136 + --without-cupti
137 + --without-gm
138 + --without-mx
139 +
140 + --datadir="${T}"
141 + --datarootdir="${T}"
142 + --with-librt="${EPREFIX}/usr"
143 + --with-mpi="${EPREFIX}/usr"
144 + --with-papi="${EPREFIX}/usr"
145 + --with-unwind="${EPREFIX}/usr"
146 +
147 + $(use_enable doc)
148 + $(use_enable heterogeneous)
149 + $(use_enable inotify)
150 + $(use_enable instrument_dynamic-memory)
151 + $(use_enable instrument_io)
152 + $(use_enable instrument_syscall)
153 + $(use_enable merge-in-trace)
154 + $(use_enable nanos)
155 + $(use_enable online)
156 + $(use_enable openmp)
157 + $(use_enable parallel-merge)
158 + $(use_enable pebs-sampling)
159 + $(use_enable peruse)
160 + $(use_enable posix-clock)
161 + $(use_enable pthread)
162 + $(use_enable sampling)
163 + $(use_enable single-mpi-lib)
164 + $(use_enable smpss)
165 + $(use_enable xml)
166 + )
167 +
168 + use dlsym && myconf+=( "--with-pmpi-hook=dlsym" )
169 +
170 +# if use aspectj; then
171 +# myconf+=( "--with-java-aspectj=${EPREFIX}/usr/share/aspectj/lib" )
172 +# myconf+=( "--with-java-aspectj-weaver=${EPREFIX}/usr/share/aspectj/lib" )
173 +# else
174 + myconf+=( "--without-java-aspectj-weaver" )
175 + myconf+=( "--without-java-aspectj" )
176 +# fi
177 + if use clustering; then
178 + myconf+=( "--with-clustering=${EPREFIX}/usr" )
179 + else
180 + myconf+=( "--without-clustering" )
181 + fi
182 + if use dyninst; then
183 + myconf+=( "--with-boost=${EPREFIX}/usr" )
184 + myconf+=( "--with-dyninst=${EPREFIX}/usr" )
185 + myconf+=( "--with-dyninst-headers=${EPREFIX}/usr/include/dyninst" )
186 + myconf+=( "--with-dwarf=${EPREFIX}/usr" )
187 + myconf+=( "--with-elf=${EPREFIX}/usr" )
188 + else
189 + myconf+=( "--without-boost" )
190 + myconf+=( "--without-dyninst" )
191 + myconf+=( "--without-dwarf" )
192 + myconf+=( "--without-elf" )
193 + fi
194 + if use java; then
195 + myconf+=( "--with-java-jdk=$(java-config -O)" )
196 + else
197 + myconf+=( "--without-java-jdk" )
198 + fi
199 + if use memkind; then
200 + myconf+=( "--with-memkind=${EPREFIX}/usr" )
201 + else
202 + myconf+=( "--without-memkind" )
203 + fi
204 + if use online; then
205 + myconf+=( "--with-synapse=${EPREFIX}/usr" )
206 + else
207 + myconf+=( "--without-synapse" )
208 + fi
209 + if use opencl; then
210 + myconf+=( "--with-opencl=${EPREFIX}/usr" )
211 + else
212 + myconf+=( "--without-opencl" )
213 + fi
214 + if use openshmem; then
215 + myconf+=( "--with-openshmem=${EPREFIX}/usr" )
216 + else
217 + myconf+=( "--without-openshmem" )
218 + fi
219 + if use sionlib; then
220 + myconf+=( "--with-sionlib=${EPREFIX}/usr" )
221 + myconf+=( "--with-sionlib-headers=${EPREFIX}/usr/include/sionlib" )
222 + fi
223 + if use spectral; then
224 + myconf+=( "--with-fft=${EPREFIX}/usr" )
225 + myconf+=( "--with-spectral=${EPREFIX}/usr" )
226 + else
227 + myconf+=( "--without-fft" )
228 + myconf+=( "--without-spectral" )
229 + fi
230 +
231 + econf "${myconf[@]}"
232 +}
233 +
234 +src_install() {
235 + default
236 +
237 + #TODO: build examples
238 +
239 + mkdir -p "${D}/$(python_get_sitedir)/" || die
240 + mv "${ED}/usr/libexec/pyextrae" "${D}/$(python_get_sitedir)/" || die
241 + python_optimize "${D}/$(python_get_sitedir)/pyextrae"
242 +
243 + #super-duper workaround
244 + mkdir -p "${ED}/usr/share/doc/${PF}" || die
245 + mv "${ED}/${T}/example" "${ED}/usr/share/doc/${PF}/examples" || die
246 + mv "${ED}/${T}/tests" "${ED}/usr/share/doc/${PF}/" || die
247 +
248 + if use doc ; then
249 + mv "${T}/docs"/* "${ED}/usr/share/doc/${PF}/" || die
250 + mv "${T}/man" "${ED}/usr/share/" || die
251 + docompress -x "/usr/share/doc/${PF}/html"
252 + fi
253 + docompress -x "/usr/share/doc/${PF}/examples"
254 + docompress -x "/usr/share/doc/${PF}/tests"
255 +
256 + if use java; then
257 + chrpath -d "${ED}/usr/$(get_libdir)/libextrae-jvmti-agent.so" || die
258 + chrpath -d "${ED}/usr/$(get_libdir)/libjavatrace.so" || die
259 + fi
260 +
261 + find "${ED}" -name '*.a' -delete || die
262 + find "${ED}" -name '*.la' -delete || die
263 +}