avogadro-1.1.0.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 eutils python-single-r1
  6. DESCRIPTION="Advanced molecular editor that uses Qt4 and OpenGL"
  7. HOMEPAGE="http://avogadro.openmolecules.net/"
  8. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~x86"
  12. IUSE="+glsl python cpu_flags_x86_sse2 test"
  13. RDEPEND="
  14. >=sci-chemistry/openbabel-2.3.0
  15. >=dev-qt/qtgui-4.5.3:4
  16. >=dev-qt/qtopengl-4.5.3:4
  17. x11-libs/gl2ps
  18. glsl? ( >=media-libs/glew-1.5.0 )
  19. python? (
  20. >=dev-libs/boost-1.35.0-r5[${PYTHON_USEDEP}]
  21. dev-python/numpy[${PYTHON_USEDEP}]
  22. dev-python/sip[${PYTHON_USEDEP}]
  23. )"
  24. DEPEND="${RDEPEND}
  25. dev-cpp/eigen:2"
  26. # https://sourceforge.net/p/avogadro/bugs/653/
  27. RESTRICT="test"
  28. PATCHES=(
  29. "${FILESDIR}"/${P}-textrel.patch
  30. "${FILESDIR}"/${P}-xlibs.patch
  31. "${FILESDIR}"/${PN}-1.1.1-openbabel.patch
  32. )
  33. pkg_setup() {
  34. use python && python-single-r1_pkg_setup
  35. }
  36. src_configure() {
  37. local mycmakeargs=(
  38. -DENABLE_THREADGL=OFF
  39. -DENABLE_RPATH=OFF
  40. -DENABLE_UPDATE_CHECKER=OFF
  41. -DQT_MKSPECS_DIR="${EPREFIX}/usr/share/qt4/mkspecs"
  42. -DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
  43. $(cmake-utils_use_enable glsl)
  44. $(cmake-utils_use_enable test TESTS)
  45. $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
  46. $(cmake-utils_use_enable python)
  47. )
  48. cmake-utils_src_configure
  49. }