You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
1.5 KiB
84 lines
1.5 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
9 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
9 years ago
|
|
||
4 years ago
|
inherit autotools fortran-2 toolchain-funcs
|
||
9 years ago
|
|
||
|
MY_PN=SuperLU
|
||
|
|
||
|
DESCRIPTION="Sparse LU factorization library"
|
||
5 years ago
|
HOMEPAGE="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
|
||
5 years ago
|
SRC_URI="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/${PN}_${PV}.tar.gz"
|
||
4 years ago
|
S="${WORKDIR}/${MY_PN}_${PV}"
|
||
9 years ago
|
|
||
|
LICENSE="BSD"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~alpha amd64 ~arm ~hppa ppc ppc64 x86 ~amd64-linux ~x86-linux"
|
||
4 years ago
|
IUSE="doc examples test"
|
||
5 years ago
|
RESTRICT="!test? ( test )"
|
||
9 years ago
|
|
||
4 years ago
|
RDEPEND="virtual/blas"
|
||
|
DEPEND="${RDEPEND}"
|
||
|
BDEPEND="
|
||
9 years ago
|
virtual/pkgconfig
|
||
4 years ago
|
test? ( app-shells/tcsh )
|
||
|
"
|
||
9 years ago
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-autotools.patch
|
||
|
"${FILESDIR}"/${P}-format-security.patch
|
||
4 years ago
|
)
|
||
9 years ago
|
|
||
|
src_prepare() {
|
||
|
unset VERBOSE
|
||
|
sed \
|
||
|
-e "s:= ar:= $(tc-getAR):g" \
|
||
|
-e "s:= ranlib:= $(tc-getRANLIB):g" \
|
||
|
-i make.inc || die
|
||
|
|
||
4 years ago
|
default
|
||
|
eautoreconf
|
||
9 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
4 years ago
|
local myeconfargs=(
|
||
|
--with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
|
||
|
)
|
||
|
|
||
|
econf
|
||
|
|
||
9 years ago
|
rm EXAMPLE/*itersol1 || die
|
||
|
}
|
||
|
|
||
|
src_test() {
|
||
4 years ago
|
cd TESTING || die
|
||
9 years ago
|
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() {
|
||
4 years ago
|
default
|
||
|
|
||
|
if use doc; then
|
||
|
dodoc DOC/ug.pdf
|
||
|
dodoc DOC/html/*
|
||
|
fi
|
||
|
|
||
9 years ago
|
if use examples; then
|
||
4 years ago
|
docinto examples
|
||
|
dodoc EXAMPLE FORTRAN
|
||
9 years ago
|
fi
|
||
4 years ago
|
|
||
|
find "${ED}" -name "*.a" -delete || die
|
||
9 years ago
|
}
|