xdmf2-1.0_p141226-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. inherit cmake-utils multilib python-single-r1
  6. DESCRIPTION="eXtensible Data Model and Format"
  7. HOMEPAGE="http://xdmf.org/index.php/Main_Page"
  8. SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
  9. SLOT="0"
  10. LICENSE="VTK"
  11. KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
  12. IUSE="doc python test"
  13. RDEPEND="
  14. sci-libs/hdf5:=
  15. dev-libs/libxml2:2
  16. python? ( ${PYTHON_DEPS} )
  17. "
  18. DEPEND="${RDEPEND}
  19. doc? ( app-doc/doxygen )
  20. python? ( dev-lang/swig:0 )
  21. "
  22. PATCHES=( "${FILESDIR}"/${P}-module.patch )
  23. pkg_setup() {
  24. use python && python-single-r1_pkg_setup && python_export
  25. }
  26. src_prepare() {
  27. if use python; then
  28. local _site=$(python_get_sitedir)
  29. sed \
  30. -e "/DESTINATION/s:python:${_site##${EPREFIX}/usr/$(get_libdir)/}:g" \
  31. -i CMakeLists.txt || die
  32. fi
  33. sed \
  34. -e "/DESTINATION/s:lib:$(get_libdir):g" \
  35. -e "/INSTALL/s:lib:$(get_libdir):g" \
  36. -i CMakeLists.txt core/CMakeLists.txt || die
  37. cmake-utils_src_prepare
  38. }
  39. src_configure() {
  40. local mycmakeargs=(
  41. $(cmake-utils_use doc XDMF_BUILD_DOCUMENTATION)
  42. $(cmake-utils_use_build test TESTING)
  43. $(cmake-utils_use python XDMF_WRAP_PYTHON)
  44. # $(cmake-utils_use java XDMF_WRAP_JAVA)
  45. )
  46. cmake-utils_src_configure
  47. }
  48. src_install() {
  49. cmake-utils_src_install
  50. dosym XdmfConfig.cmake /usr/share/cmake/Modules/${PN}Config.cmake
  51. }