arpack-3.4.0.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools eutils fortran-2 toolchain-funcs
  5. MY_P="${PN}-ng_${PV}"
  6. DESCRIPTION="Arnoldi package library to solve large scale eigenvalue problems"
  7. HOMEPAGE="http://www.caam.rice.edu/software/ARPACK/ http://forge.scilab.org/index.php/p/arpack-ng/"
  8. SRC_URI="
  9. https://github.com/opencollab/${PN}-ng/archive/${PV}.tar.gz -> ${P}.tar.gz
  10. doc? (
  11. http://www.caam.rice.edu/software/ARPACK/SRC/ug.ps.gz
  12. http://www.caam.rice.edu/software/ARPACK/DOCS/tutorial.ps.gz )"
  13. LICENSE="BSD"
  14. SLOT="0"
  15. KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
  16. IUSE="doc examples mpi static-libs"
  17. RDEPEND="
  18. virtual/blas
  19. virtual/lapack
  20. mpi? ( virtual/mpi[fortran] )"
  21. DEPEND="${RDEPEND}
  22. virtual/pkgconfig"
  23. S="${WORKDIR}/${PN}-ng-${PV}"
  24. src_prepare() {
  25. default
  26. eautoreconf
  27. }
  28. src_configure() {
  29. econf \
  30. --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
  31. --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" \
  32. $(use_enable mpi)
  33. }
  34. src_test() {
  35. cp "${S}"/TESTS/testA.mtx "${BUILD_DIR}"/TESTS || die
  36. default
  37. }
  38. src_install() {
  39. default
  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. }