commit:     f2f3260046e35a2ec6983821e7fc2cdae39cf05b
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
AuthorDate: Tue May  7 17:37:23 2024 +0000
Commit:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
CommitDate: Thu Jun 27 12:16:32 2024 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=f2f32600

sci-physics/cuttools: new package, add 1.8.2

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

 sci-physics/cuttools/cuttools-1.8.2.ebuild | 52 ++++++++++++++++++++++++++++++
 sci-physics/cuttools/files/mpnumdummy.f90  | 26 +++++++++++++++
 sci-physics/cuttools/metadata.xml          | 22 +++++++++++++
 3 files changed, 100 insertions(+)

diff --git a/sci-physics/cuttools/cuttools-1.8.2.ebuild 
b/sci-physics/cuttools/cuttools-1.8.2.ebuild
new file mode 100644
index 000000000..d72b6def0
--- /dev/null
+++ b/sci-physics/cuttools/cuttools-1.8.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fortran-2 toolchain-funcs
+
+DESCRIPTION="Computing 1-loop amplitudes at the integrand level"
+HOMEPAGE="https://www.ugr.es/~pittau/CutTools/";
+SRC_URI="https://www.ugr.es/~pittau/CutTools/${PN}_v${PV}.tar.gz";
+S="${WORKDIR}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="+dummy"
+DEPEND="
+       sci-physics/qcdloop
+       sci-physics/oneloop[dpkind,qpkind16,-qpkind,-tlevel]
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       default
+       sed -i 's/^ALL =.*$/ALL = $(CTS)/' src/makefile ||  die
+       if use dummy ; then 
+               cp "${FILESDIR}"/mpnumdummy.f90 src/cts/mpnumdummy.f90 || die
+       fi
+       if use dummy ; then
+               sed -i 's/CTS =/CTS = mpnumdummy.o/' src/makefile || die
+       fi
+}
+
+src_compile() {
+       emake -j1 FFLAGS="${FFLAGS} -I${ESYSROOT}/usr/include -fPIC -std=legacy"
+       tc-export AR CXX
+       cd includects || die
+       ${AR} -x libcts.a || die
+       ${CXX} ${CXXFLAGS} -shared *.o -o lib${PN}.so || die
+}
+
+src_install() {
+       cd includects || die
+       dolib.so lib${PN}.so
+       cd .. || die
+       mv includects ${PN} || die
+       rm ${PN}/*.a || die
+       rm ${PN}/*.so || die
+       rm ${PN}/*.o || die
+       doheader -r ${PN}
+}

diff --git a/sci-physics/cuttools/files/mpnumdummy.f90 
b/sci-physics/cuttools/files/mpnumdummy.f90
new file mode 100644
index 000000000..be1e0d52b
--- /dev/null
+++ b/sci-physics/cuttools/files/mpnumdummy.f90
@@ -0,0 +1,26 @@
+
+module cts_numdummies
+  implicit none
+  contains
+
+  subroutine dpnumdummy(q,amp)
+    ! dummy numerator in double precision. Always returns zero.
+    implicit none
+    include 'cts_dpc.h'
+      , intent(in), dimension(0:3) :: q
+    include 'cts_dpc.h'
+      , intent(out) :: amp
+    amp = 0
+  end subroutine dpnumdummy
+
+  subroutine mpnumdummy(q,amp)
+    ! dummy numerator in quad precision. Always returns zero.
+    include 'cts_mprec.h'
+    implicit none
+    include 'cts_mpc.h'
+      , intent(in), dimension(0:3) :: q
+    include 'cts_mpc.h'
+      , intent(out) :: amp
+    amp = 0
+  end subroutine mpnumdummy
+end module cts_numdummies

diff --git a/sci-physics/cuttools/metadata.xml 
b/sci-physics/cuttools/metadata.xml
new file mode 100644
index 000000000..ceddefcf0
--- /dev/null
+++ b/sci-physics/cuttools/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://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>
+  A package for evaluation of scalar and tensor one-loop integrals 
+  based on the FF package by G.J. van Oldenborgh.
+  It features an easy Fortran, C++, and Mathematica interface 
+  to the scalar one-loop functions of FF and in addition provides 
+  the 2-, 3-, and 4-point tensor coefficient functions.
+  </longdescription>
+  <use>
+    <flag name="dummy">Add dummy module for OpenLoops</flag>
+  </use>
+</pkgmetadata>

Reply via email to