commit:     a8e9c7431d8be9d4a83083bd9d8f48c514a0a16a
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
AuthorDate: Mon Aug 22 14:15:52 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Aug 27 08:27:10 2022 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=a8e9c743

sci-physics/rivet: new package, add 3.1.5, 3.1.6

Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>
Closes: https://github.com/gentoo/sci/pull/1166
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-physics/rivet/files/rivet-3.1.5-doc.patch      | 38 +++++++++++
 sci-physics/rivet/files/rivet-3.1.5-test.patch     | 11 ++++
 sci-physics/rivet/files/rivet-3.1.6-binreloc.patch | 12 ++++
 sci-physics/rivet/metadata.xml                     | 20 ++++++
 sci-physics/rivet/rivet-3.1.5.ebuild               | 75 ++++++++++++++++++++++
 sci-physics/rivet/rivet-3.1.6.ebuild               | 75 ++++++++++++++++++++++
 6 files changed, 231 insertions(+)

diff --git a/sci-physics/rivet/files/rivet-3.1.5-doc.patch 
b/sci-physics/rivet/files/rivet-3.1.5-doc.patch
new file mode 100644
index 000000000..ae01b1812
--- /dev/null
+++ b/sci-physics/rivet/files/rivet-3.1.5-doc.patch
@@ -0,0 +1,38 @@
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -11,7 +11,7 @@
+       $(mkdir_p) analists && cd analists && \
+     
LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(LD_LIBRARY_PATH)
 \
+     
DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(DYLD_LIBRARY_PATH)
 \
+-    PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \
++    PYTHONPATH=$(shell realpath 
$(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH)
 \
+     RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \
+     $(PYTHON) $(abs_srcdir)/analists/mk-analysis-html || true
+ 
+@@ -21,7 +21,7 @@
+       $(mkdir_p) analists && cd analists && \
+     
LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(LD_LIBRARY_PATH)
 \
+     
DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(DYLD_LIBRARY_PATH)
 \
+-    PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \
++    PYTHONPATH=$(shell realpath 
$(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH)
 \
+     RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \
+     $(PYTHON) $(abs_srcdir)/analists/mk-analysis-json || true
+ 
+@@ -31,7 +31,7 @@
+       $(mkdir_p) analists && cd analists && \
+     
LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(LD_LIBRARY_PATH)
 \
+     
DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH):$(DYLD_LIBRARY_PATH)
 \
+-    PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \
++    PYTHONPATH=$(shell realpath 
$(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH)
 \
+     RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \
+     $(PYTHON) $(abs_srcdir)/analists/mk-analysis-txt || true
+ 
+@@ -46,7 +46,7 @@
+       $(mkdir_p) coverage && cd coverage && \
+     
LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(LD_LIBRARY_PATH):$(LD_LIBRARY_PATH)
 \
+     
DYLD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs:$(FASTJETLIBPATH):$(FJCONTRIBLIBPATH):$(DYLD_LIBRARY_PATH):$(DYLD_LIBRARY_PATH)
 \
+-    PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \
++    PYTHONPATH=$(shell realpath 
$(abs_top_builddir)/pyext/build/lib*):$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH)
 \
+     RIVET_ANALYSIS_PATH=$(abs_top_builddir)/analyses:: \
+     $(abs_srcdir)/coverage/mk-coverage-htmls || true
+ 

diff --git a/sci-physics/rivet/files/rivet-3.1.5-test.patch 
b/sci-physics/rivet/files/rivet-3.1.5-test.patch
new file mode 100644
index 000000000..915473eb1
--- /dev/null
+++ b/sci-physics/rivet/files/rivet-3.1.5-test.patch
@@ -0,0 +1,11 @@
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -26,7 +26,7 @@
+   LIBLOCATION=$(top_builddir)/src/.libs \
+   
LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH)
 \
+   
DYLD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(HEPMC3LIBPATH):$(YODALIBPATH)
 \
