commit:     c9ab3582f58d713a157b27823c84ab929861411f
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
AuthorDate: Wed Mar 26 12:19:01 2025 +0000
Commit:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
CommitDate: Wed Mar 26 16:03:36 2025 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=c9ab3582

sci-physics/samurai: new package, add 2.1.1

Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>
Closes: https://github.com/gentoo/sci/pull/1340

 sci-physics/samurai/metadata.xml         | 21 +++++++++++++
 sci-physics/samurai/samurai-2.1.1.ebuild | 54 ++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/sci-physics/samurai/metadata.xml b/sci-physics/samurai/metadata.xml
new file mode 100644
index 000000000..372ef873d
--- /dev/null
+++ b/sci-physics/samurai/metadata.xml
@@ -0,0 +1,21 @@
+<?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">
+       Samurai is a tool for the automated numerical evaluation of one-loop 
virtual corrections to any scattering amplitudes within the dimensional 
regularization scheme. It is based on the decomposition of the integrand 
according to the OPP-approach, extended to accommodate an implementation of the 
generalised D-dimensional unitarity-cuts technique, and uses a polynomial 
interpolation exploiting the Discrete Fourier Transform. Samurai can process 
integrands with any number of external legs, written either as numerator of 
Feynman diagrams or as product of tree level amplitudes and it can be compiled 
in double or quadruple precision.
+       </longdescription>
+
+       <use>
+               <flag name="looptools">Build with 
<pkg>sci-physics/looptools</pkg></flag>
+               <flag name="qcdloop">Build with 
<pkg>sci-physics/qcdloop</pkg></flag>
+       </use>
+</pkgmetadata>

diff --git a/sci-physics/samurai/samurai-2.1.1.ebuild 
b/sci-physics/samurai/samurai-2.1.1.ebuild
new file mode 100644
index 000000000..ceff43bfd
--- /dev/null
+++ b/sci-physics/samurai/samurai-2.1.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fortran-2 autotools
+
+DESCRIPTION="Scattering AMplitudes from Unitarity-based Reduction Algorithm at 
the Integrand level."
+HOMEPAGE="https://samurai.hepforge.org/";
+SRC_URI="https://samurai.hepforge.org/downloads?f=${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+qcdloop looptools"
+
+RDEPEND="
+       sci-physics/oneloop[dpkind,qpkind16,-qpkind]
+       qcdloop? ( sci-physics/qcdloop )
+       looptools? ( sci-physics/looptools )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       # Fix that qcdloop and oneloop are already installed
+       sed -i 's/lib_LTLIBRARIES.*/lib_LTLIBRARIES = libsamurai.la/g' 
Makefile.am || die
+       local myeconfargs=(
+               FCFLAGS="${FCFLAGS} -std=legacy -fPIC -I${ESYSROOT}/usr/include"
+               --with-avh_olo="${ESYSROOT}"/usr/$(get_libdir)/libavh_olo.so
+               --with-avh_olo_precision=double
+               --with-precision=double
+               "$(use_with qcdloop qcdloop "${ESYSROOT}"/usr)"
+               "$(use_with looptools looptools "${ESYSROOT}"/usr)"
+       )
+
+       CONFIG_SHELL="${ESYSROOT}"/bin/bash econf "${myeconfargs[@]}"
+
+       # fix old vs new oneloop parameters
+       sed -i 's/avh_olo_kinds/avh_olo_dp_kinds/g' samurai/madds.f90 || die
+}
+
+src_compile() {
+       emake -j1
+}
+
+src_install() {
+       default
+       find "${ED}" -name '*.la' -delete || die
+}

Reply via email to