Skip to content

Commit c9ab358

Browse files
committed
sci-physics/samurai: new package, add 2.1.1
Signed-off-by: Alexander Puck Neuwirth <[email protected]> Closes: #1340
1 parent d2b6d90 commit c9ab358

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

sci-physics/samurai/Manifest

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DIST samurai-2.1.1.tar.gz 1476077 BLAKE2B 31a84c089d9f78f34f45803f821e6287fd4d688d47fadd6f19220504f7a984a3c79ff7da23c80bbf25dee7494d0eba8ee6fed7f401c8dc267702950d1f9d416a SHA512 5ee7237ec42118466be9d238d2efb2b7f71b1256faf21784be45cd685964d725d69bdd6860440486fbf8e48bb56203dc9214ef9acf9b557f876da99477d8b952

sci-physics/samurai/metadata.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
<maintainer type="person">
5+
<email>[email protected]</email>
6+
<name>Alexander Puck Neuwirth</name>
7+
</maintainer>
8+
<maintainer type="project">
9+
<email>[email protected]</email>
10+
<name>Gentoo Physics Project</name>
11+
</maintainer>
12+
13+
<longdescription lang="en">
14+
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.
15+
</longdescription>
16+
17+
<use>
18+
<flag name="looptools">Build with <pkg>sci-physics/looptools</pkg></flag>
19+
<flag name="qcdloop">Build with <pkg>sci-physics/qcdloop</pkg></flag>
20+
</use>
21+
</pkgmetadata>
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2022 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
inherit fortran-2 autotools
7+
8+
DESCRIPTION="Scattering AMplitudes from Unitarity-based Reduction Algorithm at the Integrand level."
9+
HOMEPAGE="https://samurai.hepforge.org/"
10+
SRC_URI="https://samurai.hepforge.org/downloads?f=${P}.tar.gz -> ${P}.tar.gz"
11+
12+
LICENSE="GPL-3+"
13+
SLOT="0"
14+
KEYWORDS="~amd64"
15+
IUSE="+qcdloop looptools"
16+
17+
RDEPEND="
18+
sci-physics/oneloop[dpkind,qpkind16,-qpkind]
19+
qcdloop? ( sci-physics/qcdloop )
20+
looptools? ( sci-physics/looptools )
21+
"
22+
DEPEND="${RDEPEND}"
23+
24+
src_prepare() {
25+
default
26+
eautoreconf
27+
}
28+
29+
src_configure() {
30+
# Fix that qcdloop and oneloop are already installed
31+
sed -i 's/lib_LTLIBRARIES.*/lib_LTLIBRARIES = libsamurai.la/g' Makefile.am || die
32+
local myeconfargs=(
33+
FCFLAGS="${FCFLAGS} -std=legacy -fPIC -I${ESYSROOT}/usr/include"
34+
--with-avh_olo="${ESYSROOT}"/usr/$(get_libdir)/libavh_olo.so
35+
--with-avh_olo_precision=double
36+
--with-precision=double
37+
"$(use_with qcdloop qcdloop "${ESYSROOT}"/usr)"
38+
"$(use_with looptools looptools "${ESYSROOT}"/usr)"
39+
)
40+
41+
CONFIG_SHELL="${ESYSROOT}"/bin/bash econf "${myeconfargs[@]}"
42+
43+
# fix old vs new oneloop parameters
44+
sed -i 's/avh_olo_kinds/avh_olo_dp_kinds/g' samurai/madds.f90 || die
45+
}
46+
47+
src_compile() {
48+
emake -j1
49+
}
50+
51+
src_install() {
52+
default
53+
find "${ED}" -name '*.la' -delete || die
54+
}

0 commit comments

Comments
 (0)