games-kids/gcompris: remove deprecated games eclass
[gentoo.git] / games-kids / gcompris / gcompris-15.10-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6 PYTHON_COMPAT=( python2_7 )
7 PYTHON_REQ_USE="sqlite,threads"
8
9 inherit autotools eutils python-single-r1
10
11 DESCRIPTION="full featured educational application for children from 2 to 10"
12 HOMEPAGE="http://gcompris.net/"
13 SRC_URI="http://gcompris.net/download/${P}.tar.bz2"
14
15 LICENSE="GPL-3+"
16 SLOT="0"
17 KEYWORDS="~amd64 ~ppc ~x86"
18 IUSE="gstreamer"
19 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
20
21 RDEPEND="x11-libs/gtk+:2
22         gnome-base/librsvg[gtk(+)]
23         gstreamer? (
24                 media-libs/gstreamer:0.10
25                 media-libs/gst-plugins-good:0.10
26                 media-plugins/gst-plugins-alsa:0.10
27                 media-plugins/gst-plugins-ogg:0.10
28                 media-plugins/gst-plugins-vorbis:0.10 )
29         !gstreamer? (
30                 media-libs/sdl-mixer
31                 media-libs/libsdl:0 )
32         dev-db/sqlite:3
33         dev-libs/libxml2
34         dev-libs/popt
35         dev-python/pygtk[${PYTHON_USEDEP}]
36         virtual/libintl"
37 DEPEND="${RDEPEND}
38         app-text/texi2html
39         dev-perl/XML-Parser
40         gnome-base/gnome-common
41         sys-apps/texinfo
42         sys-devel/gettext
43         virtual/pkgconfig"
44 RDEPEND="${RDEPEND}
45         media-gfx/tuxpaint
46         sci-electronics/gnucap"
47
48 PATCHES=(
49         "${FILESDIR}"/${P}-build.patch
50 )
51
52 pkg_setup() {
53         python-single-r1_pkg_setup
54 }
55
56 src_prepare() {
57         default
58
59         # Drop DEPRECATED flags, bug #387817
60         sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' \
61                 src/gcompris/Makefile.am || die
62
63         cp /usr/share/gettext/config.rpath .
64         eautoreconf
65
66         sed -i \
67                 -e 's#^itlocaledir =.*$#itlocaledir = @localedir@#' \
68                 po/Makefile.in.in || die
69
70         # Fix desktop files
71         sed -i \
72                 -e '/Encoding/d' \
73                 gcompris.desktop.in \
74                 gcompris-edit.desktop.in || die
75 }
76
77 src_configure() {
78         GNUCHESS="/usr/bin/gcompris-gnuchess" \
79         econf \
80                 --datarootdir="/usr/share" \
81                 --datadir="/usr/share" \
82                 --localedir=/usr/share/locale \
83                 --infodir=/usr/share/info \
84                 --with-python="${PYTHON}" \
85                 $(use_enable !gstreamer sdlmixer) \
86                 --enable-sqlite \
87                 --enable-py-build-only
88 }
89
90 src_install() {
91         default
92         prune_libtool_files --modules
93 }