From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1731520-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4B9C81581EE
	for <garchives@archives.gentoo.org>; Wed, 26 Mar 2025 16:04:21 +0000 (UTC)
Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	(Authenticated sender: relay-lists.gentoo.org@gentoo.org)
	by smtp.gentoo.org (Postfix) with ESMTPSA id 32101343319
	for <garchives@archives.gentoo.org>; Wed, 26 Mar 2025 16:04:21 +0000 (UTC)
Received: from bobolink.gentoo.org (localhost [127.0.0.1])
	by bobolink.gentoo.org (Postfix) with ESMTP id 2CC71110296;
	Wed, 26 Mar 2025 16:04:20 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by bobolink.gentoo.org (Postfix) with ESMTPS id 22D69110296
	for <gentoo-commits@lists.gentoo.org>; Wed, 26 Mar 2025 16:04:19 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id A28EF343311
	for <gentoo-commits@lists.gentoo.org>; Wed, 26 Mar 2025 16:04:19 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D4F11743
	for <gentoo-commits@lists.gentoo.org>; Wed, 26 Mar 2025 16:04:18 +0000 (UTC)
From: "Alexander Puck Neuwirth" <alexander@neuwirth-informatik.de>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Alexander Puck Neuwirth" <alexander@neuwirth-informatik.de>
Message-ID: <1743005016.c9ab3582f58d713a157b27823c84ab929861411f.alexander@gentoo>
Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/samurai/
X-VCS-Repository: proj/sci
X-VCS-Files: sci-physics/samurai/metadata.xml sci-physics/samurai/samurai-2.1.1.ebuild
X-VCS-Directories: sci-physics/samurai/
X-VCS-Committer: alexander
X-VCS-Committer-Name: Alexander Puck Neuwirth
X-VCS-Revision: c9ab3582f58d713a157b27823c84ab929861411f
X-VCS-Branch: master
Date: Wed, 26 Mar 2025 16:04:18 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: df2a4bad-8743-409a-9ab9-5e358117ddbe
X-Archives-Hash: 7c19ff45ec2c697caae26ad95a432424

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>alexander@neuwirth-informatik.de</email>
+		<name>Alexander Puck Neuwirth</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>sci-physics@gentoo.org</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
+}