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