Skip to content

Commit

Permalink
sci-libs/cuba: new package, add 4.2.2
Browse files Browse the repository at this point in the history
Closes: #1291
Co-authored-by: Nowa Ammerlaan <andrewammerlaan@gentoo.org>
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
  • Loading branch information
APN-Pucky and Nowa-Ammerlaan committed Sep 24, 2024
1 parent d5b13ba commit 950a343
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions sci-libs/cuba/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST Cuba-4.2.2.tar.gz 744120 BLAKE2B 34cb4954a2659b739f7c0495772920c6d8c1e370b8636a88ed1f2e4dacc73384c71a27d6e37f618a72ba710f87da71ddc5329723be030b789a4677af3b4c540f SHA512 afa9eefcb6993d72ae291138889fde017e4ecca75d8b80922a529a6b653a10fa6883f56d1cf54715b61bb3e5c1c631c5a93d4c4d6cf82052235b1349fb0527a7
46 changes: 46 additions & 0 deletions sci-libs/cuba/cuba-4.2.2.ebuild
Original file line number Diff line number Diff line change
@@ -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
}
15 changes: 15 additions & 0 deletions sci-libs/cuba/metadata.xml
Original file line number Diff line number Diff line change
@@ -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>sci-physics@gentoo.org</email>
<name>Gentoo Physics Project</name>
</maintainer>
<maintainer type="person">
<email>alexander@neuwirth-informatik.de</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>

0 comments on commit 950a343

Please sign in to comment.