gsim-21.3.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils qt4-r2 toolchain-funcs
  5. DESCRIPTION="Programm for visualisation and processing of experimental and simulated NMR spectra"
  6. HOMEPAGE="https://sourceforge.net/projects/gsim/"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  11. IUSE="emf opengl"
  12. RDEPEND="
  13. dev-cpp/muParser
  14. media-libs/freetype
  15. sci-libs/libcmatrix
  16. sci-libs/minuit
  17. virtual/blas
  18. dev-qt/qtsvg:4
  19. emf? ( media-libs/libemf )
  20. opengl? ( dev-qt/qtopengl:4 )"
  21. DEPEND="${RDEPEND}
  22. virtual/pkgconfig"
  23. PATCHES=( "${FILESDIR}"/${P}-build.conf.patch )
  24. DOCS="release.txt README_GSIM.* quickstart.* changes.log programming.*"
  25. src_prepare() {
  26. edos2unix ${PN}.pro
  27. qt4-r2_src_prepare
  28. cat >> build.conf <<- EOF
  29. INCLUDEPATH += "${EPREFIX}/usr/include/libcmatrixR3/" \
  30. "${EPREFIX}/usr/include/Minuit2" \
  31. "${EPREFIX}/usr/include"
  32. LIBS += -lcmatrix -lMinuit2 -lmuparser $($(tc-getPKG_CONFIG) --libs cblas)
  33. EOF
  34. use opengl && echo "CONFIG+=use_opengl" >> build.conf
  35. if use emf; then
  36. cat >> build.conf <<- EOF
  37. CONFIG+=use_emf
  38. DEFINES+=USE_EMF_OUTPUT
  39. LIBS += -L\"${EPREFIX}/usr/include/libEMF\" -lEMF
  40. EOF
  41. fi
  42. sed \
  43. -e "s:quickstart.pdf:../share/doc/${PF}/quickstart.pdf:g" \
  44. -e "s:README_GSIM.pdf:../share/doc/${PF}/README_GSIM.pdf:g" \
  45. -i mainform.h || die
  46. }
  47. src_install() {
  48. qt4-r2_src_install
  49. dobin ${PN}
  50. insinto /usr/share/${PN}
  51. doins -r images ${PN}.ico
  52. insinto /usr/share/${PN}/ui
  53. doins *.ui
  54. }