1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 AUTOTOOLS_AUTORECONF=true
7 AUTOTOOLS_IN_SOURCE_BUILD=1
9 inherit autotools-utils fortran-2 toolchain-funcs multilib
13 DESCRIPTION="Sparse LU factorization library"
14 HOMEPAGE="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
15 SRC_URI="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/${PN}_${PV}.tar.gz"
19 KEYWORDS="~alpha amd64 ~arm ~hppa ppc ppc64 x86 ~amd64-linux ~x86-linux"
20 IUSE="doc examples static-libs test"
21 RESTRICT="!test? ( test )"
27 test? ( app-shells/tcsh )"
29 S="${WORKDIR}/${MY_PN}_${PV}"
32 "${FILESDIR}"/${P}-autotools.patch
33 "${FILESDIR}"/${P}-format-security.patch
39 -e "s:= ar:= $(tc-getAR):g" \
40 -e "s:= ranlib:= $(tc-getRANLIB):g" \
43 autotools-utils_src_prepare
47 local myeconfargs=( --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" )
48 autotools-utils_src_configure
49 rm EXAMPLE/*itersol1 || die
53 cd "${BUILD_DIR}"/TESTING
56 FORTRAN="$(tc-getFC)" \
57 LOADER="$(tc-getCC)" \
60 LOADOPTS="${LDFLAGS}" \
61 BLASLIB="$($(tc-getPKG_CONFIG) --libs blas)" \
62 SUPERLULIB="${S}/SRC/.libs/libsuperlu$(get_libname)" \
63 LD_LIBRARY_PATH="${S}/SRC/.libs" \
64 DYLD_LIBRARY_PATH="${S}/SRC/.libs"
68 autotools-utils_src_install
69 use doc && dodoc DOC/ug.pdf && dohtml DOC/html/*
71 insinto /usr/share/doc/${PF}/examples
72 doins -r EXAMPLE FORTRAN