1 |
commit: a8e9c7431d8be9d4a83083bd9d8f48c514a0a16a |
2 |
Author: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de> |
3 |
AuthorDate: Mon Aug 22 14:15:52 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 27 08:27:10 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=a8e9c743 |
7 |
|
8 |
sci-physics/rivet: new package, add 3.1.5, 3.1.6 |
9 |
|
10 |
Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de> |
11 |
Closes: https://github.com/gentoo/sci/pull/1166 |
12 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
13 |
|
14 |
sci-physics/rivet/files/rivet-3.1.5-doc.patch | 38 +++++++++++ |
15 |
sci-physics/rivet/files/rivet-3.1.5-test.patch | 11 ++++ |
16 |
sci-physics/rivet/files/rivet-3.1.6-binreloc.patch | 12 ++++ |
17 |
sci-physics/rivet/metadata.xml | 20 ++++++ |
18 |
sci-physics/rivet/rivet-3.1.5.ebuild | 75 ++++++++++++++++++++++ |
19 |
sci-physics/rivet/rivet-3.1.6.ebuild | 75 ++++++++++++++++++++++ |
20 |
6 files changed, 231 insertions(+) |
21 |
|
22 |
diff --git a/sci-physics/rivet/files/rivet-3.1.5-doc.patch b/sci-physics/rivet/files/rivet-3.1.5-doc.patch |
23 |
new file mode 100644 |
24 |
index 000000000..ae01b1812 |
25 |
--- /dev/null |
26 |
+++ b/sci-physics/rivet/files/rivet-3.1.5-doc.patch |
27 |
@@ -0,0 +1,38 @@ |
28 |
+--- a/doc/Makefile.am |
29 |
++++ b/doc/Makefile.am |
30 |
+@@ -11,7 +11,7 @@ |
31 |
+ $(mkdir_p) analists && cd analists && \ |
32 |
+ LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(LD_LIBRARY_PATH) \ |
33 |
+ DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(DYLD_LIBRARY_PATH) \ |
34 |
+- PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
35 |
++ PYTHONPATH=$(shell realpath $(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
36 |
+ RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \ |
37 |
+ $(PYTHON) $(abs_srcdir)/analists/mk-analysis-html || true |
38 |
+ |
39 |
+@@ -21,7 +21,7 @@ |
40 |
+ $(mkdir_p) analists && cd analists && \ |
41 |
+ LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(LD_LIBRARY_PATH) \ |
42 |
+ DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(DYLD_LIBRARY_PATH) \ |
43 |
+- PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
44 |
++ PYTHONPATH=$(shell realpath $(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
45 |
+ RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \ |
46 |
+ $(PYTHON) $(abs_srcdir)/analists/mk-analysis-json || true |
47 |
+ |
48 |
+@@ -31,7 +31,7 @@ |
49 |
+ $(mkdir_p) analists && cd analists && \ |
50 |
+ LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(LD_LIBRARY_PATH) \ |
51 |
+ DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(DYLD_LIBRARY_PATH) \ |
52 |
+- PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
53 |
++ PYTHONPATH=$(shell realpath $(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
54 |
+ RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \ |
55 |
+ $(PYTHON) $(abs_srcdir)/analists/mk-analysis-txt || true |
56 |
+ |
57 |
+@@ -46,7 +46,7 @@ |
58 |
+ $(mkdir_p) coverage && cd coverage && \ |
59 |
+ LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(LD_LIBRARY_PATH):$(LD_LIBRARY_PATH) \ |
60 |
+ DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(DYLD_LIBRARY_PATH):$(DYLD_LIBRARY_PATH) \ |
61 |
+- PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
62 |
++ PYTHONPATH=$(shell realpath $(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ |
63 |
+ RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \ |
64 |
+ $(abs_srcdir)/coverage/mk-coverage-htmls || true |
65 |
+ |
66 |
|
67 |
diff --git a/sci-physics/rivet/files/rivet-3.1.5-test.patch b/sci-physics/rivet/files/rivet-3.1.5-test.patch |
68 |
new file mode 100644 |
69 |
index 000000000..915473eb1 |
70 |
--- /dev/null |
71 |
+++ b/sci-physics/rivet/files/rivet-3.1.5-test.patch |
72 |
@@ -0,0 +1,11 @@ |
73 |
+--- a/test/Makefile.am |
74 |
++++ b/test/Makefile.am |
75 |
+@@ -26,7 +26,7 @@ |
76 |
+ LIBLOCATION=$(top_builddir)/src/.libs \ |
77 |
+ LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH) \ |
78 |
+ DYLD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH) \ |
79 |
+- PYTHONPATH=$(top_builddir)/pyext/build/$(RIVET_SETUP_PY_PATH):$(PYTHONPATH) \ |
80 |
++ PYTHONPATH=$(shell realpath $(top_builddir)/pyext/build/lib*):$(top_builddir)/pyext/build/$(RIVET_SETUP_PY_PATH):$(PYTHONPATH) \ |
81 |
+ PATH=$(top_builddir)/bin:$(top_srcdir)/bin:$(PATH) \ |
82 |
+ PYTHON=$(PYTHON) \ |
83 |
+ RIVET_TESTS_SRC=$(srcdir) |
84 |
|
85 |
diff --git a/sci-physics/rivet/files/rivet-3.1.6-binreloc.patch b/sci-physics/rivet/files/rivet-3.1.6-binreloc.patch |
86 |
new file mode 100644 |
87 |
index 000000000..68fd4436c |
88 |
--- /dev/null |
89 |
+++ b/sci-physics/rivet/files/rivet-3.1.6-binreloc.patch |
90 |
@@ -0,0 +1,12 @@ |
91 |
+diff -Naru Rivet-3.1.6.orig/src/Tools/binreloc.c Rivet-3.1.6/src/Tools/binreloc.c |
92 |
+--- Rivet-3.1.6.orig/src/Tools/binreloc.c 2022-06-26 23:23:44.359890803 +0200 |
93 |
++++ Rivet-3.1.6/src/Tools/binreloc.c 2022-06-26 23:24:36.962045655 +0200 |
94 |
+@@ -215,7 +215,7 @@ |
95 |
+ break; |
96 |
+ |
97 |
+ /* Sanity check. */ |
98 |
+- if (strchr (line, '/') == NULL) |
99 |
++ if (strstr (line, " r-xp ") == NULL || strchr (line, '/') == NULL) |
100 |
+ /* With binutils > 2.30 (const void *) "" is placed in "r--p" area of memory |
101 |
+ In general, for the mechanism of detection it doesn't really matter where your symbol is, |
102 |
+ therefore, check for strstr (line, " r-xp ") == NULL is removed */ |
103 |
|
104 |
diff --git a/sci-physics/rivet/metadata.xml b/sci-physics/rivet/metadata.xml |
105 |
new file mode 100644 |
106 |
index 000000000..7f9434874 |
107 |
--- /dev/null |
108 |
+++ b/sci-physics/rivet/metadata.xml |
109 |
@@ -0,0 +1,20 @@ |
110 |
+<?xml version="1.0" encoding="UTF-8"?> |
111 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
112 |
+<pkgmetadata> |
113 |
+ <maintainer type="person"> |
114 |
+ <email>alexander@×××××××××××××××××××.de</email> |
115 |
+ <name>Alexander Puck Neuwirth</name> |
116 |
+ </maintainer> |
117 |
+ <maintainer type="project"> |
118 |
+ <email>sci-physics@g.o</email> |
119 |
+ <name>Gentoo Physics Project</name> |
120 |
+ </maintainer> |
121 |
+ <longdescription lang="en"> |
122 |
+ Rivet is a system for preservation of particle-collider analysis logic, analysis reinterpretation via MC simulations, and the validation and improvement of Monte Carlo event generator codes. |
123 |
+ It covers all aspects of collider physics, from unfolded precision measurements to reconstruction-level searches, and physics from the Standard Model to BSM theories, and from perturbative jet, boson and top-quarks to hadron decays, inclusive QCD, and Heavy Ion physics. |
124 |
+ </longdescription> |
125 |
+ <use> |
126 |
+ <flag name="hepmc3">Build with HepMC3</flag> |
127 |
+ <flag name="hepmc2">Build with HepMC2</flag> |
128 |
+ </use> |
129 |
+</pkgmetadata> |
130 |
|
131 |
diff --git a/sci-physics/rivet/rivet-3.1.5.ebuild b/sci-physics/rivet/rivet-3.1.5.ebuild |
132 |
new file mode 100644 |
133 |
index 000000000..5470ea5a7 |
134 |
--- /dev/null |
135 |
+++ b/sci-physics/rivet/rivet-3.1.5.ebuild |
136 |
@@ -0,0 +1,75 @@ |
137 |
+# Copyright 2020 Gentoo Authors |
138 |
+# Distributed under the terms of the GNU General Public License v2 |
139 |
+ |
140 |
+EAPI=8 |
141 |
+ |
142 |
+PYTHON_COMPAT=( python3_{8..10} ) |
143 |
+ |
144 |
+inherit python-single-r1 flag-o-matic autotools |
145 |
+ |
146 |
+MY_PN="Rivet" |
147 |
+MY_PF=${MY_PN}-${PV} |
148 |
+ |
149 |
+DESCRIPTION="Rivet toolkit (Robust Independent Validation of Experiment and Theory)" |
150 |
+HOMEPAGE="https://gitlab.com/hepcedar/rivet" |
151 |
+SRC_URI="https://www.hepforge.org/archive/rivet/${MY_PF}.tar.gz" |
152 |
+S=${WORKDIR}/${MY_PF} |
153 |
+ |
154 |
+LICENSE="GPL-3+" |
155 |
+SLOT="3" |
156 |
+KEYWORDS="~amd64" |
157 |
+IUSE="+hepmc3 hepmc2" |
158 |
+REQUIRED_USE=" |
159 |
+ ^^ ( hepmc3 hepmc2 ) |
160 |
+ ${PYTHON_REQUIRED_USE} |
161 |
+" |
162 |
+ |
163 |
+RDEPEND=" |
164 |
+ >=sci-physics/yoda-1.9.4[python(-),${PYTHON_SINGLE_USEDEP}] |
165 |
+ >=sci-physics/fastjet-3.4.0[plugins] |
166 |
+ >=sci-physics/fastjet-contrib-1.046 |
167 |
+ hepmc2? ( sci-physics/hepmc:2=[-cm(-),gev(+)] ) |
168 |
+ hepmc3? ( sci-physics/hepmc:3=[-cm(-),gev(+)] ) |
169 |
+ |
170 |
+ sci-libs/gsl |
171 |
+ |
172 |
+ virtual/latex-base |
173 |
+ media-gfx/imagemagick |
174 |
+ app-text/ghostscript-gpl |
175 |
+ |
176 |
+ ${PYTHON_DEPS} |
177 |
+" |
178 |
+DEPEND="${RDEPEND}" |
179 |
+BDEPEND=" |
180 |
+ virtual/fortran |
181 |
+ >=dev-python/cython-0.29.24 |
182 |
+" |
183 |
+ |
184 |
+PATCHES=( |
185 |
+ "${FILESDIR}"/${P}-doc.patch |
186 |
+ "${FILESDIR}"/${P}-test.patch |
187 |
+) |
188 |
+ |
189 |
+src_prepare() { |
190 |
+ default |
191 |
+ eautoreconf |
192 |
+} |
193 |
+ |
194 |
+src_configure() { |
195 |
+ # Eigen complains about alignment (see https://gitlab.com/libeigen/eigen/-/issues/2523). |
196 |
+ # does this affect more cpus? |
197 |
+ replace-cpu-flags znver1 x86-64 |
198 |
+ PREFIX_YODA=$(yoda-config --prefix) || die |
199 |
+ PREFIX_FJ=$(fastjet-config --prefix) || die |
200 |
+ econf \ |
201 |
+ $(usex hepmc2 "--with-hepmc=/usr" "") \ |
202 |
+ $(usex hepmc3 "--with-hepmc3=/usr" "") \ |
203 |
+ --with-yoda=$PREFIX_YODA \ |
204 |
+ --with-fastjet=$PREFIX_FJ |
205 |
+} |
206 |
+ |
207 |
+src_install() { |
208 |
+ default |
209 |
+ python_optimize |
210 |
+ find "${ED}" -name '*.la' -delete || die |
211 |
+} |
212 |
|
213 |
diff --git a/sci-physics/rivet/rivet-3.1.6.ebuild b/sci-physics/rivet/rivet-3.1.6.ebuild |
214 |
new file mode 100644 |
215 |
index 000000000..89a2a09ba |
216 |
--- /dev/null |
217 |
+++ b/sci-physics/rivet/rivet-3.1.6.ebuild |
218 |
@@ -0,0 +1,75 @@ |
219 |
+# Copyright 2022 Gentoo Authors |
220 |
+# Distributed under the terms of the GNU General Public License v2 |
221 |
+ |
222 |
+EAPI=8 |
223 |
+ |
224 |
+PYTHON_COMPAT=( python3_{8..10} ) |
225 |
+ |
226 |
+inherit python-single-r1 flag-o-matic autotools |
227 |
+ |
228 |
+MY_PN="Rivet" |
229 |
+MY_PF=${MY_PN}-${PV} |
230 |
+ |
231 |
+DESCRIPTION="Rivet toolkit (Robust Independent Validation of Experiment and Theory)" |
232 |
+HOMEPAGE="https://gitlab.com/hepcedar/rivet" |
233 |
+SRC_URI="https://www.hepforge.org/archive/rivet/${MY_PF}.tar.gz" |
234 |
+S=${WORKDIR}/${MY_PF} |
235 |
+ |
236 |
+LICENSE="GPL-3+" |
237 |
+SLOT="3" |
238 |
+KEYWORDS="~amd64" |
239 |
+IUSE="+hepmc3 hepmc2" |
240 |
+REQUIRED_USE=" |
241 |
+ ^^ ( hepmc3 hepmc2 ) |
242 |
+ ${PYTHON_REQUIRED_USE} |
243 |
+" |
244 |
+ |
245 |
+RDEPEND=" |
246 |
+ >=sci-physics/yoda-1.9.5[python(-),${PYTHON_SINGLE_USEDEP}] |
247 |
+ >=sci-physics/fastjet-3.4.0[plugins] |
248 |
+ >=sci-physics/fastjet-contrib-1.048 |
249 |
+ hepmc2? ( sci-physics/hepmc:2=[-cm(-),gev(+)] ) |
250 |
+ hepmc3? ( sci-physics/hepmc:3=[-cm(-),gev(+)] ) |
251 |
+ |
252 |
+ sci-libs/gsl |
253 |
+ |
254 |
+ virtual/latex-base |
255 |
+ media-gfx/imagemagick |
256 |
+ app-text/ghostscript-gpl |
257 |
+ |
258 |
+ ${PYTHON_DEPS} |
259 |
+" |
260 |
+DEPEND="${RDEPEND}" |
261 |
+BDEPEND=" |
262 |
+ virtual/fortran |
263 |
+ >=dev-python/cython-0.29.24 |
264 |
+" |
265 |
+ |
266 |
+PATCHES=( |
267 |
+ "${FILESDIR}"/${P}-binreloc.patch |
268 |
+ "${FILESDIR}"/${PN}-3.1.5-test.patch |
269 |
+) |
270 |
+ |
271 |
+src_prepare() { |
272 |
+ default |
273 |
+ eautoreconf |
274 |
+} |
275 |
+ |
276 |
+src_configure() { |
277 |
+ # Eigen complains about alignment (see https://gitlab.com/libeigen/eigen/-/issues/2523). |
278 |
+ # does this affect more cpus? |
279 |
+ replace-cpu-flags znver1 x86-64 |
280 |
+ PREFIX_YODA=$(yoda-config --prefix) || die |
281 |
+ PREFIX_FJ=$(fastjet-config --prefix) || die |
282 |
+ econf \ |
283 |
+ $(usex hepmc2 "--with-hepmc=/usr" "") \ |
284 |
+ $(usex hepmc3 "--with-hepmc3=/usr" "") \ |
285 |
+ --with-yoda=$PREFIX_YODA \ |
286 |
+ --with-fastjet=$PREFIX_FJ |
287 |
+} |
288 |
+ |
289 |
+src_install() { |
290 |
+ default |
291 |
+ python_optimize |
292 |
+ find "${ED}" -name '*.la' -delete || die |
293 |
+} |