commit:     2442677d17ad8ece249e6418c64477a3ff29290d
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
AuthorDate: Tue May  7 20:12:47 2024 +0000
Commit:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
CommitDate: Thu Jun 27 12:20:34 2024 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=2442677d

sci-physics/photos: new package, add 3.64

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

 sci-physics/photos/metadata.xml       | 23 ++++++++++
 sci-physics/photos/photos-3.64.ebuild | 82 +++++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+)

diff --git a/sci-physics/photos/metadata.xml b/sci-physics/photos/metadata.xml
new file mode 100644
index 000000000..0a24d3422
--- /dev/null
+++ b/sci-physics/photos/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Alexander Puck Neuwirth</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Physics Project</name>
+       </maintainer>
+
+       <longdescription lang="en">
+       The main application of PHOTOS is the generation of QED radiative 
corrections in decays of any resonances, simulated by a "host" Monte Carlo 
generator
+       </longdescription>
+
+       <use>
+               <flag name="pythia">Build with pythia</flag>
+               <flag name="hepmc2">Build with hepmc 2</flag>
+               <flag name="hepmc3">Build with hepmc 3</flag>
+               <flag name="tauola">Build with tauola</flag>
+       </use>
+</pkgmetadata>

diff --git a/sci-physics/photos/photos-3.64.ebuild 
b/sci-physics/photos/photos-3.64.ebuild
new file mode 100644
index 000000000..32c09af64
--- /dev/null
+++ b/sci-physics/photos/photos-3.64.ebuild
@@ -0,0 +1,82 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fortran-2 autotools
+
+MY_PN="PHOTOS"
+MY_P=${MY_PN}.${PV}
+
+DESCRIPTION="Monte Carlo for bremsstrahlung in the decay of particles and 
resonances"
+HOMEPAGE="
+       https://gitlab.cern.ch/photospp/photospp
+       http://photospp.web.cern.ch/photospp/
+"
+SRC_URI="https://photospp.web.cern.ch/resources/${MY_P}/${MY_P}.tar.gz";
+S="${WORKDIR}/${MY_PN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc examples hepmc2 hepmc3 pythia tauola"
+
+RDEPEND="
+       hepmc2? ( sci-physics/hepmc:2=[-cm(-),gev(+)] )
+       hepmc3? ( sci-physics/hepmc:3=[-cm(-),gev(+)] )
+       pythia? ( sci-physics/pythia:8= )
+       tauola? ( sci-physics/tauola[hepmc2?,hepmc3?,pythia?] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       doc? (
+               app-text/doxygen[dot]
+               app-text/ghostscript-gpl
+               app-text/texlive
+       )
+"
+REQUIRED_USE=" || ( hepmc2 hepmc3 )"
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               --without-mc-tester \
+               $(use_with hepmc3 hepmc3 "${EPREFIX}/usr") \
+               $(use_with hepmc2 hepmc "${EPREFIX}/usr") \
+               $(use_with pythia pythia8 "${EPREFIX}/usr") \
+               $(use_with tauola tauola "${EPREFIX}/usr")
+       # weird autoconf + Makefile
+       cat <<-EOF >> make.inc || die
+       LDFLAGS += ${LDFLAGS}
+       CFLAGS += ${CFLAGS}
+       FFLAGS += ${FFLAGS}
+       EOF
+}
+
+src_compile() {
+       emake -j1
+
+       if use doc; then
+               cd "${S}/documentation/doxy_documentation" || die
+               default
+               cd "${S}/documentation/latex_documentation" || die
+               default
+       fi
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+
+       if use doc; then
+               dodoc documentation/doxy_documentation/html/*
+               dodoc documentation/latex_documentation/*.pdf
+       fi
+
+       if use examples; then
+               dodoc -r examples
+       fi
+}

Reply via email to