summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2018-03-19 23:02:11 -0500
committerMatthias Maier <tamiko@gentoo.org>2018-03-19 23:15:53 -0500
commit204cfc28088ee86d46c94a267a30989ce4d26cdf (patch)
tree9948215cf70b702de9196082be871eab7b4171e3 /sci-libs/sundials
parentdev-python/hypothesis: version bump to 3.50.1 (diff)
downloadgentoo-204cfc28088ee86d46c94a267a30989ce4d26cdf.tar.gz
gentoo-204cfc28088ee86d46c94a267a30989ce4d26cdf.tar.bz2
gentoo-204cfc28088ee86d46c94a267a30989ce4d26cdf.zip
sci-libs/sundials: version bump to 3.0.0
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'sci-libs/sundials')
-rw-r--r--sci-libs/sundials/Manifest1
-rw-r--r--sci-libs/sundials/sundials-3.0.0.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/sci-libs/sundials/Manifest b/sci-libs/sundials/Manifest
index 90658767e7d1..fa23e7dfe485 100644
--- a/sci-libs/sundials/Manifest
+++ b/sci-libs/sundials/Manifest
@@ -1 +1,2 @@
DIST sundials-2.7.0.tar.gz 12258093 BLAKE2B 331fcf255f2bb8bcc798818b05db114feda7aacb6585177a836f17a9b58477f504099b4a33c7d71cab6e70eeb6fe47a76d101c08aa6219ee6fbac630524d5928 SHA512 c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69
+DIST sundials-3.0.0.tar.gz 12996039 BLAKE2B 0557190f6f7550bd4d7d3df10f727c6f235ff4917f2cfd35ca77785037edc43236a82383664f6fe1579bb5b07a148875b82b22f5a9e4f5f2a0607838e8a3b286 SHA512 3c86c7f27e64c2e6732546b0b1e87ea092502e361cae09b3b7eb29795c978edf494e17be13b78541dc91cc0709d928006bd0fc62ea968f2b621efa51856cdd60
diff --git a/sci-libs/sundials/sundials-3.0.0.ebuild b/sci-libs/sundials/sundials-3.0.0.ebuild
new file mode 100644
index 000000000000..35e90af469e9
--- /dev/null
+++ b/sci-libs/sundials/sundials-3.0.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD=90
+
+inherit cmake-utils toolchain-funcs fortran-2 versionator
+
+DESCRIPTION="Suite of nonlinear solvers"
+HOMEPAGE="http://computation.llnl.gov/projects/sundials"
+SRC_URI="http://computation.llnl.gov/projects/sundials/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/$(get_major_version)"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cxx doc examples fortran hypre lapack mpi openmp sparse static-libs superlumt threads"
+REQUIRED_USE="hypre? ( mpi )"
+
+RDEPEND="
+ lapack? ( virtual/lapack )
+ mpi? ( virtual/mpi sci-libs/hypre:= )
+ sparse? ( sci-libs/klu:= )
+ superlumt? ( sci-libs/superlu_mt:= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=( )
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
+ ewarn "OpenMP is not available in your current selected gcc"
+ die "need openmp capable gcc"
+ fi
+}
+
+src_configure() {
+ mycmakeargs+=(
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_STATIC_LIBS="$(usex static-libs)"
+ -DCXX_ENABLE="$(usex cxx)"
+ -DFCMIX_ENABLE="$(usex fortran)"
+ -DF90_ENABLE="$(usex fortran)"
+ -DHYPRE_ENABLE="$(usex hypre)"
+ -DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre"
+ -DHYPRE_LIBRARY="HYPRE"
+ -DKLU_ENABLE="$(usex sparse)"
+ -DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so"
+ -DLAPACK_ENABLE="$(usex lapack)"
+ -DMPI_ENABLE="$(usex mpi)"
+ -DOPENMP_ENABLE="$(usex openmp)"
+ -DPTHREAD_ENABLE="$(usex threads)"
+ -DSUPERLUMT_ENABLE="$(usex superlumt)"
+ -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt"
+ -DSUPERLUMT_LIBRARY="superlu_mt"
+ -DEXAMPLES_ENABLE="$(usex examples)"
+ -DEXAMPLES_INSTALL=ON
+ -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples"
+ -DUSE_GENERIC_MATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc doc/*/*.pdf
+ cd src
+ for r in */README; do
+ newdoc ${r} README-${r%/*}
+ done
+
+ # Use a sledgehammer, patching the buildsystem is too annoyoing (the
+ # CMake build systems consists of 2000 "lib" DESTINATIONS...)
+ if [[ lib != $(get_libdir) ]]; then
+ mv "${ED%/}"/usr/lib "${ED%/}"/usr/$(get_libdir) || die
+ fi
+}