summaryrefslogtreecommitdiff
path: root/sci-mathematics/arb
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/arb')
-rw-r--r--sci-mathematics/arb/Manifest4
-rw-r--r--sci-mathematics/arb/arb-2.11.1-r1.ebuild58
-rw-r--r--sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch17
-rw-r--r--sci-mathematics/arb/metadata.xml18
4 files changed, 97 insertions, 0 deletions
diff --git a/sci-mathematics/arb/Manifest b/sci-mathematics/arb/Manifest
new file mode 100644
index 000000000000..3d52f99f1884
--- /dev/null
+++ b/sci-mathematics/arb/Manifest
@@ -0,0 +1,4 @@
+AUX arb-2.11.1-pie-ftbs.patch 585 SHA256 4b4ab12d340c043de62b03c07da95ddfa17e45641d2b7efee42e25e85d42b77a SHA512 f147d61a6c9dfac57ded28a7265db9e6be76ebb8c9c787960d4dafc36ef703cebc42ba4a3ca8ef03ae3b81589d6a6a555a7ff381ddc9fd391466156677e0b4ff WHIRLPOOL 5b6c5a2516a52f80577f4f9ea15c467e342c8d532f3cbbb8ab47edd8383cbf140b1b635958d07d7acd85fafba08a55a9ff1edba9cce77226191b83325a435dd2
+DIST arb-2.11.1.tar.gz 1248835 SHA256 de37f008fd154bd4b9c3fd7f5b0f13928cd109358d01959a98245fe33d08bf63 SHA512 7a014da5208b55f20c7a3cd3eb51070b09ae107b04cbbd6329925780c2ab4d7c38e1fb3619f21456fa806939818370fcae921f59eb013661b6bdd3d0971e3353 WHIRLPOOL 12cd12786e60a5f37da6c1623468e2f8908af2dfa553bc50261f6735e0513ab34400da3e06d99128b2197add6d371a9c1ea732012ae3bd5ab3bd97de6a18520f
+EBUILD arb-2.11.1-r1.ebuild 1584 SHA256 d2245b0573c63f382c9c0ac32fc1cd72b031c96c8196951b65a006bae11716f7 SHA512 a489c8422518fdcb774e42b77c176301d64fc2c4d76ea8dc5865556ad2a1ce6ec562fed29e7c913c37fc69281d9b2d34fd62d2aaf5936e0fc0a6ed7679df0df8 WHIRLPOOL 6305135624be7e372fa75fa8320cee2de6c60a00d0fadd584fc79559ff2eb0a1db52fc29f9a54eca3737bca6e9975587b6eaeb87bc1278b2c4b6ff8dfdfce601
+MISC metadata.xml 756 SHA256 b85d966b5602cd3f7fed761cdc0ea5a3e3f0cce572382efaed26e2b5aa8a18b1 SHA512 843e473b1cb261c97f817d2c003f632c973a67ba1d8cfe188a40f41cc89fe6167917e2b669768420a7c7c88b19f5b4b68ba4529ab73e373c6696786ecfad11b6 WHIRLPOOL de90f607a88d279419d5953c34beae7ff9a15f2048f91521ace6878481691799b5fa954a9de246957c373f51494c23f32f6df54ad190c1d90e4429dcad416343
diff --git a/sci-mathematics/arb/arb-2.11.1-r1.ebuild b/sci-mathematics/arb/arb-2.11.1-r1.ebuild
new file mode 100644
index 000000000000..88e262a3d9fd
--- /dev/null
+++ b/sci-mathematics/arb/arb-2.11.1-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="C library for arbitrary-precision interval arithmetic"
+HOMEPAGE="http://fredrikj.net/arb/"
+SRC_URI="https://github.com/fredrik-johansson/arb/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0/2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-macos"
+IUSE="static-libs"
+
+RDEPEND="
+ dev-libs/gmp:0=
+ dev-libs/mpfr:0=
+ >=sci-mathematics/flint-2.5.0:=
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-pie-ftbs.patch )
+
+src_configure() {
+ # Not an autoconf configure script.
+ # Note that it appears to have been cloned from the flint configure script
+ # and that not all the options offered are valid.
+ tc-export CC AR CXX
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --with-flint="${EPREFIX}/usr" \
+ --with-gmp="${EPREFIX}/usr" \
+ --with-mpfr="${EPREFIX}/usr" \
+ $(use_enable static-libs static) \
+ CFLAGS="${CPPFLAGS} ${CFLAGS}" || die
+}
+
+src_compile() {
+ emake verbose
+}
+
+src_test() {
+ # Have to set the library path otherwise a previous install of libarb may be loaded.
+ # This is in part a consequence of setting the soname/installnae I think.
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ DYLD_LIBRARY_PATH="${S}" emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
+ else
+ LD_LIBRARY_PATH="${S}" emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
+ use static-libs || prune_libtool_files --all
+ dodoc README.md
+}
diff --git a/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch b/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch
new file mode 100644
index 000000000000..b2db6b2a294c
--- /dev/null
+++ b/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch
@@ -0,0 +1,17 @@
+Description: Use -r instead of -Wl,-r to fix FTBFS with PIE enabled
+Author: Logan Rosen
+Forwarded: yes
+
+diff --git a/Makefile.subdirs b/Makefile.subdirs
+index 3dc757d..f0ec923 100644
+--- a/Makefile.subdirs
++++ b/Makefile.subdirs
+@@ -52,7 +52,7 @@ $(BUILD_DIR)/$(MOD_DIR)_%.o: %.c
+ $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@"
+
+ $(MOD_LOBJ): $(LOBJS)
+- $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib
++ $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib
+
+ -include $(LOBJS:.lo=.d)
+
diff --git a/sci-mathematics/arb/metadata.xml b/sci-mathematics/arb/metadata.xml
new file mode 100644
index 000000000000..5830a1d45f91
--- /dev/null
+++ b/sci-mathematics/arb/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Arb is a C library for arbitrary-precision interval arithmetic,
+ using a midpoint-radius representation (“ball arithmetic”). It
+ supports real and complex numbers, polynomials, power series,
+ matrices, and evaluation of many transcendental functions. All
+ operations are done with automatic, rigorous error bounds.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">fredrik-johansson/arb</remote-id>
+ </upstream>
+</pkgmetadata>