arpack-3.1.5.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. #AUTOTOOLS_AUTORECONF=true
  5. inherit autotools-utils eutils flag-o-matic fortran-2 toolchain-funcs
  6. MY_P="${PN}-ng_${PV}"
  7. DESCRIPTION="Arnoldi package library to solve large scale eigenvalue problems"
  8. HOMEPAGE="http://www.caam.rice.edu/software/ARPACK/ http://forge.scilab.org/index.php/p/arpack-ng/"
  9. SRC_URI="
  10. http://forge.scilab.org/upload/arpack-ng/files/${MY_P}.tar.gz
  11. doc? (
  12. http://www.caam.rice.edu/software/ARPACK/SRC/ug.ps.gz
  13. http://www.caam.rice.edu/software/ARPACK/DOCS/tutorial.ps.gz )"
  14. LICENSE="BSD"
  15. SLOT="0"
  16. KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
  17. IUSE="doc examples mpi static-libs"
  18. RDEPEND="
  19. virtual/blas
  20. virtual/lapack
  21. mpi? ( virtual/mpi[fortran] )"
  22. DEPEND="${RDEPEND}
  23. virtual/pkgconfig"
  24. S="${WORKDIR}/${MY_P/_/-}"
  25. src_configure() {
  26. tc-export PKG_CONFIG
  27. local myeconfargs=(
  28. --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
  29. --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
  30. $(use_enable mpi)
  31. )
  32. autotools-utils_src_configure
  33. }
  34. src_test() {
  35. cp "${S}"/TESTS/testA.mtx "${BUILD_DIR}"/TESTS || die
  36. autotools-utils_src_test
  37. }
  38. src_install() {
  39. autotools-utils_src_install
  40. dodoc DOCUMENTS/*.doc
  41. newdoc DOCUMENTS/README README.doc
  42. use doc && dodoc "${WORKDIR}"/*.ps
  43. if use examples; then
  44. insinto /usr/share/doc/${PF}
  45. doins -r EXAMPLES
  46. if use mpi; then
  47. insinto /usr/share/doc/${PF}/EXAMPLES/PARPACK
  48. doins -r PARPACK/EXAMPLES/MPI
  49. fi
  50. fi
  51. }