public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexander Puck Neuwirth" <alexander@neuwirth-informatik.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/oneloop/, sci-physics/oneloop/files/
Date: Thu, 27 Jun 2024 12:19:28 +0000 (UTC)	[thread overview]
Message-ID: <1719490583.78d3b300e874a7d0553553d32e2c3387ea03f5c2.alexander@gentoo> (raw)

commit:     78d3b300e874a7d0553553d32e2c3387ea03f5c2
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de>
AuthorDate: Wed Apr 17 16:56:43 2024 +0000
Commit:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de>
CommitDate: Thu Jun 27 12:16:23 2024 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=78d3b300

sci-physics/oneloop: add 3.6, drop 2020.07.31

Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>

 ...ig.patch => oneloop-3.6_p20200731-config.patch} |   0
 sci-physics/oneloop/metadata.xml                   |  16 ++++
 sci-physics/oneloop/oneloop-2020.07.31.ebuild      |  46 ---------
 sci-physics/oneloop/oneloop-3.6.ebuild             | 106 +++++++++++++++++++++
 sci-physics/oneloop/oneloop-3.6_p20200731.ebuild   | 104 ++++++++++++++++++++
 5 files changed, 226 insertions(+), 46 deletions(-)

diff --git a/sci-physics/oneloop/files/oneloop-2020.07.31-config.patch b/sci-physics/oneloop/files/oneloop-3.6_p20200731-config.patch
similarity index 100%
rename from sci-physics/oneloop/files/oneloop-2020.07.31-config.patch
rename to sci-physics/oneloop/files/oneloop-3.6_p20200731-config.patch

diff --git a/sci-physics/oneloop/metadata.xml b/sci-physics/oneloop/metadata.xml
index 35b6c2bd9..40e059101 100644
--- a/sci-physics/oneloop/metadata.xml
+++ b/sci-physics/oneloop/metadata.xml
@@ -9,7 +9,23 @@
 		<email>sci-physics@gentoo.org</email>
 		<name>Gentoo Physics Project</name>
 	</maintainer>
+	<longdescription lang="en">
+		Library of one-loop scalar functions by Andreas van Hameren.
+		Commonly named avh_olo and used by/for cuttools.
+	</longdescription>
 	<upstream>
 		<remote-id type="bitbucket">hameren/oneloop</remote-id>
 	</upstream>
+	<use>
+		<flag name="dpkind">double precision</flag>
+		<flag name="qpkind">quad precision</flag>
+		<flag name="dpkind16">double16 precision</flag>
+		<flag name="qpkind16">quad16 precision</flag>
+		<flag name="ddcpp">double use sci-libs/qd</flag>
+		<flag name="qdcpp">quad use sci-libs/qd</flag>
+		<flag name="arprec"> use sci-libs/arprec</flag>
+		<flag name="mpfun90"> use sci-libs/mpfun90</flag>
+		<flag name="tlevel"> enable tlevel</flag>
+		<flag name="cppintf"> enable cppintf</flag>
+	</use>
 </pkgmetadata>

diff --git a/sci-physics/oneloop/oneloop-2020.07.31.ebuild b/sci-physics/oneloop/oneloop-2020.07.31.ebuild
deleted file mode 100644
index 9344d1513..000000000
--- a/sci-physics/oneloop/oneloop-2020.07.31.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# python only needed for create.py to get binaries
-PYTHON_COMPAT=( python3_{10..11} )
-inherit toolchain-funcs python-any-r1 fortran-2
-
-DESCRIPTION="Library of one-loop scalar functions"
-HOMEPAGE="https://bitbucket.org/hameren/oneloop"
-SRC_URI="https://bitbucket.org/hameren/oneloop/get/3762b8bad6ad.zip -> ${P}.zip"
-S="${WORKDIR}/hameren-oneloop-3762b8bad6ad"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~amd64"
-
-BDEPEND="
-	${PYTHON_DEPS}
-	app-arch/unzip
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-config.patch
-)
-
-src_configure() {
-	tc-export FC
-	sed -i "/FC = /s/gfortran/${FC}/g" Config || die
-	sed -i "/FFLAGS = /s/ -O/${FFLAGS} -fPIC/g" Config || die
-}
-
-src_compile() {
-	tc-export FC
-	emake -f make_cuttools
-	${EPYTHON} ./create.py || die "Failed to compile"
-	#./create.py dynamic || die
-	${FC} ${LDFLAGS} -Wl,-soname,libavh_olo.so -shared -o libavh_olo.so avh_olo.o || die "Failed to link"
-}
-
-src_install() {
-	dolib.a libavh_olo.a
-	dolib.so libavh_olo.so
-	doheader avh_olo.mod
-}

