commit:     ed5f074c0ec9d7e30637d47524403f25db80da11
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
AuthorDate: Sun Oct 20 12:29:45 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun Oct 20 16:31:03 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5f074c

sci-physics/pythia: add 8.3.12

Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-physics/pythia/Manifest                        |  1 +
 sci-physics/pythia/metadata.xml                    |  3 +
 .../{pythia-9999.ebuild => pythia-8.3.12.ebuild}   | 82 +++++++++++++---------
 sci-physics/pythia/pythia-9999.ebuild              | 82 +++++++++++++---------
 4 files changed, 104 insertions(+), 64 deletions(-)

diff --git a/sci-physics/pythia/Manifest b/sci-physics/pythia/Manifest
index 79a364ae3853..0ede907ae6f1 100644
--- a/sci-physics/pythia/Manifest
+++ b/sci-physics/pythia/Manifest
@@ -13,3 +13,4 @@ DIST pythia8245.tgz 23605527 BLAKE2B 
1007c2f8b50a115d29fe1b0363a187feca717cb2147
 DIST pythia8307.tgz 26016414 BLAKE2B 
0253309d71ca4e46183de80396c3a226d072ea2e8aeaf87da33994b3303017a6ca567f6731902aba43c20fec2c0aeace0728f2ce725f9221f161a70055fa6043
 SHA512 
63e7a3e76f8bfe0cd7b34ef523d8bbcfa50ee780c8437384ef7eb208f0f682481b0166673647db98468baeb6df855fdbf0cbb1509dcc5eda39c90f3f3461fd2a
 DIST pythia8309.tgz 28407620 BLAKE2B 
0ef226e2e65829952d670b57c24bff2108d916ca547233041e97dabb81d9616be3e404da7225f9cb4a2c9773c0c22939d813eaed92560e01c6fbe37e4690c232
 SHA512 
c7d99a9a1f7bf1441532720667ab224283b866e7f3ea9e730c839ac62e3b8b9e5c01471fb94a4a48d481635544e4ed230796a710531650bfffde96f0f78590bf
 DIST pythia8311.tgz 28757044 BLAKE2B 
93a7cc26682bc6418f85e41def94a8cdfe39e180fa9fec2a6e47e9237fc2d42800dca2b76f54e2d56cb1d3a2b9a0008baf7b77610aabac2a6505fe08b2b4ffe2
 SHA512 
e0ae6cb444f11f3e3cf84d738b8c135f07ceafb28911b855bb63e3c596c5b9fd312a1f4ff78a098b707bfbb8f517a46177c4dbc57b4882cf03b12b0be49e2885
+DIST pythia8312.tgz 30218597 BLAKE2B 
71efca55572a241cf369e90186b033fbcd2326de82867f3f13057fbda372885632cab3d7b34ac5b444419bba4dd8d6c4bb90e12bf2424a43ae313c21268e8d89
 SHA512 
683ece1bd2cfd49d9cee742ce3fab693c5bf15017a6584d33e2a00bd0f0a67d1b84ff48da75f39cb4a4b564b9a35f997ab5187fe691f1f4b724cec5a4d717a23

diff --git a/sci-physics/pythia/metadata.xml b/sci-physics/pythia/metadata.xml
index fb8f9f855f2b..d46e6faf9e50 100644
--- a/sci-physics/pythia/metadata.xml
+++ b/sci-physics/pythia/metadata.xml
@@ -23,6 +23,9 @@
     <flag name="hepmc3">Adds support for High Energy Physics Monte Carlo 
Generators 3 <pkg>sci-physics/hepmc</pkg></flag>
     <flag name="lhapdf">Support the use of external PDF sets via 
<pkg>sci-physics/lhapdf</pkg></flag>
     <flag name="root">Use <pkg>sci-physics/root</pkg> trees and histograms (in 
examples only)</flag>
+    <flag name="highfive">Support hdf and highfive</flag>
+    <flag name="mpich">Support mpich</flag>
+    <flag name="rivet">Support <pkg>sci-physics/rivet</pkg></flag>
   </use>
   <upstream>
     <remote-id type="gitlab">Pythia8/releases</remote-id>

