tuxmath-2.0.1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils gnome2-utils games
  5. MY_PN="${PN}_w_fonts"
  6. DESCRIPTION="Educational arcade game where you have to solve maths problems"
  7. HOMEPAGE="http://tux4kids.alioth.debian.org/tuxmath/"
  8. SRC_URI="mirror://sourceforge/tuxmath/${MY_PN}-${PV}.tar.gz"
  9. LICENSE="GPL-2 OFL-1.1"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE="nls svg"
  13. RDEPEND="dev-games/t4k-common[svg?]
  14. dev-libs/libxml2:2
  15. media-libs/libsdl:0
  16. media-libs/sdl-pango
  17. media-libs/sdl-image[jpeg,png]
  18. media-libs/sdl-mixer[mod]
  19. media-libs/sdl-net
  20. nls? ( virtual/libintl )
  21. svg? (
  22. gnome-base/librsvg:2
  23. x11-libs/cairo
  24. )"
  25. DEPEND="${RDEPEND}
  26. virtual/pkgconfig
  27. nls? ( sys-devel/gettext )"
  28. S=${WORKDIR}/${MY_PN}-${PV}
  29. src_prepare() {
  30. sed -i \
  31. -e '/\bdoc\b/d' \
  32. Makefile.in || die
  33. sed -i \
  34. -e '/strncat/s/)/ - 1)/' \
  35. src/server.c || die
  36. }
  37. src_configure() {
  38. egamesconf \
  39. --disable-dependency-tracking \
  40. --localedir=/usr/share/locale \
  41. $(use_enable nls) \
  42. $(usex svg "" "--without-rsvg")
  43. }
  44. src_install() {
  45. emake DESTDIR="${D}" install || die "install failed"
  46. doicon -s scalable data/images/icons/${PN}.svg
  47. make_desktop_entry ${PN} "TuxMath"
  48. dodoc doc/{README,TODO,changelog}
  49. prepgamesdirs
  50. }
  51. pkg_preinst() {
  52. games_pkg_preinst
  53. gnome2_icon_savelist
  54. }
  55. pkg_postinst() {
  56. games_pkg_postinst
  57. gnome2_icon_cache_update
  58. }
  59. pkg_postrm() {
  60. gnome2_icon_cache_update
  61. }