+-  PYTHONPATH=$(top_builddir)/pyext/build/$(RIVET_SETUP_PY_PATH):$(PYTHONPATH) 
\
++  PYTHONPATH=$(shell realpath 
$(top_builddir)/pyext/build/lib*):$(top_builddir)/pyext/build/$(RIVET_SETUP_PY_PATH):$(PYTHONPATH)
 \
+   PATH=$(top_builddir)/bin:$(top_srcdir)/bin:$(PATH) \
+   PYTHON=$(PYTHON) \
+   RIVET_TESTS_SRC=$(srcdir)

diff --git a/sci-physics/rivet/files/rivet-3.1.6-binreloc.patch 
b/sci-physics/rivet/files/rivet-3.1.6-binreloc.patch
new file mode 100644
index 000000000..68fd4436c
--- /dev/null
+++ b/sci-physics/rivet/files/rivet-3.1.6-binreloc.patch
@@ -0,0 +1,12 @@
+diff -Naru Rivet-3.1.6.orig/src/Tools/binreloc.c 
Rivet-3.1.6/src/Tools/binreloc.c
+--- Rivet-3.1.6.orig/src/Tools/binreloc.c      2022-06-26 23:23:44.359890803 
+0200
++++ Rivet-3.1.6/src/Tools/binreloc.c   2022-06-26 23:24:36.962045655 +0200
+@@ -215,7 +215,7 @@
+                       break;
+ 
+               /* Sanity check. */
+-              if (strchr (line, '/') == NULL)
++              if (strstr (line, " r-xp ") == NULL || strchr (line, '/') == 
NULL)
+               /* With binutils > 2.30 (const void *) "" is placed in "r--p" 
area of memory
+          In general, for the mechanism of detection it doesn't really matter 
where your symbol is,
+          therefore, check for strstr (line, " r-xp ") == NULL is removed */

diff --git a/sci-physics/rivet/metadata.xml b/sci-physics/rivet/metadata.xml
new file mode 100644
index 000000000..7f9434874
--- /dev/null
+++ b/sci-physics/rivet/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>alexan...@neuwirth-informatik.de</email>
+               <name>Alexander Puck Neuwirth</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>sci-phys...@gentoo.org</email>
+               <name>Gentoo Physics Project</name>
+       </maintainer>
+       <longdescription lang="en">
+       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. 
+       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.
+       </longdescription>
+       <use>
+               <flag name="hepmc3">Build with HepMC3</flag>
+               <flag name="hepmc2">Build with HepMC2</flag>
+       </use>
+</pkgmetadata>

diff --git a/sci-physics/rivet/rivet-3.1.5.ebuild 
b/sci-physics/rivet/rivet-3.1.5.ebuild
new file mode 100644
index 000000000..5470ea5a7
--- /dev/null
+++ b/sci-physics/rivet/rivet-3.1.5.ebuild
@@ -0,0 +1,75 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit python-single-r1 flag-o-matic autotools
+
+MY_PN="Rivet"
+MY_PF=${MY_PN}-${PV}
+
+DESCRIPTION="Rivet toolkit (Robust Independent Validation of Experiment and 
Theory)"
+HOMEPAGE="https://gitlab.com/hepcedar/rivet";
+SRC_URI="https://www.hepforge.org/archive/rivet/${MY_PF}.tar.gz";
+S=${WORKDIR}/${MY_PF}
+
+LICENSE="GPL-3+"
+SLOT="3"
+KEYWORDS="~amd64"
+IUSE="+hepmc3 hepmc2"
+REQUIRED_USE="
+       ^^ ( hepmc3 hepmc2 )
+       ${PYTHON_REQUIRED_USE}
+"
+
+RDEPEND="
+       >=sci-physics/yoda-1.9.4[python(-),${PYTHON_SINGLE_USEDEP}]
+       >=sci-physics/fastjet-3.4.0[plugins]
+       >=sci-physics/fastjet-contrib-1.046
+       hepmc2? ( sci-physics/hepmc:2=[-cm(-),gev(+)] )
+       hepmc3? ( sci-physics/hepmc:3=[-cm(-),gev(+)] )
+
+       sci-libs/gsl
+
+       virtual/latex-base
+       media-gfx/imagemagick
+       app-text/ghostscript-gpl
+
+       ${PYTHON_DEPS}
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       virtual/fortran
+       >=dev-python/cython-0.29.24
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-doc.patch
+       "${FILESDIR}"/${P}-test.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       # Eigen complains about alignment (see 
https://gitlab.com/libeigen/eigen/-/issues/2523).
+       # does this affect more cpus?
+       replace-cpu-flags znver1 x86-64
+       PREFIX_YODA=$(yoda-config --prefix) || die
+       PREFIX_FJ=$(fastjet-config --prefix) || die
+       econf \
+               $(usex hepmc2 "--with-hepmc=/usr" "") \
+               $(usex hepmc3 "--with-hepmc3=/usr" "") \
+               --with-yoda=$PREFIX_YODA \
+               --with-fastjet=$PREFIX_FJ
+}
+
+src_install() {
+       default
+       python_optimize
+       find "${ED}" -name '*.la' -delete || die
+}

