chemkit-0.1-r1.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 virtualx
  6. DESCRIPTION="Library for chemistry applications"
  7. HOMEPAGE="http://www.chemkit.org/"
  8. SRC_URI="mirror://sourceforge/project/${PN}/${P}.tar.gz"
  9. SLOT="0"
  10. LICENSE="BSD PSF-2.2"
  11. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  12. IUSE="applications examples python test"
  13. REQUIRED_USE="${PYTHON_REQUIRED_USE}
  14. test? ( applications python )"
  15. RDEPEND="
  16. dev-libs/boost
  17. dev-libs/rapidxml
  18. dev-cpp/eigen:3
  19. dev-qt/qtcore:4
  20. dev-qt/qtgui:4
  21. dev-qt/qtopengl:4
  22. media-libs/glu
  23. sci-libs/inchi
  24. sci-libs/lemon
  25. virtual/opengl
  26. examples? (
  27. x11-libs/libX11
  28. x11-libs/libXext
  29. )
  30. python? ( ${PYTHON_DEPS} )
  31. "
  32. DEPEND="${RDEPEND}"
  33. S="${WORKDIR}"/${PN}
  34. PATCHES=(
  35. "${FILESDIR}"/${P}-multilib.patch
  36. "${FILESDIR}"/${P}-unbundle.patch
  37. )
  38. src_prepare() {
  39. # jsoncpp API change
  40. # xdrf != xdrfile
  41. rm -rvf src/3rdparty/{inchi,khronos,lemon,rapidxml} || die
  42. cmake-utils_src_prepare
  43. }
  44. src_configure() {
  45. local mycmakeargs=(
  46. -DCHEMKIT_BUILD_PLUGIN_BABEL=on
  47. -DUSE_SYSTEM_INCHI=ON
  48. -DUSE_SYSTEM_JSONCPP=OFF
  49. -DUSE_SYSTEM_RAPIDXML=ON
  50. -DUSE_SYSTEM_XDRF=OFF
  51. $(cmake-utils_use applications CHEMKIT_BUILD_APPS)
  52. $(cmake-utils_use applications CHEMKIT_BUILD_QT_DESIGNER_PLUGINS)
  53. $(cmake-utils_use examples CHEMKIT_BUILD_EXAMPLES)
  54. $(cmake-utils_use examples CHEMKIT_BUILD_DEMOS)
  55. $(cmake-utils_use python CHEMKIT_BUILD_BINDINGS_PYTHON)
  56. $(cmake-utils_use test CHEMKIT_BUILD_TESTS)
  57. )
  58. cmake-utils_src_configure
  59. }
  60. src_test() {
  61. VIRTUALX_COMMAND="cmake-utils_src_test"
  62. virtualmake
  63. }
  64. src_install() {
  65. use examples && dobin demos/*-viewer/*-viewer examples/uff-energy/uff-energy
  66. cmake-utils_src_install
  67. }