/[gentoo-x86]/gnome-extra/gnome-games/gnome-games-3.0.2.ebuild
Gentoo

Contents of /gnome-extra/gnome-games/gnome-games-3.0.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Aug 23 15:40:15 2011 UTC (3 years, 3 months ago) by nirbheek
Branch: MAIN
Changes since 1.1: +2 -2 lines
Don't depend on glib[introspection]

(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-games/gnome-games-3.0.2.ebuild,v 1.1 2011/08/19 12:51:19 nirbheek Exp $
4
5 EAPI="3"
6 GCONF_DEBUG="no"
7 GNOME2_LA_PUNT="yes"
8 WANT_AUTOMAKE="1.11"
9 PYTHON_DEPEND="2"
10
11 # make sure games is inherited first so that the gnome2
12 # functions will be called if they are not overridden
13 inherit autotools games games-ggz eutils gnome2 python virtualx
14
15 DESCRIPTION="Collection of games for the GNOME desktop"
16 HOMEPAGE="http://live.gnome.org/GnomeGames/"
17
18 LICENSE="GPL-2 GPL-3 FDL-1.1"
19 SLOT="0"
20 # TODO: file KEYWORDREQ bug once it's determined that seed is usable
21 KEYWORDS="~amd64 ~x86"
22 IUSE="artworkextra +aisleriot +clutter +introspection glchess seed +sudoku test"
23
24 COMMON_DEPEND="
25 >=dev-games/libggz-0.0.14
26 >=dev-games/ggz-client-libs-0.0.14
27 >=dev-libs/dbus-glib-0.75
28 >=dev-libs/glib-2.25.7
29 >=dev-libs/libxml2-2.4.0
30 >=gnome-base/gconf-2.31.1
31 >=gnome-base/librsvg-2.32
32 >=x11-libs/cairo-1
33 >=x11-libs/gtk+-2.91.7:3[introspection?]
34
35 media-libs/libcanberra[gtk3]
36 x11-libs/libSM
37
38 aisleriot? ( >=dev-scheme/guile-1.6.5[deprecated,regex] )
39 artworkextra? ( >=gnome-extra/gnome-games-extra-data-3.0.0 )
40 clutter? (
41 >=dev-libs/gobject-introspection-0.6.3
42 >=x11-libs/gtk+-2.90:3[introspection]
43 >=gnome-base/gconf-2.31.1[introspection]
44 >=media-libs/clutter-gtk-0.91.6:1.0[introspection]
45 seed? ( dev-libs/seed ) )
46 introspection? (
47 >=dev-libs/gobject-introspection-0.6.3
48 media-libs/clutter:1.0[introspection] )
49 glchess? (
50 dev-db/sqlite:3
51 >=dev-lang/vala-0.11.6:0.12
52 >=gnome-base/librsvg-2.32
53 virtual/opengl
54 x11-libs/libX11 )"
55 RDEPEND="${COMMON_DEPEND}
56 sudoku? (
57 dev-libs/glib:2
58 dev-python/pygobject:2[introspection]
59 dev-python/pycairo
60 x11-libs/gdk-pixbuf:2[introspection]
61 x11-libs/pango[introspection] )
62 >=x11-libs/gtk+-3.0.0:3[introspection]
63
64 !<gnome-extra/gnome-games-extra-data-3.0.0"
65 DEPEND="${COMMON_DEPEND}
66 sys-apps/lsb-release
67 >=dev-util/pkgconfig-0.15
68 >=dev-util/intltool-0.40.4
69 >=sys-devel/gettext-0.10.40
70 >=gnome-base/gnome-common-2.12.0
71 >=app-text/scrollkeeper-0.3.8
72 >=app-text/gnome-doc-utils-0.10
73 test? ( >=dev-libs/check-0.9.4 )"
74
75 # Others are installed below; multiples in this package.
76 DOCS="AUTHORS HACKING MAINTAINERS TODO"
77
78 # dang make-check fails on docs with -j > 1. Restrict them for the moment until
79 # it can be chased down.
80 RESTRICT="test"
81
82 _omitgame() {
83 G2CONF="${G2CONF},${1}"
84 }
85
86 pkg_setup() {
87 # create the games user / group
88 games_pkg_setup
89
90 G2CONF="${G2CONF}
91 --disable-maintainer-mode
92 --disable-schemas-compile
93 --enable-sound
94 $(use_enable introspection)"
95
96 # Should be after $(use_enable introspection), but before --enable-omitgames
97 use clutter && G2CONF="${G2CONF} --enable-introspection"
98
99 # Staging games are needed for sudoku, glchess, swell-foop, and lightsoff
100 G2CONF="${G2CONF}
101 --enable-staging
102 --with-scores-group=${GAMES_GROUP}
103 --with-platform=gnome
104 --with-card-theme-formats=default
105 --with-smclient
106 --with-gtk=3.0
107 --enable-omitgames=none" # This line should be last for _omitgame
108
109 # FIXME: Use REQUIRED_USE once python.eclass is ported to EAPI 4
110 if ! use clutter; then
111 ewarn "USE='-clutter' => quadrapassel, swell-foop, lightsoff, gnibbles won't be installed"
112 _omitgame quadrapassel
113 _omitgame gnibbles
114 _omitgame swell-foop
115 _omitgame lightsoff
116 use seed && ewarn "USE='seed' has no effect with USE='-clutter'"
117 elif ! use seed; then
118 ewarn "USE='-seed' => swell-foop, lightsoff won't be installed"
119 _omitgame swell-foop
120 _omitgame lightsoff
121 fi
122
123 if ! use aisleriot; then
124 _omitgame aisleriot
125 fi
126
127 if ! use glchess; then
128 _omitgame glchess
129 fi
130
131 if ! use sudoku; then
132 _omitgame gnome-sudoku
133 fi
134 }
135
136 src_prepare() {
137 gnome2_src_prepare
138
139 use sudoku && python_convert_shebangs 2 gnome-sudoku/src/gnome-sudoku.in.in
140
141 # TODO: File upstream bug for this
142 epatch "${FILESDIR}/${PN}-2.91.90-fix-conditional-ac-prog-cxx.patch"
143
144 # Without this, --enable-staging enables all those games unconditionally
145 epatch "${FILESDIR}/${PN}-fix-staging-games.patch"
146
147 eautoreconf
148
149 # disable pyc compiling
150 mv py-compile py-compile.orig
151 ln -s $(type -P true) py-compile
152 }
153
154 src_test() {
155 Xemake check || die "tests failed"
156 }
157
158 src_install() {
159 gnome2_src_install
160
161 # Documentation install for each of the games
162 for game in \
163 $(find . -maxdepth 1 -type d ! -name po ! -name libgames-support); do
164 docinto ${game}
165 for doc in AUTHORS ChangeLog NEWS README TODO; do
166 [ -s ${game}/${doc} ] && dodoc ${game}/${doc}
167 done
168 done
169 }
170
171 pkg_preinst() {
172 gnome2_pkg_preinst
173 # Avoid overwriting previous .scores files
174 local basefile
175 for scorefile in "${ED}"/var/lib/games/*.scores; do
176 basefile=$(basename $scorefile)
177 if [ -s "${EROOT}/var/lib/games/${basefile}" ]; then
178 cp "${EROOT}/var/lib/games/${basefile}" \
179 "${ED}/var/lib/games/${basefile}"
180 fi
181 done
182 }
183
184 pkg_postinst() {
185 games_pkg_postinst
186 games-ggz_update_modules
187 gnome2_pkg_postinst
188 python_need_rebuild
189 use sudoku && python_mod_optimize gnome_sudoku
190 }
191
192 pkg_postrm() {
193 games-ggz_update_modules
194 gnome2_pkg_postrm
195 python_mod_cleanup gnome_sudoku
196 }

  ViewVC Help
Powered by ViewVC 1.1.20