diff --git a/sci-physics/rivet/rivet-3.1.6.ebuild 
b/sci-physics/rivet/rivet-3.1.6.ebuild
new file mode 100644
index 000000000..89a2a09ba
--- /dev/null
+++ b/sci-physics/rivet/rivet-3.1.6.ebuild
@@ -0,0 +1,75 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit python-single-r1 flag-o-matic autotools
+
+MY_PN="Rivet"
+MY_PF=${MY_PN}-${PV}
+
+DESCRIPTION="Rivet toolkit (Robust Independent Validation of Experiment and 
Theory)"
+HOMEPAGE="https://gitlab.com/hepcedar/rivet";
+SRC_URI="https://www.hepforge.org/archive/rivet/${MY_PF}.tar.gz";
+S=${WORKDIR}/${MY_PF}
+
+LICENSE="GPL-3+"
+SLOT="3"
+KEYWORDS="~amd64"
+IUSE="+hepmc3 hepmc2"
+REQUIRED_USE="
+       ^^ ( hepmc3 hepmc2 )
+       ${PYTHON_REQUIRED_USE}
+"
+
+RDEPEND="
+       >=sci-physics/yoda-1.9.5[python(-),${PYTHON_SINGLE_USEDEP}]
+       >=sci-physics/fastjet-3.4.0[plugins]
+       >=sci-physics/fastjet-contrib-1.048
+       hepmc2? ( sci-physics/hepmc:2=[-cm(-),gev(+)] )
+       hepmc3? ( sci-physics/hepmc:3=[-cm(-),gev(+)] )
+
+       sci-libs/gsl
+
+       virtual/latex-base
+       media-gfx/imagemagick
+       app-text/ghostscript-gpl
+
+       ${PYTHON_DEPS}
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       virtual/fortran
+       >=dev-python/cython-0.29.24
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-binreloc.patch
+       "${FILESDIR}"/${PN}-3.1.5-test.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       # Eigen complains about alignment (see 
https://gitlab.com/libeigen/eigen/-/issues/2523).
+       # does this affect more cpus?
+       replace-cpu-flags znver1 x86-64
+       PREFIX_YODA=$(yoda-config --prefix) || die
+       PREFIX_FJ=$(fastjet-config --prefix) || die
+       econf \
+               $(usex hepmc2 "--with-hepmc=/usr" "") \
+               $(usex hepmc3 "--with-hepmc3=/usr" "") \
+               --with-yoda=$PREFIX_YODA \
+               --with-fastjet=$PREFIX_FJ
+}
+
+src_install() {
+       default
+       python_optimize
+       find "${ED}" -name '*.la' -delete || die
+}

Reply via email to