diff options
author | 2024-03-18 23:27:33 +0100 | |
---|---|---|
committer | 2024-03-20 20:47:20 +0100 | |
commit | 9b59b6f8ab5d70a0d177851abd1cc643d3baa0ee (patch) | |
tree | 8f9d2ba76645b3b728a170cf40e24b2576045f58 /sci-physics | |
parent | sci-physics/lhapdf: enable py3.12 (diff) | |
download | gentoo-9b59b6f8ab5d70a0d177851abd1cc643d3baa0ee.tar.gz gentoo-9b59b6f8ab5d70a0d177851abd1cc643d3baa0ee.tar.bz2 gentoo-9b59b6f8ab5d70a0d177851abd1cc643d3baa0ee.zip |
sci-physics/rivet: new package, add 3.1.10
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
Closes: https://github.com/gentoo/gentoo/pull/35824
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/rivet/Manifest | 1 | ||||
-rw-r--r-- | sci-physics/rivet/files/rivet-3.1.6-binreloc.patch | 12 | ||||
-rw-r--r-- | sci-physics/rivet/files/rivet-3.1.9-pythontests.patch | 21 | ||||
-rw-r--r-- | sci-physics/rivet/metadata.xml | 25 | ||||
-rw-r--r-- | sci-physics/rivet/rivet-3.1.10.ebuild | 115 |
5 files changed, 174 insertions, 0 deletions
diff --git a/sci-physics/rivet/Manifest b/sci-physics/rivet/Manifest new file mode 100644 index 000000000000..af63e530482c --- /dev/null +++ b/sci-physics/rivet/Manifest @@ -0,0 +1 @@ +DIST rivet-3.1.10.tar.gz 36327949 BLAKE2B 76d8ed8b3ee0eda2f7f03b4e423c46f49d39006a4ab0b66622ab2b2a7817f91f1f7bc648ecfb2e9d2d73da1619069c25fe9078c9b04a54cce8e1a71c33dc6b1a SHA512 9a0a3516686b82c7cf667bab230229553e9e49e5656d763046a86baa1f2d3fdb3167e53540533ebe5da532e71f15140ab8dd16de4075fd76e634e0c6919155e4 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 000000000000..e16691b88b47 --- /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 +--- a/src/Tools/binreloc.c 2022-06-26 23:23:44.359890803 +0200 ++++ b/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/files/rivet-3.1.9-pythontests.patch b/sci-physics/rivet/files/rivet-3.1.9-pythontests.patch new file mode 100644 index 000000000000..ad08ab63db5d --- /dev/null +++ b/sci-physics/rivet/files/rivet-3.1.9-pythontests.patch @@ -0,0 +1,21 @@ +--- a/test/Makefile.am 2024-03-18 22:15:31.296275378 +0100 ++++ b/test/Makefile.am 2024-03-18 22:15:57.499969373 +0100 +@@ -35,14 +35,16 @@ + RIVET_TESTS_SRC=$(srcdir) + + TESTS = \ +-testMath testMatVec testCmp testApi.sh testNaN.sh testBeams \ +-testImport.sh ++testMath testMatVec testCmp testApi.sh testNaN.sh testBeams ++if ENABLE_PYEXT ++TESTS += testImport.sh + + if ENABLE_ANALYSES + + TESTS += testCmdLine.sh + + endif ++endif + + EXTRA_DIST = testApi.hepmc testCmdLine.sh testImport.sh testApi.sh testNaN.sh + diff --git a/sci-physics/rivet/metadata.xml b/sci-physics/rivet/metadata.xml new file mode 100644 index 000000000000..a004d00e7bbe --- /dev/null +++ b/sci-physics/rivet/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>alexander@neuwirth-informatik.de</email> + <name>Alexander Puck Neuwirth</name> + </maintainer> + <maintainer type="project"> + <email>sci-physics@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="zlib">Build with zlib</flag> + <flag name="hepmc3">Build with HepMC3</flag> + <flag name="hepmc2">Build with HepMC2</flag> + </use> + <upstream> + <remote-id type="gitlab">hepcedar/rivet</remote-id> + </upstream> +</pkgmetadata> diff --git a/sci-physics/rivet/rivet-3.1.10.ebuild b/sci-physics/rivet/rivet-3.1.10.ebuild new file mode 100644 index 000000000000..e1f11ef57f95 --- /dev/null +++ b/sci-physics/rivet/rivet-3.1.10.ebuild @@ -0,0 +1,115 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-single-r1 flag-o-matic autotools optfeature bash-completion-r1 + +MY_PN="Rivet" +MY_PF=${MY_PN}-${PV} + +DESCRIPTION="Rivet toolkit (Robust Independent Validation of Experiment and Theory)" +HOMEPAGE=" + https://rivet.hepforge.org/ + https://gitlab.com/hepcedar/rivet +" +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/hepcedar/rivet" +else + SRC_URI="https://www.hepforge.org/archive/rivet/${MY_PF}.tar.gz -> ${P}.tar.gz" + S=${WORKDIR}/${MY_PF} + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3+" +SLOT="3" +IUSE="+hepmc3 hepmc2 +zlib +python" +REQUIRED_USE=" + ^^ ( hepmc3 hepmc2 ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + >=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 + zlib? ( sys-libs/zlib ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/matplotlib[${PYTHON_USEDEP}] + ') + >=sci-physics/yoda-1.9.8[${PYTHON_SINGLE_USEDEP}] + <sci-physics/yoda-2[${PYTHON_SINGLE_USEDEP}] + ) + !python? ( + >=sci-physics/yoda-1.9.8 + <sci-physics/yoda-2 + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/fortran + app-shells/bash + python? ( + $(python_gen_cond_dep ' + >=dev-python/cython-0.29.24[${PYTHON_USEDEP}] + ') + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-3.1.6-binreloc.patch + "${FILESDIR}"/${PN}-3.1.9-pythontests.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +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 + # not posix compatible, only bash + CONFIG_SHELL=${ESYSROOT}/bin/bash econf \ + $(use_with zlib zlib "${ESYSROOT}/usr") \ + $(usex hepmc2 "--with-hepmc=${ESYSROOT}/usr" "") \ + $(usex hepmc3 "--with-hepmc3=${ESYSROOT}/usr" "") \ + --with-yoda="${ESYSROOT}/usr" \ + --with-fastjet="${ESYSROOT}/usr" \ + $(use_enable python pyext) \ + $(usex python CYTHON="${ESYSROOT}/usr/bin/cython") +} + +src_install() { + default + use python && python_optimize + find "${ED}" -name '*.la' -delete || die + if use python ; then + newbashcomp "${ED}"/etc/bash_completion.d/${PN}-completion ${PN} + bashcomp_alias ${PN} ${PN}-config \ + ${PN}-build \ + ${PN}-buildplugin \ + ${PN}-cmphistos \ + make-plots \ + ${PN}-mkhtml \ + ${PN}-mkhtml-mpl + rm "${ED}"/etc/bash_completion.d/${PN}-completion || die + fi +} + +pkg_postinstall() { + optfeature "plotting support" virtual/latex-base media-gfx/imagemagick app-text/ghostscript-gpl +} |