diff options
Diffstat (limited to 'sci-physics/pythia')
-rw-r--r-- | sci-physics/pythia/Manifest | 5 | ||||
-rw-r--r-- | sci-physics/pythia/pythia-8.3.13-r1.ebuild | 214 | ||||
-rw-r--r-- | sci-physics/pythia/pythia-8.3.14.ebuild | 219 | ||||
-rw-r--r-- | sci-physics/pythia/pythia-9999.ebuild | 9 |
4 files changed, 444 insertions, 3 deletions
diff --git a/sci-physics/pythia/Manifest b/sci-physics/pythia/Manifest index e5d9c7037b09..de87ac11fe52 100644 --- a/sci-physics/pythia/Manifest +++ b/sci-physics/pythia/Manifest @@ -16,11 +16,14 @@ DIST pythia8309.tgz 28407620 BLAKE2B 0ef226e2e65829952d670b57c24bff2108d916ca547 DIST pythia8311.tgz 28757044 BLAKE2B 93a7cc26682bc6418f85e41def94a8cdfe39e180fa9fec2a6e47e9237fc2d42800dca2b76f54e2d56cb1d3a2b9a0008baf7b77610aabac2a6505fe08b2b4ffe2 SHA512 e0ae6cb444f11f3e3cf84d738b8c135f07ceafb28911b855bb63e3c596c5b9fd312a1f4ff78a098b707bfbb8f517a46177c4dbc57b4882cf03b12b0be49e2885 DIST pythia8312.tgz 30218597 BLAKE2B 71efca55572a241cf369e90186b033fbcd2326de82867f3f13057fbda372885632cab3d7b34ac5b444419bba4dd8d6c4bb90e12bf2424a43ae313c21268e8d89 SHA512 683ece1bd2cfd49d9cee742ce3fab693c5bf15017a6584d33e2a00bd0f0a67d1b84ff48da75f39cb4a4b564b9a35f997ab5187fe691f1f4b724cec5a4d717a23 DIST pythia8313.tgz 29957501 BLAKE2B 2149cafba036d09a66b874c775f4a425d5bbdd65d37f23c851f9cd3f7026ae45581187542d11ae5bbc18b7280fbc14e4daabd684b71c4437b3d9d1a4429f254a SHA512 1753323aa021ec5d999056517dc021fd73b7331441ff4c841d559df884700cc997e6384043de7c15a054ec8a3b2d76f1cb9f5edc7c6141f08f70d49ca5f6fb84 +DIST pythia8314.tgz 30007148 BLAKE2B e953496c67e7678d6bb30660b83eba4928e7696e582924971ffb07aedc76baab5ab9103e720b49eac5d4f8014131926726df322e808e38416f395aa9f9f4776f SHA512 bd21f56a8a07f3f9198328cddaa5b6c7fb0f048e2ab17d2f4e9da17dc98039dbb0df3cb1022a0d1030bc9eeda59036bc0a7299a5df38d202ee3c58f484e1635e EBUILD pythia-6.4.28-r2.ebuild 2602 BLAKE2B 46054fa8f4303b69602c237d93ce48068b583dd4b7890c7219510346e6e11ba3a0c24bb8404fa5f0fee2eaa13aa7baa340ab1fc496318e3f27720cac73d7b781 SHA512 83775bd53db21b3e41b4bbb87fbe2e22aeca1521cd9969c0ce75f23cce2eef748eb4cdf240478f08da0a647504cfd10f91ba8c425c9df6e34f9ee49ddf78ac11 EBUILD pythia-8.2.45-r2.ebuild 5745 BLAKE2B 6ad238f95ad2e8d49f087ac56651341737f11243487ae1030667c9a5a3c12d7a7e2f32ae44286d44251504d2c46c2ec57940881888403b292c70ad5d0a2141f8 SHA512 4d1a81b53ae800ae014f6d1da9256c49878dedc98315d6808c1a2d43062d018f976e925c165c70431bd172a2353514a2db56f0455f86cb0ba92b65e51fe0fb8c EBUILD pythia-8.3.09.ebuild 5646 BLAKE2B 6199b3ed46b1a11bfc5b2fb1e43d5b39a827b4675ad132b6b3411e668624bea744010a6437f0580e8f0c12fb340e8eba1062e64b0490918f77f5cbd3fe9867e8 SHA512 0863cd49173f49407cdd536f7cd1500f24512a638ef002f105f67db08db1d41209ced3eb7cc961e7b2da25d1094869c2b7aa52e75c09bff498a0dd7eaa5a0e9f EBUILD pythia-8.3.11.ebuild 5549 BLAKE2B 98f5f9ca86fd77c680123375e573f91d5eee1126290801dd74ccc5d8fadf6adab421cdc26c3d2f6b2602d88dadd7b63a7a8291a3d4ad967ad8a5fd66e9f5b7ff SHA512 def64ba4e768e564249e6257c5d445531d47a3095a6053b0154311f25005dfd244d1f6d7379d66dac04af785937abd1fc15dde4b7da8a580df3a15ad6497d853 EBUILD pythia-8.3.12.ebuild 6183 BLAKE2B 9560c9aa1c69d299ad2d41730beda9391602a9c22ac171e621239d090032a92d95ff2597c1d58e3c3aafdff0a33efb655d7d50fc23af5403dd21c750ec8b43c1 SHA512 92761f84c879a2225241438f9732d8d948d5460dd87d719754e4e1aa4febe379900fa30060e75ceca99392a46b8552eaf1d0c6e96fb5c4287f7d9227170877f3 +EBUILD pythia-8.3.13-r1.ebuild 6224 BLAKE2B e4ce0be2d6e569ac50cd37553c8df56bdcc085c529ea351e96be61081e246a6c0a2f6393cbd74b0167f5c6dd97ef964f7773194e7e014c5424d823c7b31120dc SHA512 dfb277661e13c4569851d7b14d0602d34b41e37c42294420fd6be8b1bdd5b06d2107fdc32ca80766331e8cad82d4c629e795ee2a5e00703a68c891c7ada660d4 EBUILD pythia-8.3.13.ebuild 6204 BLAKE2B 2d4adb676eba740233b6655652583474299c59f0dfe0046dcd810e04cb6e41345effc85961ea52503412a0c7887909462b699d9d844ef7ce757a7d93d4f6e6ef SHA512 be80f7f86a481d78063a75ae70555d4ff80feb9c2bbed388ec52e6f6634e0836cb346159946846c13a70f0669f121df32755abf19eb313573e9a20c38ac6f511 -EBUILD pythia-9999.ebuild 6204 BLAKE2B 2d4adb676eba740233b6655652583474299c59f0dfe0046dcd810e04cb6e41345effc85961ea52503412a0c7887909462b699d9d844ef7ce757a7d93d4f6e6ef SHA512 be80f7f86a481d78063a75ae70555d4ff80feb9c2bbed388ec52e6f6634e0836cb346159946846c13a70f0669f121df32755abf19eb313573e9a20c38ac6f511 +EBUILD pythia-8.3.14.ebuild 6394 BLAKE2B 40cc6cd2b2952f438367437dc8684197e0500aed905c3612e90541384721d8d89d62b69ff3170148d3eaaa7c788afe17ebb1e833347fd51b6e8a86ab778462b5 SHA512 9bddebbb2e66872e423b555bed68710a428144a88ef3bc4111b955493dde9e98f68efd2670580ac3b3f29cb383b433c3be19569068b9eb09ed62c6b183b8d825 +EBUILD pythia-9999.ebuild 6394 BLAKE2B 40cc6cd2b2952f438367437dc8684197e0500aed905c3612e90541384721d8d89d62b69ff3170148d3eaaa7c788afe17ebb1e833347fd51b6e8a86ab778462b5 SHA512 9bddebbb2e66872e423b555bed68710a428144a88ef3bc4111b955493dde9e98f68efd2670580ac3b3f29cb383b433c3be19569068b9eb09ed62c6b183b8d825 MISC metadata.xml 1799 BLAKE2B 6f9886ff33ed41e6a952fe9f60c249ba1b9d1415aa0579d800195b657bdd7e0982c6267ddd57c7d54957d38b95233348a5b9f21f68dedb837b7b0b8eebeaf59f SHA512 2ed55b93f17de167714095ad8da22d4fc2f424c29e6459ec337d94a9ba2e05ea43fdb075a1ef25572b5383176dd34004ec2d651d784632462590aac360a69f95 diff --git a/sci-physics/pythia/pythia-8.3.13-r1.ebuild b/sci-physics/pythia/pythia-8.3.13-r1.ebuild new file mode 100644 index 000000000000..def740a93eae --- /dev/null +++ b/sci-physics/pythia/pythia-8.3.13-r1.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) +inherit toolchain-funcs python-single-r1 + +MV=$(ver_cut 1-2) +MY_P="${PN}${PV//./}" +LHA_VER="6.2.1" + +DESCRIPTION="Lund Monte Carlo high-energy physics event generator" +HOMEPAGE="https://pythia.org/" +SRC_URI="test? ( lhapdf? ( + https://lhapdfsets.web.cern.ch/lhapdfsets/current/CT10.tar.gz + https://lhapdfsets.web.cern.ch/lhapdfsets/current/MRST2007lomod.tar.gz + https://lhapdfsets.web.cern.ch/lhapdfsets/current/NNPDF23_nlo_as_0119_qed_mc.tar.gz + https://lhapdfsets.web.cern.ch/lhapdfsets/current/NNPDF23_nnlo_as_0119_qed_mc.tar.gz + 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}" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_P}" +fi + +LICENSE="GPL-2" +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=" + fastjet? ( sci-physics/fastjet ) + hepmc3? ( sci-physics/hepmc:3= ) + hepmc2? ( sci-physics/hepmc:2= ) + lhapdf? ( sci-physics/lhapdf:= ) + 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 +BDEPEND=" + test? ( + root? ( sci-physics/root:= ) + ) +" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +pkg_pretend() { + if use root && ! use test; then + ewarn "ROOT support will only affect examples code build during test stage." + ewarn "Since you have tests disabled, this is a no-op." + fi +} + +src_prepare() { + PYTHIADIR="/usr/share/Pythia8" + EPYTHIADIR="${EPREFIX}${PYTHIADIR}" + + default + # set datadir for xmldor in include file + sed -i \ + -e "s|../share/Pythia8/xmldoc|${EPYTHIADIR}/xmldoc|" \ + include/Pythia8/Pythia.h || die + # respect libdir, prefix, flags + sed -i \ + -e "s|/lib|/$(get_libdir)|g" \ + -e "s|/usr|${EPREFIX}/usr|g" \ + -e "s|-O2|${CXXFLAGS}|g" \ + -e "s|Cint|Core|g" \ + configure || die + # we use lhapdf6 instead of lhapdf5 + # some PDFs changed, use something similar + sed -i \ + -e "s|LHAPDF5|LHAPDF6|g" \ + -e "s|\.LHgrid||g" \ + -e "s|\.LHpdf||g" \ + -e "s|MRST2001lo|MRST2007lomod|g" \ + -e "s|cteq6ll|cteq6l1|g" \ + -e "s|cteq6m|cteq66|g" \ + examples/*.{cc,cmnd} || die + # After lhapdf5->6 migration PDFs are identical within ~1/1000 + # https|//www.hepforge.org/archive/lhapdf/pdfsets/6.1/README + sed -i \ + -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/main203.cc || die + # ask cflags from root + sed -i "s|root-config|root-config --cflags|g" examples/Makefile || die + + sed -i 's|libpythia8\.a|libpythia8$(LIB_SUFFIX)|g' \ + examples/Makefile || die +} + +# TODO: the following optional packages are out of Gentoo tree: +# - EvtGen http://atlas-computing.web.cern.ch/atlas-computing/links/externalDirectory/EvtGen/ +# - PowHEG http://powhegbox.mib.infn.it/ +# - ProMC https://github.com/Argonne-National-Laboratory/ProMC/ +src_configure() { + # homemade configure script + local -x CXX="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}" + ./configure \ + --arch=Linux \ + --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 + --with-lhapdf6-lib=${EPREFIX}/usr/$(get_libdir)" "") \ + $(usex root "--with-root + --with-root-include=${EPREFIX}/usr/include/root + --with-root-lib=${EPREFIX}/usr/$(get_libdir)/root" "") \ + || die + + # 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 +} + +src_test() { + cd examples || die + + 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..214},216})" # 215 fails... + 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}" \ + PYTHIA8DATA="../share/Pythia8/xmldoc/" \ + LHAPDF_DATA_PATH="${WORKDIR}" \ + emake ${tests} + emake clean +} + +src_install() { + # make install is too broken, much easier to install manually + dobin bin/pythia8-config + doheader -r include/* + dolib.so lib/libpythia8.so + use lhapdf && dolib.so lib/libpythia8lhapdf6.so + insinto "${PYTHIADIR}" + doins -r share/Pythia8/tunes share/Pythia8/xmldoc share/Pythia8/pdfdata examples/Makefile.inc + + newenvd - 99pythia8 <<- _EOF_ + PYTHIA8DATA=${EPYTHIADIR}/xmldoc + _EOF_ + + dodoc AUTHORS GUIDELINES README + + if use doc; then + dodoc -r share/Pythia8/pdfdoc/. + dodoc -r share/Pythia8/htmldoc/. + fi + if use examples; then + # reuse system Makefile.inc + rm examples/Makefile.inc || die + sed -i "s|include Makefile.inc|include ${EPYTHIADIR}|" \ + examples/Makefile || die + + insinto /usr/share/${PN} + 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-8.3.14.ebuild b/sci-physics/pythia/pythia-8.3.14.ebuild new file mode 100644 index 000000000000..e18740843e10 --- /dev/null +++ b/sci-physics/pythia/pythia-8.3.14.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) +inherit toolchain-funcs python-single-r1 optfeature + +MV=$(ver_cut 1-2) +MY_P="${PN}${PV//./}" +LHA_VER="6.2.1" + +DESCRIPTION="Lund Monte Carlo high-energy physics event generator" +HOMEPAGE="https://pythia.org/" +SRC_URI="test? ( lhapdf? ( + https://lhapdfsets.web.cern.ch/lhapdfsets/current/CT10.tar.gz + https://lhapdfsets.web.cern.ch/lhapdfsets/current/MRST2007lomod.tar.gz + https://lhapdfsets.web.cern.ch/lhapdfsets/current/NNPDF23_nlo_as_0119_qed_mc.tar.gz + https://lhapdfsets.web.cern.ch/lhapdfsets/current/NNPDF23_nnlo_as_0119_qed_mc.tar.gz + 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}" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_P}" +fi + +LICENSE="GPL-2" +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=" + fastjet? ( sci-physics/fastjet ) + hepmc3? ( sci-physics/hepmc:3= ) + hepmc2? ( sci-physics/hepmc:2= ) + lhapdf? ( sci-physics/lhapdf:= ) + 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 +BDEPEND=" + test? ( + root? ( sci-physics/root:= ) + ) +" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +pkg_pretend() { + if use root && ! use test; then + ewarn "ROOT support will only affect examples code build during test stage." + ewarn "Since you have tests disabled, this is a no-op." + fi +} + +src_prepare() { + PYTHIADIR="/usr/share/Pythia8" + EPYTHIADIR="${EPREFIX}${PYTHIADIR}" + + default + # set datadir for xmldor in include file + sed -i \ + -e "s|../share/Pythia8/xmldoc|${EPYTHIADIR}/xmldoc|" \ + include/Pythia8/Pythia.h || die + # respect libdir, prefix, flags + sed -i \ + -e "s|/lib|/$(get_libdir)|g" \ + -e "s|/usr|${EPREFIX}/usr|g" \ + -e "s|-O2|${CXXFLAGS}|g" \ + -e "s|Cint|Core|g" \ + configure || die + # we use lhapdf6 instead of lhapdf5 + # some PDFs changed, use something similar + sed -i \ + -e "s|LHAPDF5|LHAPDF6|g" \ + -e "s|\.LHgrid||g" \ + -e "s|\.LHpdf||g" \ + -e "s|MRST2001lo|MRST2007lomod|g" \ + -e "s|cteq6ll|cteq6l1|g" \ + -e "s|cteq6m|cteq66|g" \ + examples/*.{cc,cmnd} || die + # After lhapdf5->6 migration PDFs are identical within ~1/1000 + # https|//www.hepforge.org/archive/lhapdf/pdfsets/6.1/README + sed -i \ + -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/main203.cc || die + # ask cflags from root + sed -i "s|root-config|root-config --cflags|g" examples/Makefile || die + + sed -i 's|libpythia8\.a|libpythia8$(LIB_SUFFIX)|g' \ + examples/Makefile || die +} + +# TODO: the following optional packages are out of Gentoo tree: +# - EvtGen http://atlas-computing.web.cern.ch/atlas-computing/links/externalDirectory/EvtGen/ +# - PowHEG http://powhegbox.mib.infn.it/ +# - ProMC https://github.com/Argonne-National-Laboratory/ProMC/ +src_configure() { + # homemade configure script + local -x CXX="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}" + ./configure \ + --arch=Linux \ + --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 + --with-lhapdf6-lib=${EPREFIX}/usr/$(get_libdir)" "") \ + $(usex root "--with-root + --with-root-include=${EPREFIX}/usr/include/root + --with-root-lib=${EPREFIX}/usr/$(get_libdir)/root" "") \ + || die + + # 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 +} + +src_test() { + cd examples || die + + 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..214},216})" # 215 fails... + 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}" \ + PYTHIA8DATA="../share/Pythia8/xmldoc/" \ + LHAPDF_DATA_PATH="${WORKDIR}" \ + emake ${tests} + emake clean +} + +src_install() { + # make install is too broken, much easier to install manually + dobin bin/pythia8-config + doheader -r include/* + dolib.so lib/libpythia8.so + use lhapdf && dolib.so lib/libpythia8lhapdf6.so + insinto "${PYTHIADIR}" + doins -r share/Pythia8/tunes share/Pythia8/xmldoc share/Pythia8/pdfdata examples/Makefile.inc + + newenvd - 99pythia8 <<- _EOF_ + PYTHIA8DATA=${EPYTHIADIR}/xmldoc + _EOF_ + + dodoc AUTHORS GUIDELINES README + + if use doc; then + dodoc -r share/Pythia8/pdfdoc/. + dodoc -r share/Pythia8/htmldoc/. + fi + if use examples; then + # reuse system Makefile.inc + rm examples/Makefile.inc || die + sed -i "s|include Makefile.inc|include ${EPYTHIADIR}|" \ + examples/Makefile || die + + insinto /usr/share/${PN} + 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 +} + +pkg_postinstall() { + optfeature "python interface awkward array support" dev-python/awkward + optfeature "python interface vector support" dev-python/vector +} diff --git a/sci-physics/pythia/pythia-9999.ebuild b/sci-physics/pythia/pythia-9999.ebuild index 9528a6282f71..e18740843e10 100644 --- a/sci-physics/pythia/pythia-9999.ebuild +++ b/sci-physics/pythia/pythia-9999.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{11..13} ) -inherit toolchain-funcs python-single-r1 +inherit toolchain-funcs python-single-r1 optfeature MV=$(ver_cut 1-2) MY_P="${PN}${PV//./}" @@ -181,7 +181,7 @@ src_install() { dolib.so lib/libpythia8.so use lhapdf && dolib.so lib/libpythia8lhapdf6.so insinto "${PYTHIADIR}" - doins -r share/Pythia8/xmldoc share/Pythia8/pdfdata examples/Makefile.inc + doins -r share/Pythia8/tunes share/Pythia8/xmldoc share/Pythia8/pdfdata examples/Makefile.inc newenvd - 99pythia8 <<- _EOF_ PYTHIA8DATA=${EPYTHIADIR}/xmldoc @@ -212,3 +212,8 @@ src_install() { # cleanup unset PYTHIADIR EPYTHIADIR } + +pkg_postinstall() { + optfeature "python interface awkward array support" dev-python/awkward + optfeature "python interface vector support" dev-python/vector +} |