diff --git a/sci-physics/pythia/pythia-9999.ebuild 
b/sci-physics/pythia/pythia-8.3.12.ebuild
similarity index 77%
copy from sci-physics/pythia/pythia-9999.ebuild
copy to sci-physics/pythia/pythia-8.3.12.ebuild
index fa0f3f011561..cc536ceee86e 100644
--- a/sci-physics/pythia/pythia-9999.ebuild
+++ b/sci-physics/pythia/pythia-8.3.12.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit toolchain-funcs
+PYTHON_COMPAT=( python3_{11..13} )
+inherit toolchain-funcs python-single-r1
 
 MV=$(ver_cut 1-2)
 MY_P="${PN}${PV//./}"
@@ -11,8 +12,6 @@ LHA_VER="6.2.1"
 
 DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
 HOMEPAGE="https://pythia.org/";
-
-# just data
 SRC_URI="test? ( lhapdf? (
                https://lhapdfsets.web.cern.ch/lhapdfsets/current/CT10.tar.gz
                
https://lhapdfsets.web.cern.ch/lhapdfsets/current/MRST2007lomod.tar.gz
@@ -21,24 +20,25 @@ SRC_URI="test? ( lhapdf? (
                https://lhapdfsets.web.cern.ch/lhapdfsets/current/cteq66.tar.gz
                https://lhapdfsets.web.cern.ch/lhapdfsets/current/cteq6l1.tar.gz
                
