itpp-4.3.1-r1.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit cmake-utils multilib
  5. DESCRIPTION="C++ library of mathematical, signal processing and communication"
  6. HOMEPAGE="http://itpp.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
  8. SLOT="0"
  9. LICENSE="GPL-3"
  10. KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux"
  11. IUSE="doc"
  12. RDEPEND="
  13. virtual/blas
  14. virtual/lapack
  15. >=sci-libs/fftw-3"
  16. DEPEND="${RDEPEND}
  17. virtual/pkgconfig
  18. doc? ( app-doc/doxygen virtual/latex-base )"
  19. DOCS=(ChangeLog NEWS AUTHORS README)
  20. src_prepare() {
  21. # gentoo redefines the CMAKE_BUILD_TYPE
  22. sed -i \
  23. -e 's/CMAKE_BUILD_TYPE STREQUAL Release/NOT CMAKE_BUILD_TYPE STREQUAL Debug/' \
  24. CMakeLists.txt || die
  25. # respect gentoo doc dir
  26. sed -i \
  27. -e "s:share/doc/itpp:share/doc/${PF}:" \
  28. itpp/CMakeLists.txt || die
  29. # respect gentoo libdir
  30. sed -i "s#/lib#/$(get_libdir)#" itpp-config.cmake.in
  31. sed -i "s#/lib#/$(get_libdir)#" itpp.pc.cmake.in
  32. sed -i \
  33. -e "s#LIBRARY DESTINATION lib#LIBRARY DESTINATION $(get_libdir)#" \
  34. -e "s#ARCHIVE DESTINATION lib#ARCHIVE DESTINATION $(get_libdir)#" \
  35. itpp/CMakeLists.txt || die
  36. }
  37. src_configure() {
  38. local mycmakeargs=(
  39. -DBLA_VENDOR=Generic
  40. $(cmake-utils_use doc HTML_DOCS)
  41. )
  42. cmake-utils_src_configure
  43. }