1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 AUTOTOOLS_AUTORECONF=yes
8 inherit autotools-utils fortran-2 multilib toolchain-funcs
10 DESCRIPTION="Portable Understructure for Numerical Computing"
11 HOMEPAGE="http://fetk.org/codes/punc/index.html"
12 SRC_URI="http://www.fetk.org/codes/download/${P}.tar.gz"
16 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
17 IUSE="debug doc mpi static-libs"
39 "${FILESDIR}"/${PV}-linking.patch
40 "${FILESDIR}"/1.4-doc.patch
44 sed 's:punc/slu_ddefs.h:superlu/slu_ddefs.h:g' src/superlu/punc/vsuperlu.h > vsuperlu.h || die
45 sed 's:punc/umfpack.h:umfpack.h:g' src/umfpack/punc/vumfpack.h > vumfpack.h || die
46 rm -rf src/{amd,blas,lapack,arpack,superlu,umfpack}
48 cp tools/tests/pmg/*.f src/pmg/ -f || die
49 cp tools/tests/pmg/*.c src/pmg/ -f || die
50 cp src/pmg/vpmg.h src/vf2c/punc/vpmg.h || die
52 autotools-utils_src_prepare
60 use doc || myeconfargs+=( --with-doxygen= --with-dot= )
62 fetk_include="${EPREFIX}"/usr/include
63 fetk_lib="${EPREFIX}"/usr/$(get_libdir)
64 export FETK_INCLUDE="${fetk_include}"
65 export FETK_LIBRARY="${fetk_lib}"
66 export FETK_LAPACK_LIBRARY="$($(tc-getPKG_CONFIG) --libs lapack)"
67 export FETK_BLAS_LIBRARY="${fetk_lib}"
68 export FETK_SUPERLU_LIBRARY="$($(tc-getPKG_CONFIG) --libs superlu)"
69 export FETK_ARPACK_LIBRARY="${fetk_lib}"
70 export FETK_UMFPACK_LIBRARY="${fetk_lib}"
71 export FETK_CGCODE_LIBRARY="${fetk_lib}"
72 export FETK_AMD_LIBRARY="${fetk_lib}"
75 $(use_enable debug vdebug)
77 --docdir="${EPREFIX}"/usr/share/doc/${PF}
80 autotools-utils_src_configure
84 autotools-utils_src_install
86 insinto /usr/include/punc