punc-1.5.ebuild 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. AUTOTOOLS_AUTORECONF=yes
  5. inherit autotools-utils fortran-2 multilib toolchain-funcs
  6. DESCRIPTION="Portable Understructure for Numerical Computing"
  7. HOMEPAGE="http://fetk.org/codes/punc/index.html"
  8. SRC_URI="http://www.fetk.org/codes/download/${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  12. IUSE="debug doc mpi static-libs"
  13. RDEPEND="
  14. dev-libs/maloc[mpi=]
  15. dev-libs/libf2c
  16. sci-libs/amd
  17. sci-libs/cgcode
  18. sci-libs/arpack[mpi=]
  19. sci-libs/superlu
  20. sci-libs/umfpack
  21. virtual/blas
  22. virtual/lapack
  23. mpi? ( virtual/mpi )"
  24. DEPEND="${RDEPEND}
  25. virtual/pkgconfig
  26. doc? (
  27. media-gfx/graphviz
  28. app-doc/doxygen )"
  29. S="${WORKDIR}/${PN}"
  30. PATCHES=(
  31. "${FILESDIR}"/${PV}-linking.patch
  32. "${FILESDIR}"/1.4-doc.patch
  33. )
  34. src_prepare() {
  35. sed 's:punc/slu_ddefs.h:superlu/slu_ddefs.h:g' src/superlu/punc/vsuperlu.h > vsuperlu.h || die
  36. sed 's:punc/umfpack.h:umfpack.h:g' src/umfpack/punc/vumfpack.h > vumfpack.h || die
  37. rm -rf src/{amd,blas,lapack,arpack,superlu,umfpack}
  38. cp tools/tests/pmg/*.f src/pmg/ -f || die
  39. cp tools/tests/pmg/*.c src/pmg/ -f || die
  40. cp src/pmg/vpmg.h src/vf2c/punc/vpmg.h || die
  41. autotools-utils_src_prepare
  42. }
  43. src_configure() {
  44. local fetk_include
  45. local fetk_lib
  46. local myeconfargs
  47. use doc || myeconfargs+=( --with-doxygen= --with-dot= )
  48. fetk_include="${EPREFIX}"/usr/include
  49. fetk_lib="${EPREFIX}"/usr/$(get_libdir)
  50. export FETK_INCLUDE="${fetk_include}"
  51. export FETK_LIBRARY="${fetk_lib}"
  52. export FETK_LAPACK_LIBRARY="$($(tc-getPKG_CONFIG) --libs lapack)"
  53. export FETK_BLAS_LIBRARY="${fetk_lib}"
  54. export FETK_SUPERLU_LIBRARY="$($(tc-getPKG_CONFIG) --libs superlu)"
  55. export FETK_ARPACK_LIBRARY="${fetk_lib}"
  56. export FETK_UMFPACK_LIBRARY="${fetk_lib}"
  57. export FETK_CGCODE_LIBRARY="${fetk_lib}"
  58. export FETK_AMD_LIBRARY="${fetk_lib}"
  59. myeconfargs+=(
  60. $(use_enable debug vdebug)
  61. --enable-vf2cforce
  62. --docdir="${EPREFIX}"/usr/share/doc/${PF}
  63. --disable-triplet
  64. )
  65. autotools-utils_src_configure
  66. }
  67. src_install() {
  68. autotools-utils_src_install
  69. insinto /usr/include/punc
  70. doins v*.h
  71. dohtml doc/index.html
  72. }