From d1262423b614597cd55d30370eb8de6bfa8f0899 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 18 Oct 2022 19:56:57 +0100 Subject: gentoo auto-resync : 18:10:2022 - 19:56:57 --- sci-physics/pythia/Manifest | 4 +- sci-physics/pythia/pythia-8.2.45-r1.ebuild | 187 ---------------------------- sci-physics/pythia/pythia-8.2.45-r2.ebuild | 188 +++++++++++++++++++++++++++++ sci-physics/pythia/pythia-8.3.07-r1.ebuild | 183 ++++++++++++++++++++++++++++ sci-physics/pythia/pythia-8.3.07.ebuild | 182 ---------------------------- 5 files changed, 373 insertions(+), 371 deletions(-) delete mode 100644 sci-physics/pythia/pythia-8.2.45-r1.ebuild create mode 100644 sci-physics/pythia/pythia-8.2.45-r2.ebuild create mode 100644 sci-physics/pythia/pythia-8.3.07-r1.ebuild delete mode 100644 sci-physics/pythia/pythia-8.3.07.ebuild (limited to 'sci-physics/pythia') diff --git a/sci-physics/pythia/Manifest b/sci-physics/pythia/Manifest index 0476a9aa41af..490c1358c352 100644 --- a/sci-physics/pythia/Manifest +++ b/sci-physics/pythia/Manifest @@ -14,6 +14,6 @@ DIST pythia6-20160413.tar.gz 567976 BLAKE2B 92ee81e41db46d49706599ee387a650f67d5 DIST pythia8245.tgz 23737440 BLAKE2B 74fd060229a342a32ddd33cd1911708c03e23ee0656a23ed91663fa08b35bb015f75bedba2e6ef13cfc9524affde8e8b65653596eb34f1f080781e655b85af5b SHA512 25107eb98474217ac697476143e879c62fcf5653994a2daf61cfca892f91fbaea3c274019fb4469e9ef547e87d69b8842ee28db5fdac6433965a62eeb16ef95a DIST pythia8307.tgz 26016414 BLAKE2B 0253309d71ca4e46183de80396c3a226d072ea2e8aeaf87da33994b3303017a6ca567f6731902aba43c20fec2c0aeace0728f2ce725f9221f161a70055fa6043 SHA512 63e7a3e76f8bfe0cd7b34ef523d8bbcfa50ee780c8437384ef7eb208f0f682481b0166673647db98468baeb6df855fdbf0cbb1509dcc5eda39c90f3f3461fd2a EBUILD pythia-6.4.28-r2.ebuild 2015 BLAKE2B 8e26f38ac4ed140dbd49d9149a9bf56388d9809a26beb27bcd87f2f09503f9bdac7e28ea96413f0f849bfb1cf32c71f32efc2d8c1ca68a8d287168fb35ec5ddc SHA512 9d8527a168976ec0da2aff8ff220a294df566d9581913cb4561ef738eb33a6ec28b77e162fc5b6977cb06359d2264e198821833f5801293ab56a50d20431aaa8 -EBUILD pythia-8.2.45-r1.ebuild 5698 BLAKE2B d7276589d2859b6077a9331705192cbae807e08e02f07b68e6773bcc48c81c02a2bd2a3dbfca8d531a317f3178f2a5ccd5dd66b3be16257f6e3dd4772bcee195 SHA512 20889a20d0f8718c52c9327e10c5c9d9d6f35b8a579384074534fa643475b0da19855cf1fc7af47f06fe9ed3caf152fb8293960f67c6879b7dda57ab9670b275 -EBUILD pythia-8.3.07.ebuild 5595 BLAKE2B 34cf8d352effa0c777c2aedde8b1c77db969fbda5d6279a09eeaf68ac03f462c79f47de3867c63bbbd4b9d650b7dedda858e9c58fa358bbdea3e63a6fec998f4 SHA512 113a012ecc9c32ecfc2e3bebfd883f7e3bff4030460c45bb7dbe64e629d7ceeeaffaab844e968070a3c32c8e97d0ff124fb638809ab429007764120b40dd12de +EBUILD pythia-8.2.45-r2.ebuild 5738 BLAKE2B a4e94f9c23ce66ee9b0f9704a001fa5ba2b9f46e393ae24c9869acf9e87ec06027e9d7b6cc6e844fdcd7d285ead16c37226dadf927a21015b4b23308f9b885c1 SHA512 84a5a2824a5d0b0f9ffc21894af521d0cc1cc88f99669f81a35fb63afaede9b552ab2e88a878763211f3f9f81702b03ee7c861724da37949e01497cd28de7e36 +EBUILD pythia-8.3.07-r1.ebuild 5634 BLAKE2B 32a3c5082d9ae3652f70e34501af8fc530c7030970eeacce20d680680e554a5f0ca4c6abc3d1e7e045a6e52d3b88a29768b537b40cf08fd3abb2984b15340dce SHA512 e94d20065421535459ea1a2dc06da45d1fa313d62fb0e906bad7e04c98068ac9de10c8a32210cd21573553c414abab67254b73619e9286c4df848b9da15052ae MISC metadata.xml 1299 BLAKE2B 8e721b54a36722872211040e099fc4e284563d5c41640a3d83e38849a64e79a277e1d34e790619b277d4deebb125d758d48def0b119f1f91b592a52e3c2be511 SHA512 875b5383e20b3ac9970012bcbdc762c01fc326d66977f6c53b0c62e4b88baa50a6c54e63e63d2086042b8fefbade45e80ec790c786c6d2a281272d5a5f565386 diff --git a/sci-physics/pythia/pythia-8.2.45-r1.ebuild b/sci-physics/pythia/pythia-8.2.45-r1.ebuild deleted file mode 100644 index 7826f78f0c0d..000000000000 --- a/sci-physics/pythia/pythia-8.2.45-r1.ebuild +++ /dev/null @@ -1,187 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit toolchain-funcs - -MV=$(ver_cut 1) -MY_P="${PN}${PV//./}" -LHA_VER="6.1" - -DESCRIPTION="Lund Monte Carlo high-energy physics event generator" -HOMEPAGE="http://pythia8.hepforge.org/" -SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz - test? ( lhapdf? ( - https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/CT10.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/MRST2007lomod.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq66.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq6l1.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/unvalidated/MRST2004qed.tar.gz - ) )" - -SLOT="8" -LICENSE="GPL-2" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="doc examples fastjet +hepmc lhapdf root test zlib" -RESTRICT="!test? ( test )" - -RDEPEND=" - fastjet? ( sci-physics/fastjet ) - hepmc? ( sci-physics/hepmc:2= ) - lhapdf? ( sci-physics/lhapdf:= ) - zlib? ( sys-libs/zlib )" -# ROOT is used only when building related tests -DEPEND="${RDEPEND} - test? ( - root? ( sci-physics/root:= ) - )" - -PATCHES=( - "${FILESDIR}"/${PN}8209-root-noninteractive.patch -) - -S="${WORKDIR}/${MY_P}" - -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 - 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 \ - -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/main54.cc || die - # ask cflags from root - sed -i "s|root-config|root-config --cflags|g" examples/Makefile || die - - sed -i \ - -e '/TARGETS=$(LOCAL_LIB)\/libpythia8\.a/d' \ - -e 's|libpythia8\.a$|libpythia8$(LIB_SUFFIX)|g' \ - 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 - ./configure \ - --arch=Linux \ - --cxx="$(tc-getCXX)" \ - --enable-shared \ - --prefix="${EPREFIX}/usr" \ - --prefix-lib="$(get_libdir)" \ - --prefix-share="${EPYTHIADIR}" \ - $(usex fastjet "--with-fastjet3" "") \ - $(usex zlib "--with-gzip" "") \ - $(usex hepmc "--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|LINE%=|LINE%%=|' \ - bin/pythia8-config || die -} - -src_test() { - cd examples || die - - local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)" - use hepmc && tests+=" $(echo main{41,42,85,86}.out)" - use hepmc && 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 hepmc && 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 - - # 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 - insinto "${PYTHIADIR}" - doins -r share/Pythia8/xmldoc 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 - - # cleanup - unset PYTHIADIR EPYTHIADIR -} diff --git a/sci-physics/pythia/pythia-8.2.45-r2.ebuild b/sci-physics/pythia/pythia-8.2.45-r2.ebuild new file mode 100644 index 000000000000..a660f6924c7d --- /dev/null +++ b/sci-physics/pythia/pythia-8.2.45-r2.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MV=$(ver_cut 1) +MY_P="${PN}${PV//./}" +LHA_VER="6.1" + +DESCRIPTION="Lund Monte Carlo high-energy physics event generator" +HOMEPAGE="https://pythia.org/" +SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz + test? ( lhapdf? ( + https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/CT10.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/MRST2007lomod.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq66.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq6l1.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/unvalidated/MRST2004qed.tar.gz + ) )" + +SLOT="8" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples fastjet +hepmc lhapdf root test zlib" +RESTRICT="!test? ( test )" + +RDEPEND=" + fastjet? ( sci-physics/fastjet ) + hepmc? ( sci-physics/hepmc:2= ) + lhapdf? ( sci-physics/lhapdf:= ) + zlib? ( sys-libs/zlib )" +# ROOT is used only when building related tests +DEPEND="${RDEPEND} + test? ( + root? ( sci-physics/root:= ) + )" + +PATCHES=( + "${FILESDIR}"/${PN}8209-root-noninteractive.patch +) + +S="${WORKDIR}/${MY_P}" + +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 + 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 \ + -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/main54.cc || die + # ask cflags from root + sed -i "s|root-config|root-config --cflags|g" examples/Makefile || die + + sed -i \ + -e '/TARGETS=$(LOCAL_LIB)\/libpythia8\.a/d' \ + -e 's|libpythia8\.a$|libpythia8$(LIB_SUFFIX)|g' \ + 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 + ./configure \ + --arch=Linux \ + --cxx="$(tc-getCXX)" \ + --enable-shared \ + --prefix="${EPREFIX}/usr" \ + --prefix-lib="$(get_libdir)" \ + --prefix-share="${EPYTHIADIR}" \ + $(usex fastjet "--with-fastjet3" "") \ + $(usex zlib "--with-gzip" "") \ + $(usex hepmc "--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|LINE%=|LINE%%=|' \ + bin/pythia8-config || die +} + +src_test() { + cd examples || die + + local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)" + use hepmc && tests+=" $(echo main{41,42,85,86}.out)" + use hepmc && 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 hepmc && 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 + + # 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/xmldoc 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 + + # cleanup + unset PYTHIADIR EPYTHIADIR +} diff --git a/sci-physics/pythia/pythia-8.3.07-r1.ebuild b/sci-physics/pythia/pythia-8.3.07-r1.ebuild new file mode 100644 index 000000000000..9dc0a0382067 --- /dev/null +++ b/sci-physics/pythia/pythia-8.3.07-r1.ebuild @@ -0,0 +1,183 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +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="https://pythia.org/download/${PN}${MV//./}/${MY_P}.tgz + test? ( lhapdf? ( + https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/CT10.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/MRST2007lomod.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/cteq66.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/cteq6l1.tar.gz + https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/unvalidated/MRST2004qed.tar.gz + ) )" + +SLOT="8" +LICENSE="GPL-2" +KEYWORDS="~amd64" +IUSE="doc examples fastjet +hepmc lhapdf root test zlib" +RESTRICT="!test? ( test )" + +RDEPEND=" + fastjet? ( sci-physics/fastjet ) + hepmc? ( sci-physics/hepmc:3= ) + lhapdf? ( sci-physics/lhapdf:= ) + zlib? ( sys-libs/zlib )" +# ROOT is used only when building related tests +DEPEND="${RDEPEND} + test? ( + root? ( sci-physics/root:= ) + )" + +PATCHES=( + "${FILESDIR}"/${PN}8209-root-noninteractive.patch +) + +S="${WORKDIR}/${MY_P}" + +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 + 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 \ + -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/main54.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 + ./configure \ + --arch=Linux \ + --cxx="$(tc-getCXX)" \ + --prefix="${EPREFIX}/usr" \ + --prefix-lib="$(get_libdir)" \ + --prefix-share="${EPYTHIADIR}" \ + $(usex fastjet "--with-fastjet3" "") \ + $(usex zlib "--with-gzip" "") \ + $(usex hepmc "--with-hepmc3" "") \ + $(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|LINE%=|LINE%%=|' \ + bin/pythia8-config || die +} + +src_test() { + cd examples || die + + local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)" + use hepmc && tests+=" $(echo main{41,42,85,86}.out)" + use hepmc && 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 hepmc && 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 + + # 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/xmldoc 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 + + # cleanup + unset PYTHIADIR EPYTHIADIR +} diff --git a/sci-physics/pythia/pythia-8.3.07.ebuild b/sci-physics/pythia/pythia-8.3.07.ebuild deleted file mode 100644 index 08fe8482f92e..000000000000 --- a/sci-physics/pythia/pythia-8.3.07.ebuild +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit toolchain-funcs - -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://pythia8.hepforge.org/" -SRC_URI="https://pythia.org/download/${PN}${MV//./}/${MY_P}.tgz - test? ( lhapdf? ( - https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/CT10.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/MRST2007lomod.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/cteq66.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/cteq6l1.tar.gz - https://www.hepforge.org/archive/lhapdf/pdfsets/v6.backup/${LHA_VER}/unvalidated/MRST2004qed.tar.gz - ) )" - -SLOT="8" -LICENSE="GPL-2" -KEYWORDS="~amd64" -IUSE="doc examples fastjet +hepmc lhapdf root test zlib" -RESTRICT="!test? ( test )" - -RDEPEND=" - fastjet? ( sci-physics/fastjet ) - hepmc? ( sci-physics/hepmc:3= ) - lhapdf? ( sci-physics/lhapdf:= ) - zlib? ( sys-libs/zlib )" -# ROOT is used only when building related tests -DEPEND="${RDEPEND} - test? ( - root? ( sci-physics/root:= ) - )" - -PATCHES=( - "${FILESDIR}"/${PN}8209-root-noninteractive.patch -) - -S="${WORKDIR}/${MY_P}" - -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 - 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 \ - -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/main54.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 - ./configure \ - --arch=Linux \ - --cxx="$(tc-getCXX)" \ - --prefix="${EPREFIX}/usr" \ - --prefix-lib="$(get_libdir)" \ - --prefix-share="${EPYTHIADIR}" \ - $(usex fastjet "--with-fastjet3" "") \ - $(usex zlib "--with-gzip" "") \ - $(usex hepmc "--with-hepmc3" "") \ - $(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|LINE%=|LINE%%=|' \ - bin/pythia8-config || die -} - -src_test() { - cd examples || die - - local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)" - use hepmc && tests+=" $(echo main{41,42,85,86}.out)" - use hepmc && 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 hepmc && 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 - - # 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 - insinto "${PYTHIADIR}" - doins -r share/Pythia8/xmldoc 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 - - # cleanup - unset PYTHIADIR EPYTHIADIR -} -- cgit v1.2.3