lightspeed-1.2a-r1.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit autotools eutils
  5. DEB_PATCH="${PN}_${PV}-7"
  6. DESCRIPTION="OpenGL interactive relativistic simulator"
  7. HOMEPAGE="http://lightspeed.sourceforge.net/"
  8. SRC_URI="
  9. mirror://sourceforge/${PN}/${P}.tar.gz
  10. mirror://sourceforge/${PN}/objects-1.tar.gz
  11. mirror://debian/pool/main/${PN:0:1}/${PN}/${DEB_PATCH}.diff.gz"
  12. LICENSE="LGPL-2.1"
  13. SLOT="0"
  14. KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
  15. IUSE="nls truetype"
  16. LANGS="es"
  17. for i in ${LANGS}; do
  18. IUSE="${IUSE} linguas_${i}"
  19. done
  20. RDEPEND="
  21. media-libs/libpng
  22. media-libs/tiff
  23. virtual/opengl
  24. x11-libs/gtkglext
  25. x11-libs/gtkglarea:2
  26. x11-libs/gtk+:2
  27. x11-libs/libXmu
  28. truetype? ( media-libs/ftgl )"
  29. DEPEND="${RDEPEND}
  30. virtual/pkgconfig"
  31. S2="${WORKDIR}/objects"
  32. src_prepare() {
  33. epatch "${WORKDIR}/${DEB_PATCH}.diff"
  34. epatch \
  35. "${FILESDIR}"/${P}-autoconf.patch \
  36. "${FILESDIR}"/${P}-libpng15.patch
  37. eautoreconf
  38. }
  39. src_configure() {
  40. econf \
  41. --with-gtk=2 \
  42. $(use_enable nls) \
  43. $(use_with truetype ftgl)
  44. }
  45. src_compile() {
  46. emake
  47. local i
  48. for i in ${LANGS}; do
  49. use linguas_${i} && emake ${i}.gmo
  50. done
  51. }
  52. src_install() {
  53. default
  54. newicon src/icon.xpm lightspeed.xpm
  55. make_desktop_entry ${PN} "Light Speed! Relativistic Simulator"
  56. newdoc debian/changelog ChangeLog.Debian
  57. cd ${S2}
  58. newdoc README objects-README
  59. insinto /usr/share/${PN}
  60. doins *.3ds *.lwo
  61. }
  62. pkg_postinst() {
  63. elog
  64. elog "Some 3d models have been placed in /usr/share/${PN}"
  65. elog "You can load them in Light Speed! from the File menu."
  66. elog
  67. }