tuxmath-2.0.3.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2016 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://debian/pool/main/t/${PN}/${PN}_${PV}.orig.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[video]
  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 -e '/\bdoc\b/d' Makefile.in || die
  31. }
  32. src_configure() {
  33. egamesconf \
  34. --localedir=/usr/share/locale \
  35. $(use_enable nls) \
  36. $(usex svg "" "--without-rsvg")
  37. }
  38. src_install() {
  39. default
  40. doicon -s scalable data/images/icons/${PN}.svg
  41. make_desktop_entry ${PN} "TuxMath"
  42. dodoc doc/{README,TODO,changelog}
  43. prepgamesdirs
  44. }
  45. pkg_preinst() {
  46. games_pkg_preinst
  47. gnome2_icon_savelist
  48. }
  49. pkg_postinst() {
  50. games_pkg_postinst
  51. gnome2_icon_cache_update
  52. }
  53. pkg_postrm() {
  54. gnome2_icon_cache_update
  55. }