summaryrefslogtreecommitdiff
path: root/sci-libs/superlu/superlu-4.3-r2.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-08 11:28:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-08 11:28:34 +0000
commit24fd814c326e282c4321965c31f341dad77e270d (patch)
tree033d63b33c21a3209964ab56005bb9bdd523630d /sci-libs/superlu/superlu-4.3-r2.ebuild
parent129160ec854dca4c3fedb5bcfbcb56930371da0f (diff)
gentoo resync : 08.01.2021
Diffstat (limited to 'sci-libs/superlu/superlu-4.3-r2.ebuild')
-rw-r--r--sci-libs/superlu/superlu-4.3-r2.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/sci-libs/superlu/superlu-4.3-r2.ebuild b/sci-libs/superlu/superlu-4.3-r2.ebuild
new file mode 100644
index 000000000000..7ff9a6d2020e
--- /dev/null
+++ b/sci-libs/superlu/superlu-4.3-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools fortran-2 toolchain-funcs
+
+MY_PN=SuperLU
+
+DESCRIPTION="Sparse LU factorization library"
+HOMEPAGE="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
+SRC_URI="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/${PN}_${PV}.tar.gz"
+S="${WORKDIR}/${MY_PN}_${PV}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ppc ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="virtual/blas"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ test? ( app-shells/tcsh )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-autotools.patch
+ "${FILESDIR}"/${P}-format-security.patch
+)
+
+src_prepare() {
+ unset VERBOSE
+ sed \
+ -e "s:= ar:= $(tc-getAR):g" \
+ -e "s:= ranlib:= $(tc-getRANLIB):g" \
+ -i make.inc || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
+ )
+
+ econf
+
+ rm EXAMPLE/*itersol1 || die
+}
+
+src_test() {
+ cd TESTING || die
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ FORTRAN="$(tc-getFC)" \
+ LOADER="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ FFLAGS="${FFLAGS}" \
+ LOADOPTS="${LDFLAGS}" \
+ BLASLIB="$($(tc-getPKG_CONFIG) --libs blas)" \
+ SUPERLULIB="${S}/SRC/.libs/libsuperlu$(get_libname)" \
+ LD_LIBRARY_PATH="${S}/SRC/.libs" \
+ DYLD_LIBRARY_PATH="${S}/SRC/.libs"
+}
+
+src_install() {
+ default
+
+ if use doc; then
+ dodoc DOC/ug.pdf
+ dodoc DOC/html/*
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc EXAMPLE FORTRAN
+ fi
+
+ find "${ED}" -name "*.a" -delete || die
+}