commit:     950a343384d914b25695ef4b0c502294e0afcb78
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
AuthorDate: Mon Sep 23 16:02:01 2024 +0000
Commit:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
CommitDate: Tue Sep 24 05:46:09 2024 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=950a3433

sci-libs/cuba: new package, add 4.2.2

Closes: https://github.com/gentoo/sci/pull/1291
Co-authored-by: Nowa Ammerlaan <andrewammerlaan <AT> gentoo.org>
Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>

 sci-libs/cuba/cuba-4.2.2.ebuild | 46 +++++++++++++++++++++++++++++++++++++++++
 sci-libs/cuba/metadata.xml      | 15 ++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/sci-libs/cuba/cuba-4.2.2.ebuild b/sci-libs/cuba/cuba-4.2.2.ebuild
new file mode 100644
index 000000000..3e08cb85c
--- /dev/null
+++ b/sci-libs/cuba/cuba-4.2.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools fortran-2 toolchain-funcs
+
+MY_P=Cuba-${PV}
+
+DESCRIPTION="The Cuba library for multidimensional numerical integration"
+HOMEPAGE="http://www.feynarts.de/cuba";
+SRC_URI="http://www.feynarts.de/cuba/${MY_P}.tar.gz";
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="doc static-libs"
+
+RESTRICT="test" # broken...
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_compile() {
+       tc-export CC CXX FC AR
+       sed 's/CFLAGS =/CFLAGS = -fPIC/g' --in-place makefile || die
+       sed 's/FFLAGS =/FFLAGS = -fPIC/g' --in-place makefile || die
+       emake lib -j1
+       # make shared lib
+       FILES=$(${AR} xv libcuba.a |sed 's/x - //g' || die)
+       # unquoted FILES since newlines should be replaced by spaces
+       ${CC} -shared -Wall $FILES -lm -o libcuba.so || die
+}
+
+src_install() {
+       #default # broken...
+
+       doheader cuba.h
+       use static-libs && dolib.a libcuba.a
+       dolib.so libcuba.so
+       use doc && dodoc cuba.pdf
+}

diff --git a/sci-libs/cuba/metadata.xml b/sci-libs/cuba/metadata.xml
new file mode 100644
index 000000000..d2f2f6e4f
--- /dev/null
+++ b/sci-libs/cuba/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="project">
+    <email>[email protected]</email>
+    <name>Gentoo Physics Project</name>
+  </maintainer>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Alexander Puck Neuwirth</name>
+  </maintainer>
+  <longdescription>
+    The Cuba library offers a choice of four independent routines for 
multidimensional numerical integration: Vegas, Suave, Divonne, and Cuhre.
+  </longdescription>
+</pkgmetadata>

Reply via email to