molsketch-0.3.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. CMAKE_MAKEFILE_GENERATOR=ninja
  5. inherit cmake-utils multilib qmake-utils
  6. MY_P=${P/m/M}-src
  7. DESCRIPTION="A drawing tool for 2D molecular structures"
  8. HOMEPAGE="http://molsketch.sourceforge.net/"
  9. SRC_URI="mirror://sourceforge/project/${PN}/Molsketch/Lithium%20${PV}/${MY_P}.tar.gz"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  13. IUSE="test"
  14. DEPEND="
  15. >=sci-chemistry/openbabel-2.2
  16. dev-qt/qtcore:5
  17. dev-qt/qtgui:5
  18. dev-qt/qtprintsupport:5
  19. dev-qt/qtsvg:5
  20. dev-qt/qtwidgets:5
  21. "
  22. RDEPEND="${DEPEND}"
  23. S=${WORKDIR}/${MY_P%%-src}
  24. PATCHES=(
  25. "${FILESDIR}"/${P}-_DEFAULT_SOURCE.patch
  26. "${FILESDIR}"/${P}-desktop.patch
  27. "${FILESDIR}"/${P}-no-quotes.patch
  28. )
  29. src_prepare() {
  30. sed -e "/LIBRARY DESTINATION/ s/lib/$(get_libdir)/g" \
  31. -i {obabeliface,libmolsketch/src}/CMakeLists.txt || die #351246
  32. sed -e "s:doc/molsketch:doc/${PF}:g" \
  33. -i molsketch/src/{CMakeLists.txt,mainwindow.cpp} || die
  34. cmake-utils_src_prepare
  35. }
  36. src_configure() {
  37. local mycmakeargs=(
  38. -DOPENBABEL2_INCLUDE_DIR="${EPREFIX}/usr/include/openbabel-2.0"
  39. -DCMAKE_DISABLE_FIND_PACKAGE_KDE4=ON
  40. -DENABLE_TESTS=$(usex test "ON" "OFF")
  41. )
  42. cmake-utils_src_configure
  43. }
  44. src_install() {
  45. cmake-utils_src_install
  46. dosym ${PN}-qt5 /usr/bin/${PN}
  47. }