zhu3d-4.2.6.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  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}"/${PN}-4.2.4-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" \
  57. ${PN} "Education;Science;Math;Qt"
  58. }