diff --git a/sci-physics/oneloop/oneloop-3.6.ebuild b/sci-physics/oneloop/oneloop-3.6.ebuild
new file mode 100644
index 000000000..1a7f5d864
--- /dev/null
+++ b/sci-physics/oneloop/oneloop-3.6.ebuild
@@ -0,0 +1,106 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P=OneLOop-${PV}
+
+# python only needed for create.py to get binaries
+PYTHON_COMPAT=( python3_{10..12} )
+inherit fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Library of one-loop scalar functions"
+HOMEPAGE="
+	https://helac-phegas.web.cern.ch/OneLOop.html
+	https://bitbucket.org/hameren/oneloop
+"
+SRC_URI="http://helac-phegas.web.cern.ch/helac-phegas/tar-files/${MY_P}.tgz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+dpkind +qpkind qpkind16 dpkind16 qdcpp ddcpp mpfun90 arprec tlevel cppintf"
+REQUIRED_USE="
+	?? ( dpkind dpkind16 ddcpp )
+	?? ( qpkind qpkind16 qdcpp )
+	?? ( arprec mpfun90 )
+	|| ( dpkind dpkind16 ddcpp qpkind qpkind16 qdcpp )
+"
+
+DEPEND="
+	qpkind? ( sci-libs/qd )
+	qpkind16? ( sci-libs/qd )
+	arprec? ( sci-libs/arprec )
+	mpfun90? ( sci-libs/mpfun90 )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	${PYTHON_DEPS}
+	app-arch/unzip
+"
+
+src_configure() {
+	tc-export FC
+	# set fortran
+	sed -i "/FC = /s/gfortran/${FC}/g" Config || die
+	sed -i "/FFLAGS = /s/ -O/${FFLAGS} -fPIC/g" Config || die
+	# Clear config
+	sed -i "s/^DPKIND.*$//g" Config || die
+	sed -i "s/^QPKIND.*$//g" Config || die
+
+	if use dpkind ; then
+		echo "DPKIND = kind(1d0)" >> Config || die
+	fi
+	if use qpkind ; then
+		echo "QPKIND = kind(1d0)" >> Config || die
+	fi
+	if use dpkind16 ; then
+		echo "DPKIND = 16" >> Config || die
+	fi
+	if use qpkind16 ; then
+		echo "QPKIND = 16" >> Config || die
+	fi
+
+	if use qdcpp ; then
+		echo "QDTYPE = qdcpp" >> Config || die
+	fi
+	if use ddcpp ; then
+		echo "DDTYPE = qdcpp" >> Config || die
+	fi
+
+	if use mpfun90 ; then
+		echo "MPTYPE = mpfun90" >> Config || die
+	fi
+	if use arprec ; then
+		echo "MPTYPE = arprec" >> Config || die
+	fi
+
+	if use tlevel ; then
+		sed -i "s/^.*TLEVEL.*$/TLEVEL = yes/" Config || die
+	else
+		sed -i "s/^.*TLEVEL.*$/TLEVEL = no/" Config || die
+	fi
+	if use cppintf ; then
+		sed -i "s/^.*CPPINTF.*$/CPPINTF = yes/" Config || die
+	else
+		sed -i "s/^.*CPPINTF.*$/CPPINTF = no/" Config || die
+	fi
+}
+
+src_compile() {
+	tc-export FC
+	#emake -f make_cuttools
+	${EPYTHON} ./create.py source || die "Failed to compile"
+	# create.py does not use soname, so we do it ourself
+	#./create.py dynamic || die
+	${FC} -O -fPIC -c avh_olo.f90 -o avh_olo.o || die
+	${FC} ${LDFLAGS} -Wl,-soname,libavh_olo.so -shared -o libavh_olo.so *.o || die
+}
+
+src_install() {
+	#dolib.a libavh_olo.a
+	dolib.so libavh_olo.so
+	doheader *.mod
+	dosym libavh_olo.so /usr/$(get_libdir)/liboneloop.so
+}