https://www.hepforge.org/downloads/lhapdf/pdfsets/v6.backup/${LHA_VER}/MRST2004qed.tar.gz
-               ) )"
-
+       ) )
+"
 if [[ ${PV} == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://gitlab.com/Pythia8/releases";
 else
        SRC_URI="https://pythia.org/download/${PN}${MV//./}/${MY_P}.tgz
-       $SRC_URI"
+       ${SRC_URI}"
        KEYWORDS="~amd64 ~x86"
        S="${WORKDIR}/${MY_P}"
 fi
 
-SLOT="8"
 LICENSE="GPL-2"
-IUSE="doc examples fastjet +hepmc3 hepmc2 lhapdf root test zlib"
+SLOT="8"
+IUSE="doc examples fastjet +hepmc3 hepmc2 lhapdf root test zlib python 
highfive mpich rivet" # evtgen mg5mes rivet powheg
 RESTRICT="!test? ( test )"
 REQUIRED_USE="
        ?? ( hepmc3 hepmc2 )
+       python? ( ${PYTHON_REQUIRED_USE} )
 "
 
 RDEPEND="
@@ -46,16 +46,28 @@ RDEPEND="
        hepmc3? ( sci-physics/hepmc:3= )
        hepmc2? ( sci-physics/hepmc:2= )
        lhapdf? ( sci-physics/lhapdf:= )
-       zlib? ( sys-libs/zlib )"
+       zlib? ( sys-libs/zlib )
+       highfive? (
+               sci-libs/HighFive
+               sci-libs/hdf5[cxx]
+       )
+       rivet? (
+               sci-physics/rivet:*
+       )
+       mpich? ( sys-cluster/mpich )
+       python? ( ${PYTHON_DEPS} )
+       "
+DEPEND="${RDEPEND}"
 # ROOT is used only when building related tests
-DEPEND="${RDEPEND}
+BDEPEND="
        test? (
                root? ( sci-physics/root:= )
-       )"
+       )
+"
 
-PATCHES=(
-       "${FILESDIR}"/${PN}8209-root-noninteractive.patch
-)
+pkg_setup() {
+       use python && python-single-r1_pkg_setup
+}
 
 pkg_pretend() {
        if use root && ! use test; then
@@ -80,9 +92,6 @@ src_prepare() {
                -e "s|-O2|${CXXFLAGS}|g" \
                -e "s|Cint|Core|g" \
                configure || die
-       sed -i 's|$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED)|$(CXX) $(LDFLAGS) 
$^ -o $@ $(CXX_COMMON) $(CXX_SHARED)|g' \
-               Makefile || die
-       sed -i 's|$(CXX)|$(CXX) $(LDFLAGS)|' examples/Makefile || die
        # we use lhapdf6 instead of lhapdf5
        # some PDFs changed, use something similar
        sed -i \
@@ -99,7 +108,7 @@ src_prepare() {
                -e "s|1e-8|3e-1|g" \
                -e "s|nlo_as_0119_qed|nlo_as_0119_qed_mc|g" \
                -e "s|xmldoc|share/Pythia8/xmldoc|g" \
-               examples/main54.cc || die
+               examples/main203.cc || die
        # ask cflags from root
        sed -i "s|root-config|root-config --cflags|g" examples/Makefile || die
 
@@ -113,15 +122,20 @@ src_prepare() {
 # - ProMC  https://github.com/Argonne-National-Laboratory/ProMC/
 src_configure() {
        # homemade configure script
+       local -x CXX="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}"
        ./configure \
                --arch=Linux \
-               --cxx="$(tc-getCXX)" \
                --prefix="${EPREFIX}/usr" \
                --prefix-lib="${EPREFIX}/usr/$(get_libdir)" \
                --prefix-share="${EPYTHIADIR}" \
                $(usex fastjet "--with-fastjet3" "") \
                $(usex zlib "--with-gzip" "") \
                $(use_with hepmc3) \
+               $(use_with highfive) \
+               $(usex highfive --with-hdf5 "") \
+               $(use_with python) \
+               $(use_with rivet) \
+               $(use_with mpich) \
                $(use_with hepmc2) \
                $(usex lhapdf "--with-lhapdf6
                        --with-lhapdf6-plugin=LHAPDF6.h
@@ -134,6 +148,7 @@ src_configure() {
        # fix pythia config script
        sed -i \
                -e 's|Pythia8/examples/Makefile.inc|Pythia8/Makefile.inc|' \
+               -e "s|CFG_FILE=.*|CFG_FILE=${EPYTHIADIR}/Makefile.inc|" \
                -e 's|LINE%=|LINE%%=|' \
                bin/pythia8-config || die
 }
@@ -141,18 +156,15 @@ src_configure() {
 src_test() {
        cd examples || die
 
-       local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)"
-       use hepmc3 && tests+=" $(echo main{41,42,85,86}.out)"
-       use hepmc3 && use lhapdf && tests+=" $(echo main{43,{87..89}}.out)"
-       use lhapdf && tests+=" $(echo main{51..54}.out)"
-       use fastjet && tests+=" $(echo main{71,72}.out)"
-       use fastjet && use hepmc3 && use lhapdf && tests+=" $(echo 
main{81..84}).out"
-       use root && tests+=" main91.out"
-       # Disabled tests:
-       # 33    needs PowHEG
-       # 46    needs ProMC
-       # 48    needs EvtGen
-       # 92    generated ROOT dictionary is badly broken
+       local tests="$(echo main{{101..103},{121..127}})"
+       use hepmc3 && tests+=" $(echo main{131..135})"
+       use hepmc3 && use mpich && use highfive && tests+=" $(echo main136)"
+       use lhapdf && tests+=" $(echo main{201..204})"
+       use fastjet && tests+=" $(echo main{211..216})"
+       use root && tests+=" main143"
+       use hepmc3 && use lhapdf && tests+=" $(echo main{133,162})"
+       use fastjet && use hepmc3 && use lhapdf && tests+=" $(echo main161)"
+       # Other tests disabled due to missing dependencies
 
        # use emake for parallel instead of long runmains
        LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
@@ -176,6 +188,7 @@ src_install() {
        _EOF_
 
        dodoc AUTHORS GUIDELINES README
+
        if use doc; then
                dodoc -r share/Pythia8/pdfdoc/.
                dodoc -r share/Pythia8/htmldoc/.
@@ -190,6 +203,11 @@ src_install() {
                doins -r examples
                docompress -x /usr/share/doc/${PF}/examples
        fi
+       if use python; then
+               local site_dir=$(python_get_sitedir)
+               insinto "${site_dir#${EPREFIX}}"
+               doins lib/pythia8.so
+       fi
 
        # cleanup
        unset PYTHIADIR EPYTHIADIR

diff --git a/sci-physics/pythia/pythia-9999.ebuild 
b/sci-physics/pythia/pythia-9999.ebuild
index fa0f3f011561..cc536ceee86e 100644
--- a/sci-physics/pythia/pythia-9999.ebuild
+++ b/sci-physics/pythia/pythia-9999.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit toolchain-funcs
+PYTHON_COMPAT=( python3_{11..13} )
+inherit toolchain-funcs python-single-r1
 
 MV=$(ver_cut 1-2)
 MY_P="${PN}${PV//./}"
@@ -11,8 +12,6 @@ LHA_VER="6.2.1"
 
 DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
 HOMEPAGE="https://pythia.org/";
-
-# just data
 SRC_URI="test? ( lhapdf? (
                https://lhapdfsets.web.cern.ch/lhapdfsets/current/CT10.tar.gz
                
https://lhapdfsets.web.cern.ch/lhapdfsets/current/MRST2007lomod.tar.gz
@@ -21,24 +20,25 @@ SRC_URI="test? ( lhapdf? (
                https://lhapdfsets.web.cern.ch/lhapdfsets/current/cteq66.tar.gz
                https://lhapdfsets.web.cern.ch/lhapdfsets/current/cteq6l1.tar.gz
                
https://www.hepforge.org/downloads/lhapdf/pdfsets/v6.backup/${LHA_VER}/MRST2004qed.tar.gz
-               ) )"
-
+       ) )
+"
 if [[ ${PV} == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://gitlab.com/Pythia8/releases";
 else
        SRC_URI="https://pythia.org/download/${PN}${MV//./}/${MY_P}.tgz
-       $SRC_URI"
+       ${SRC_URI}"
        KEYWORDS="~amd64 ~x86"
        S="${WORKDIR}/${MY_P}"
 fi
 
-SLOT="8"
 LICENSE="GPL-2"
-IUSE="doc examples fastjet +hepmc3 hepmc2 lhapdf root test zlib"
+SLOT="8"
+IUSE="doc examples fastjet +hepmc3 hepmc2 lhapdf root test zlib python 
highfive mpich rivet" # evtgen mg5mes rivet powheg
 RESTRICT="!test? ( test )"
 REQUIRED_USE="
        ?? ( hepmc3 hepmc2 )
+       python? ( ${PYTHON_REQUIRED_USE} )
 "
 
 RDEPEND="
@@ -46,16 +46,28 @@ RDEPEND="
        hepmc3? ( sci-physics/hepmc:3= )
        hepmc2? ( sci-physics/hepmc:2= )
        lhapdf? ( sci-physics/lhapdf:= )
-       zlib? ( sys-libs/zlib )"
+       zlib? ( sys-libs/zlib )
+       highfive? (
+               sci-libs/HighFive
+               sci-libs/hdf5[cxx]
+       )
+       rivet? (
+               sci-physics/rivet:*
+       )
+       mpich? ( sys-cluster/mpich )
+       python? ( ${PYTHON_DEPS} )
+       "
+DEPEND="${RDEPEND}"
 # ROOT is used only when building related tests
-DEPEND="${RDEPEND}
+BDEPEND="
        test? (
                root? ( sci-physics/root:= )
-       )"
+       )
+"
 
-PATCHES=(
-       "${FILESDIR}"/${PN}8209-root-noninteractive.patch
-)
+pkg_setup() {
+       use python && python-single-r1_pkg_setup
+}
 
 pkg_pretend() {
        if use root && ! use test; then
@@ -80,9 +92,6 @@ src_prepare() {
                -e "s|-O2|${CXXFLAGS}|g" \
                -e "s|Cint|Core|g" \
                configure || die
-       sed -i 's|$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED)|$(CXX) $(LDFLAGS) 
$^ -o $@ $(CXX_COMMON) $(CXX_SHARED)|g' \
-               Makefile || die
-       sed -i 's|$(CXX)|$(CXX) $(LDFLAGS)|' examples/Makefile || die
        # we use lhapdf6 instead of lhapdf5
        # some PDFs changed, use something similar
        sed -i \
@@ -99,7 +108,7 @@ src_prepare() {
                -e "s|1e-8|3e-1|g" \
                -e "s|nlo_as_0119_qed|nlo_as_0119_qed_mc|g" \
                -e "s|xmldoc|share/Pythia8/xmldoc|g" \
-               examples/main54.cc || die
+               examples/main203.cc || die
        # ask cflags from root
        sed -i "s|root-config|root-config --cflags|g" examples/Makefile || die
 
@@ -113,15 +122,20 @@ src_prepare() {
 # - ProMC  https://github.com/Argonne-National-Laboratory/ProMC/
 src_configure() {
        # homemade configure script
+       local -x CXX="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}"
        ./configure \
                --arch=Linux \
-               --cxx="$(tc-getCXX)" \
                --prefix="${EPREFIX}/usr" \
                --prefix-lib="${EPREFIX}/usr/$(get_libdir)" \
                --prefix-share="${EPYTHIADIR}" \
                $(usex fastjet "--with-fastjet3" "") \
                $(usex zlib "--with-gzip" "") \
                $(use_with hepmc3) \
+               $(use_with highfive) \
+               $(usex highfive --with-hdf5 "") \
+               $(use_with python) \
+               $(use_with rivet) \
+               $(use_with mpich) \
                $(use_with hepmc2) \
                $(usex lhapdf "--with-lhapdf6
                        --with-lhapdf6-plugin=LHAPDF6.h
@@ -134,6 +148,7 @@ src_configure() {
        # fix pythia config script
        sed -i \
                -e 's|Pythia8/examples/Makefile.inc|Pythia8/Makefile.inc|' \
+               -e "s|CFG_FILE=.*|CFG_FILE=${EPYTHIADIR}/Makefile.inc|" \
                -e 's|LINE%=|LINE%%=|' \
                bin/pythia8-config || die
 }
@@ -141,18 +156,15 @@ src_configure() {
 src_test() {
        cd examples || die
 
-       local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)"
-       use hepmc3 && tests+=" $(echo main{41,42,85,86}.out)"
-       use hepmc3 && use lhapdf && tests+=" $(echo main{43,{87..89}}.out)"
-       use lhapdf && tests+=" $(echo main{51..54}.out)"
-       use fastjet && tests+=" $(echo main{71,72}.out)"
-       use fastjet && use hepmc3 && use lhapdf && tests+=" $(echo 
main{81..84}).out"
-       use root && tests+=" main91.out"
-       # Disabled tests:
-       # 33    needs PowHEG
-       # 46    needs ProMC
-       # 48    needs EvtGen
-       # 92    generated ROOT dictionary is badly broken
+       local tests="$(echo main{{101..103},{121..127}})"
+       use hepmc3 && tests+=" $(echo main{131..135})"
+       use hepmc3 && use mpich && use highfive && tests+=" $(echo main136)"
+       use lhapdf && tests+=" $(echo main{201..204})"
+       use fastjet && tests+=" $(echo main{211..216})"
+       use root && tests+=" main143"
+       use hepmc3 && use lhapdf && tests+=" $(echo main{133,162})"
+       use fastjet && use hepmc3 && use lhapdf && tests+=" $(echo main161)"
+       # Other tests disabled due to missing dependencies
 
        # use emake for parallel instead of long runmains
        LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
@@ -176,6 +188,7 @@ src_install() {
        _EOF_
 
        dodoc AUTHORS GUIDELINES README
+
        if use doc; then
                dodoc -r share/Pythia8/pdfdoc/.
                dodoc -r share/Pythia8/htmldoc/.
@@ -190,6 +203,11 @@ src_install() {
                doins -r examples
                docompress -x /usr/share/doc/${PF}/examples
        fi
+       if use python; then
+               local site_dir=$(python_get_sitedir)
+               insinto "${site_dir#${EPREFIX}}"
+               doins lib/pythia8.so
+       fi
 
        # cleanup
        unset PYTHIADIR EPYTHIADIR

Reply via email to