getdata-0.8.5.ebuild 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. AUTOTOOLS_AUTORECONF=true
  6. FORTRAN_STANDARD="95"
  7. FORTRAN_NEEDED=fortran
  8. inherit autotools-utils fortran-2 python-single-r1
  9. DESCRIPTION="Reference implementation of the Dirfile, format for time-ordered binary data"
  10. HOMEPAGE="http://getdata.sourceforge.net/"
  11. SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
  12. SLOT="0"
  13. LICENSE="LGPL-2.1"
  14. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  15. IUSE="bzip2 debug fortran lzma python perl static-libs"
  16. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  17. DEPEND="${PYTHON_DEPS}
  18. bzip2? ( app-arch/bzip2 )
  19. lzma? ( app-arch/xz-utils )
  20. perl? ( dev-lang/perl )"
  21. RDEPEND="${DEPEND}"
  22. PATCHES=(
  23. "${FILESDIR}"/${P}-serial-test.patch
  24. "${FILESDIR}"/${P}-out-of-source.patch
  25. )
  26. src_configure() {
  27. local myeconfargs=()
  28. use perl && myeconfargs+=( --with-perl-dir=vendor )
  29. myeconfargs+=(
  30. --disable-idl
  31. --without-libslim
  32. --with-libz
  33. --docdir="${EPREFIX}/usr/share/doc/${P}"
  34. $(use_enable debug)
  35. $(use_enable fortran)
  36. $(use_enable fortran fortran95)
  37. $(use_enable python)
  38. $(use_enable perl)
  39. $(use_with bzip2 libbz2)
  40. $(use_with lzma liblzma)
  41. )
  42. autotools-utils_src_configure
  43. }
  44. src_compile() {
  45. autotools-utils_src_compile
  46. if use python; then
  47. python_copy_sources
  48. building() {
  49. cd "${BUILD_DIR}"/bindings/python || die
  50. sed "s:-lpython...:$(python_get_LIBS):g" -i Makefile || die
  51. emake \
  52. PYTHON_VERSION="${EPYTHON#python}" \
  53. NUMPY_CPPFLAGS="-I${EPREFIX}$(python_get_sitedir)/numpy/core/include" \
  54. PYTHON_CPPFLAGS="-I${EPREFIX}$(python_get_includedir)" \
  55. pyexecdir="${EPREFIX}$(python_get_sitedir)" \
  56. pythondir="${EPREFIX}$(python_get_sitedir)"
  57. }
  58. python_foreach_impl building
  59. fi
  60. }
  61. src_install() {
  62. autotools-utils_src_install
  63. if use python; then
  64. installation() {
  65. cd "${BUILD_DIR}"/bindings/python || die
  66. emake \
  67. DESTDIR="${D}" \
  68. PYTHON_VERSION="${EPYTHON#python}" \
  69. NUMPY_CPPFLAGS="-I${EPREFIX}$(python_get_sitedir)/numpy/core/include" \
  70. PYTHON_CPPFLAGS="-I${EPREFIX}$(python_get_includedir)" \
  71. pyexecdir="${EPREFIX}$(python_get_sitedir)" \
  72. pythondir="${EPREFIX}$(python_get_sitedir)" \
  73. install
  74. find \
  75. "${ED}/$(python_get_sitedir)" \
  76. -type f \( -name "*.a" -o -name "*.la" \) -delete || die
  77. }
  78. python_foreach_impl installation
  79. fi
  80. }