diff --git a/sci-physics/oneloop/oneloop-3.6_p20200731.ebuild b/sci-physics/oneloop/oneloop-3.6_p20200731.ebuild
new file mode 100644
index 000000000..e25833759
--- /dev/null
+++ b/sci-physics/oneloop/oneloop-3.6_p20200731.ebuild
@@ -0,0 +1,104 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# python only needed for create.py to get binaries
+PYTHON_COMPAT=( python3_{10..12} )
+inherit fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Library of one-loop scalar functions"
+HOMEPAGE="
+	https://helac-phegas.web.cern.ch/OneLOop.html
+	https://bitbucket.org/hameren/oneloop
+"
+SRC_URI="https://bitbucket.org/hameren/oneloop/get/3762b8bad6ad.zip -> ${P}.zip"
+S="${WORKDIR}/hameren-oneloop-3762b8bad6ad"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+dpkind +qpkind qpkind16 dpkind16 qdcpp ddcpp mpfun90 arprec tlevel cppintf"
+REQUIRED_USE="
+	?? ( dpkind dpkind16 ddcpp )
+	?? ( qpkind qpkind16 qdcpp )
+	?? ( arprec mpfun90 )
+	|| ( dpkind dpkind16 ddcpp qpkind qpkind16 qdcpp )
+"
+
+DEPEND="
+	qpkind? ( sci-libs/qd )
+	qpkind16? ( sci-libs/qd )
+	arprec? ( sci-libs/arprec )
+	mpfun90? ( sci-libs/mpfun90 )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	${PYTHON_DEPS}
+	app-arch/unzip
+"
+
+src_configure() {
+	tc-export FC
+	# set fortran
+	sed -i "/FC = /s/gfortran/${FC}/g" Config || die
+	sed -i "/FFLAGS = /s/ -O/${FFLAGS} -fPIC/g" Config || die
+	# Clear config
+	sed -i "s/^DPKIND.*$//g" Config || die
+	sed -i "s/^QPKIND.*$//g" Config || die
+
+	if use dpkind ; then
+		echo "DPKIND = kind(1d0)" >> Config || die
+	fi
+	if use qpkind ; then
+		echo "QPKIND = kind(1d0)" >> Config || die
+	fi
+	if use dpkind16 ; then
+		echo "DPKIND = 16" >> Config || die
+	fi
+	if use qpkind16 ; then
+		echo "QPKIND = 16" >> Config || die
+	fi
+
+	if use qdcpp ; then
+		echo "QDTYPE = qdcpp" >> Config || die
+	fi
+	if use ddcpp ; then
+		echo "DDTYPE = qdcpp" >> Config || die
+	fi
+
+	if use mpfun90 ; then
+		echo "MPTYPE = mpfun90" >> Config || die
+	fi
+	if use arprec ; then
+		echo "MPTYPE = arprec" >> Config || die
+	fi
+
+	if use tlevel ; then
+		sed -i "s/^.*TLEVEL.*$/TLEVEL = yes/" Config || die
+	else
+		sed -i "s/^.*TLEVEL.*$/TLEVEL = no/" Config || die
+	fi
+	if use cppintf ; then
+		sed -i "s/^.*CPPINTF.*$/CPPINTF = yes/" Config || die
+	else
+		sed -i "s/^.*CPPINTF.*$/CPPINTF = no/" Config || die
+	fi
+}
+
+src_compile() {
+	tc-export FC
+	#emake -f make_cuttools
+	${EPYTHON} ./create.py source || die "Failed to compile"
+	# create.py does not use soname, so we do it ourself
+	#./create.py dynamic || die
+	${FC} -O -fPIC -c avh_olo.f90 -o avh_olo.o || die
+	${FC} ${LDFLAGS} -Wl,-soname,libavh_olo.so -shared -o libavh_olo.so *.o || die
+}
+
+src_install() {
+	#dolib.a libavh_olo.a
+	dolib.so libavh_olo.so
+	doheader *.mod
+	dosym libavh_olo.so /usr/$(get_libdir)/liboneloop.so
+}


             reply	other threads:[~2024-06-27 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 12:19 Alexander Puck Neuwirth [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-02 11:30 [gentoo-commits] proj/sci:master commit in: sci-physics/oneloop/, sci-physics/oneloop/files/ Andrew Ammerlaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1719490583.78d3b300e874a7d0553553d32e2c3387ea03f5c2.alexander@gentoo \
    --to=alexander@neuwirth-informatik.de \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox