zhu3d-4.2.4.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. LANGS="cs de es fr zh"
  5. inherit eutils qt4-r2
  6. DESCRIPTION="Interactive 3D mathematical function viewer"
  7. HOMEPAGE="https://sourceforge.net/projects/zhu3d"
  8. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  12. IUSE=""
  13. DEPEND="
  14. virtual/glu
  15. virtual/opengl
  16. dev-qt/qtcore:4
  17. dev-qt/qtgui:4
  18. dev-qt/qtopengl:4"
  19. RDEPEND="${DEPEND}"
  20. PATCHES=( "${FILESDIR}/${P}-gold.patch" )
  21. src_prepare() {
  22. qt4-r2_src_prepare
  23. local datadir=/usr/share/${PN}
  24. sed \
  25. -e "s:^SYSDIR=:SYSDIR=${datadir}/system:" \
  26. -e "s:^TEXDIR=:TEXDIR=${datadir}/textures:" \
  27. -e "s:^WORKDIR=:WORKDIR=${datadir}/work:" \
  28. -e "s:^DOCDIR=:DOCDIR=/usr/share/doc/${PF}/html:" \
  29. -i ${PN}.pri || die "sed zhu3d.pri failed"
  30. sed \
  31. -e "/# Optimisation/,/# Include/d" \
  32. -i zhu3d.pro || die "optimisation sed failed"
  33. }
  34. src_install() {
  35. # not working: emake install INSTALL_ROOT="${D}" || die
  36. dobin zhu3d
  37. dodoc {readme,src/changelog}.txt
  38. dohtml doc/*.png doc/${PN}_en.html
  39. local lang
  40. for lang in ${LANGS} ; do
  41. if use linguas_${lang} ; then
  42. insinto /usr/share/${PN}/system/languages
  43. doins system/languages/${PN}_${lang}.qm
  44. if [ -e doc/${PN}_${lang}.html ] ; then
  45. dohtml doc/${PN}_${lang}.html
  46. fi
  47. fi
  48. done
  49. insinto /usr/share/${PN}
  50. doins -r work/textures
  51. insinto /usr/share/${PN}/work
  52. doins -r work/*.zhu work/slideshow
  53. insinto /usr/share/${PN}/system
  54. doins -r system/*.zhu system/icons
  55. doicon system/icons/${PN}.png
  56. make_desktop_entry ${PN} "Zhu3D Function Viewer" ${PN} "Education;Science;Math;Qt"
  57. }