Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: x11-libs/gtk+/
Date: Sun, 01 Dec 2013 14:28:15
Message-Id: 1385907709.217feb95f8e3cfae4ff1677f5239b2ed6926492b.eva@gentoo
1 commit: 217feb95f8e3cfae4ff1677f5239b2ed6926492b
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 1 14:07:27 2013 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 1 14:21:49 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=217feb95
7
8 x11-libs/gtk+: 3.8.7 → 3.10.5
9
10 * Clean up unittests modifications, everything appears to run fine now.
11 * Use local gsettings files, otherwise gtkfilechooser tests fails.
12 * Sort dependency like in other ebuilds.
13 * Make sure immodules cache is owned by ebuild and use eclass function
14 to update it.
15
16 ---
17 .../{gtk+-3.7.14.ebuild => gtk+-3.10.5.ebuild} | 170 ++++++++++-----------
18 x11-libs/gtk+/gtk+-9999.ebuild | 161 ++++++++++---------
19 x11-libs/gtk+/metadata.xml | 20 +++
20 3 files changed, 186 insertions(+), 165 deletions(-)
21
22 diff --git a/x11-libs/gtk+/gtk+-3.7.14.ebuild b/x11-libs/gtk+/gtk+-3.10.5.ebuild
23 similarity index 57%
24 rename from x11-libs/gtk+/gtk+-3.7.14.ebuild
25 rename to x11-libs/gtk+/gtk+-3.10.5.ebuild
26 index 0ca6cb2..03a21ed 100644
27 --- a/x11-libs/gtk+/gtk+-3.7.14.ebuild
28 +++ b/x11-libs/gtk+/gtk+-3.10.5.ebuild
29 @@ -1,13 +1,10 @@
30 -# Copyright 1999-2012 Gentoo Foundation
31 +# Copyright 1999-2013 Gentoo Foundation
32 # Distributed under the terms of the GNU General Public License v2
33 # $Header: $
34
35 EAPI="5"
36
37 inherit eutils flag-o-matic gnome.org gnome2-utils multilib virtualx
38 -if [[ ${PV} = 9999 ]]; then
39 - inherit gnome2-live
40 -fi
41
42 DESCRIPTION="Gimp ToolKit +"
43 HOMEPAGE="http://www.gtk.org/"
44 @@ -24,22 +21,34 @@ REQUIRED_USE="
45 || ( aqua wayland X )
46 xinerama? ( X )"
47
48 -if [[ ${PV} = 9999 ]]; then
49 - IUSE="${IUSE} doc"
50 - KEYWORDS=""
51 -else
52 - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
53 -fi
54 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
55
56 # FIXME: introspection data is built against system installation of gtk+:3
57 # NOTE: cairo[svg] dep is due to bug 291283 (not patched to avoid eautoreconf)
58 # Use gtk+:2 for gtk-update-icon-cache
59 -COMMON_DEPEND="X? (
60 +COMMON_DEPEND="
61 + >=dev-libs/atk-2.7.5[introspection?]
62 + >=dev-libs/glib-2.37.5:2
63 + media-libs/fontconfig
64 + >=x11-libs/cairo-1.12[aqua?,glib,svg,X?]
65 + >=x11-libs/gdk-pixbuf-2.27.1:2[introspection?,X?]
66 + >=x11-libs/gtk+-2.24:2
67 + >=x11-libs/pango-1.32.4[introspection?]
68 + x11-misc/shared-mime-info
69 +
70 + colord? ( >=x11-misc/colord-0.1.9 )
71 + cups? ( >=net-print/cups-1.2 )
72 + introspection? ( >=dev-libs/gobject-introspection-1.32 )
73 + wayland? (
74 + >=dev-libs/wayland-1.2
75 + media-libs/mesa[wayland]
76 + >=x11-libs/libxkbcommon-0.2
77 + )
78 + X? (
79 >=app-accessibility/at-spi2-atk-2.5.3
80 x11-libs/libXrender
81 x11-libs/libX11
82 >=x11-libs/libXi-1.3
83 - x11-libs/libXt
84 x11-libs/libXext
85 >=x11-libs/libXrandr-1.3
86 x11-libs/libXcursor
87 @@ -48,26 +57,13 @@ COMMON_DEPEND="X? (
88 x11-libs/libXdamage
89 xinerama? ( x11-libs/libXinerama )
90 )
91 - wayland? (
92 - >=dev-libs/wayland-1.0.0
93 - media-libs/mesa[wayland]
94 - >=x11-libs/libxkbcommon-0.2.0
95 - )
96 - >=dev-libs/glib-2.35.3
97 - >=x11-libs/pango-1.32.4[introspection?]
98 - >=dev-libs/atk-2.7.5[introspection?]
99 - >=x11-libs/cairo-1.10.0[aqua?,glib,svg,X?]
100 - >=x11-libs/gdk-pixbuf-2.27.1:2[introspection?,X?]
101 - >=x11-libs/gtk+-2.24:2
102 - media-libs/fontconfig
103 - x11-misc/shared-mime-info
104 - colord? ( >=x11-misc/colord-0.1.9 )
105 - cups? ( >=net-print/cups-1.2 )
106 - introspection? ( >=dev-libs/gobject-introspection-1.32 )"
107 +"
108 DEPEND="${COMMON_DEPEND}
109 app-text/docbook-xsl-stylesheets
110 app-text/docbook-xml-dtd:4.1.2
111 dev-libs/libxslt
112 + dev-util/gdbus-codegen
113 + >=dev-util/gtk-doc-am-1.11
114 virtual/pkgconfig
115 X? (
116 x11-proto/xextproto
117 @@ -76,12 +72,10 @@ DEPEND="${COMMON_DEPEND}
118 x11-proto/damageproto
119 xinerama? ( x11-proto/xineramaproto )
120 )
121 - >=dev-util/gtk-doc-am-1.11
122 test? (
123 media-fonts/font-misc-misc
124 - media-fonts/font-cursor-misc )"
125 -[[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
126 - doc? ( >=dev-util/gtk-doc-1.11 )"
127 + media-fonts/font-cursor-misc )
128 +"
129 # gtk+-3.2.2 breaks Alt key handling in <=x11-libs/vte-0.30.1:2.90
130 # gtk+-3.3.18 breaks scrolling in <=x11-libs/vte-0.31.0:2.90
131 # >=xorg-server-1.11.4 needed for
132 @@ -90,7 +84,8 @@ RDEPEND="${COMMON_DEPEND}
133 !<gnome-base/gail-1000
134 !<x11-libs/vte-0.31.0:2.90
135 packagekit? ( app-admin/packagekit-base )
136 - X? ( !<x11-base/xorg-server-1.11.4 )"
137 + X? ( !<x11-base/xorg-server-1.11.4 )
138 +"
139 PDEPEND="vim-syntax? ( app-vim/gtk-syntax )"
140
141 strip_builddir() {
142 @@ -103,68 +98,50 @@ strip_builddir() {
143 }
144
145 src_prepare() {
146 + gnome2_environment_reset
147 +
148 # -O3 and company cause random crashes in applications. Bug #133469
149 replace-flags -O3 -O2
150 strip-flags
151
152 - # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=654108
153 - # epatch "${FILESDIR}/${PN}-3.3.18-fallback-theme.patch"
154 -
155 - # Non-working test in gentoo's env
156 - sed 's:\(g_test_add_func ("/ui-tests/keys-events.*\):/*\1*/:g' \
157 - -i gtk/tests/testing.c || die "sed 1 failed"
158 - sed '\%/recent-manager/add%,/recent_manager_purge/ d' \
159 - -i gtk/tests/recentmanager.c || die "sed 2 failed"
160 -
161 - # FIXME: multiple reftests fail when run from portage (but succeed when
162 - # run from a manual compile in a temp directory)
163 - sed -e 's:\(SUBDIRS.*\)reftests:\1:' \
164 - -i tests/Makefile.* || die "sed 3 failed"
165 -
166 - # Test results depend on the list of mounted filesystems!
167 - rm -v tests/a11y/pickers.{ui,txt} || die "rm failed"
168 -
169 - if ! use test; then
170 + if ! use test ; then
171 # don't waste time building tests
172 strip_builddir SRC_SUBDIRS tests Makefile.am
173 - [[ ${PV} != 9999 ]] && strip_builddir SRC_SUBDIRS tests Makefile.in
174 + strip_builddir SRC_SUBDIRS tests Makefile.in
175 fi
176
177 if ! use examples; then
178 # don't waste time building demos
179 strip_builddir SRC_SUBDIRS demos Makefile.am
180 - [[ ${PV} != 9999 ]] && strip_builddir SRC_SUBDIRS demos Makefile.in
181 + strip_builddir SRC_SUBDIRS demos Makefile.in
182 fi
183 -
184 - [[ ${PV} = 9999 ]] && gnome2_src_prepare
185 }
186
187 src_configure() {
188 - local myconf="$(use_enable aqua quartz-backend)
189 - $(use_enable colord)
190 - $(use_enable cups cups auto)
191 - $(use_enable introspection)
192 - $(use_enable packagekit)
193 - $(use_enable wayland wayland-backend)
194 - $(use_enable X x11-backend)
195 - $(use_enable X xcomposite)
196 - $(use_enable X xdamage)
197 - $(use_enable X xfixes)
198 - $(use_enable X xkb)
199 - $(use_enable X xrandr)
200 - $(use_enable xinerama)
201 - --disable-papi
202 - --enable-man
203 - --enable-gtk2-dependency"
204 -
205 - [[ ${PV} = 9999 ]] && myconf="${myconf} $(use_enable doc gtk-doc)"
206 -
207 # Passing --disable-debug is not recommended for production use
208 - use debug && myconf="${myconf} --enable-debug=yes"
209 -
210 # need libdir here to avoid a double slash in a path that libtool doesn't
211 # grok so well during install (// between $EPREFIX and usr ...)
212 - econf --libdir="${EPREFIX}/usr/$(get_libdir)" ${myconf}
213 + econf \
214 + $(use_enable aqua quartz-backend) \
215 + $(use_enable colord) \
216 + $(use_enable cups cups auto) \
217 + $(usex debug --enable-debug=yes "") \
218 + $(use_enable introspection) \
219 + $(use_enable packagekit) \
220 + $(use_enable wayland wayland-backend) \
221 + $(use_enable X x11-backend) \
222 + $(use_enable X xcomposite) \
223 + $(use_enable X xdamage) \
224 + $(use_enable X xfixes) \
225 + $(use_enable X xkb) \
226 + $(use_enable X xrandr) \
227 + $(use_enable xinerama) \
228 + --disable-gtk-doc \
229 + --disable-papi \
230 + --enable-man \
231 + --enable-gtk2-dependency \
232 + --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \
233 + --libdir="${EPREFIX}/usr/$(get_libdir)"
234 }
235
236 src_test() {
237 @@ -177,11 +154,12 @@ src_test() {
238 ewarn "required version of gnome-themes-standard."
239 return 0
240 fi
241 +
242 + # FIXME: this should be handled at eclass level
243 + "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
244 +
245 unset DBUS_SESSION_BUS_ADDRESS
246 - # Exporting HOME fixes tests using XDG directories spec since all defaults
247 - # are based on $HOME. It is also backward compatible with functions not
248 - # yet ported to this spec.
249 - XDG_DATA_HOME="${T}" HOME="${T}" Xemake check || die "tests failed"
250 + GSETTINGS_SCHEMA_DIR="${S}/gtk" Xemake check
251 }
252
253 src_install() {
254 @@ -192,25 +170,33 @@ src_install() {
255
256 dodoc AUTHORS ChangeLog* HACKING NEWS* README*
257
258 - # Remove unneeded *.la files
259 - prune_libtool_files --all
260 + prune_libtool_files --modules
261
262 # add -framework Carbon to the .pc files
263 - use aqua && for i in gtk+-3.0.pc gtk+-quartz-3.0.pc gtk+-unix-print-3.0.pc; do
264 - sed -i -e "s:Libs\: :Libs\: -framework Carbon :" "${ED}"usr/$(get_libdir)/pkgconfig/$i || die "sed failed"
265 - done
266 + if use aqua ; then
267 + for i in gtk+-3.0.pc gtk+-quartz-3.0.pc gtk+-unix-print-3.0.pc; do
268 + sed -e "s:Libs\: :Libs\: -framework Carbon :" \
269 + -i "${ED}"usr/$(get_libdir)/pkgconfig/$i || die "sed failed"
270 + done
271 + fi
272 }
273
274 pkg_preinst() {
275 gnome2_schemas_savelist
276 +
277 + # Make sure loaders.cache belongs to gdk-pixbuf alone
278 + local cache="usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
279 +
280 + if [[ -e ${EROOT}${cache} ]]; then
281 + cp "${EROOT}"${cache} "${ED}"/${cache} || die
282 + else
283 + touch "${ED}"/${cache} || die
284 + fi
285 }
286
287 pkg_postinst() {
288 gnome2_schemas_update
289 -
290 - local GTK3_MODDIR="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0"
291 - gtk-query-immodules-3.0 > "${GTK3_MODDIR}/immodules.cache" \
292 - || ewarn "Failed to run gtk-query-immodules-3.0"
293 + gnome2_query_immodules_gtk3
294
295 if ! has_version "app-text/evince"; then
296 elog "Please install app-text/evince for print preview functionality."
297 @@ -221,4 +207,8 @@ pkg_postinst() {
298
299 pkg_postrm() {
300 gnome2_schemas_update
301 +
302 + if [[ -z ${REPLACED_BY_VERSIONS} ]]; then
303 + rm -f "${EROOT}"usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache
304 + fi
305 }
306
307 diff --git a/x11-libs/gtk+/gtk+-9999.ebuild b/x11-libs/gtk+/gtk+-9999.ebuild
308 index 0ca6cb2..3797f40 100644
309 --- a/x11-libs/gtk+/gtk+-9999.ebuild
310 +++ b/x11-libs/gtk+/gtk+-9999.ebuild
311 @@ -1,4 +1,4 @@
312 -# Copyright 1999-2012 Gentoo Foundation
313 +# Copyright 1999-2013 Gentoo Foundation
314 # Distributed under the terms of the GNU General Public License v2
315 # $Header: $
316
317 @@ -28,18 +28,35 @@ if [[ ${PV} = 9999 ]]; then
318 IUSE="${IUSE} doc"
319 KEYWORDS=""
320 else
321 - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
322 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
323 fi
324
325 # FIXME: introspection data is built against system installation of gtk+:3
326 # NOTE: cairo[svg] dep is due to bug 291283 (not patched to avoid eautoreconf)
327 # Use gtk+:2 for gtk-update-icon-cache
328 -COMMON_DEPEND="X? (
329 +COMMON_DEPEND="
330 + >=dev-libs/atk-2.7.5[introspection?]
331 + >=dev-libs/glib-2.37.5:2
332 + media-libs/fontconfig
333 + >=x11-libs/cairo-1.12[aqua?,glib,svg,X?]
334 + >=x11-libs/gdk-pixbuf-2.27.1:2[introspection?,X?]
335 + >=x11-libs/gtk+-2.24:2
336 + >=x11-libs/pango-1.32.4[introspection?]
337 + x11-misc/shared-mime-info
338 +
339 + colord? ( >=x11-misc/colord-0.1.9 )
340 + cups? ( >=net-print/cups-1.2 )
341 + introspection? ( >=dev-libs/gobject-introspection-1.32 )
342 + wayland? (
343 + >=dev-libs/wayland-1.2
344 + media-libs/mesa[wayland]
345 + >=x11-libs/libxkbcommon-0.2
346 + )
347 + X? (
348 >=app-accessibility/at-spi2-atk-2.5.3
349 x11-libs/libXrender
350 x11-libs/libX11
351 >=x11-libs/libXi-1.3
352 - x11-libs/libXt
353 x11-libs/libXext
354 >=x11-libs/libXrandr-1.3
355 x11-libs/libXcursor
356 @@ -48,26 +65,13 @@ COMMON_DEPEND="X? (
357 x11-libs/libXdamage
358 xinerama? ( x11-libs/libXinerama )
359 )
360 - wayland? (
361 - >=dev-libs/wayland-1.0.0
362 - media-libs/mesa[wayland]
363 - >=x11-libs/libxkbcommon-0.2.0
364 - )
365 - >=dev-libs/glib-2.35.3
366 - >=x11-libs/pango-1.32.4[introspection?]
367 - >=dev-libs/atk-2.7.5[introspection?]
368 - >=x11-libs/cairo-1.10.0[aqua?,glib,svg,X?]
369 - >=x11-libs/gdk-pixbuf-2.27.1:2[introspection?,X?]
370 - >=x11-libs/gtk+-2.24:2
371 - media-libs/fontconfig
372 - x11-misc/shared-mime-info
373 - colord? ( >=x11-misc/colord-0.1.9 )
374 - cups? ( >=net-print/cups-1.2 )
375 - introspection? ( >=dev-libs/gobject-introspection-1.32 )"
376 +"
377 DEPEND="${COMMON_DEPEND}
378 app-text/docbook-xsl-stylesheets
379 app-text/docbook-xml-dtd:4.1.2
380 dev-libs/libxslt
381 + dev-util/gdbus-codegen
382 + >=dev-util/gtk-doc-am-1.11
383 virtual/pkgconfig
384 X? (
385 x11-proto/xextproto
386 @@ -76,12 +80,16 @@ DEPEND="${COMMON_DEPEND}
387 x11-proto/damageproto
388 xinerama? ( x11-proto/xineramaproto )
389 )
390 - >=dev-util/gtk-doc-am-1.11
391 test? (
392 media-fonts/font-misc-misc
393 - media-fonts/font-cursor-misc )"
394 -[[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
395 - doc? ( >=dev-util/gtk-doc-1.11 )"
396 + media-fonts/font-cursor-misc )
397 +"
398 +
399 +if [[ ${PV} = 9999 ]]; then
400 + DEPEND="${DEPEND}
401 + doc? ( >=dev-util/gtk-doc-1.11 )"
402 +fi
403 +
404 # gtk+-3.2.2 breaks Alt key handling in <=x11-libs/vte-0.30.1:2.90
405 # gtk+-3.3.18 breaks scrolling in <=x11-libs/vte-0.31.0:2.90
406 # >=xorg-server-1.11.4 needed for
407 @@ -90,7 +98,8 @@ RDEPEND="${COMMON_DEPEND}
408 !<gnome-base/gail-1000
409 !<x11-libs/vte-0.31.0:2.90
410 packagekit? ( app-admin/packagekit-base )
411 - X? ( !<x11-base/xorg-server-1.11.4 )"
412 + X? ( !<x11-base/xorg-server-1.11.4 )
413 +"
414 PDEPEND="vim-syntax? ( app-vim/gtk-syntax )"
415
416 strip_builddir() {
417 @@ -103,28 +112,13 @@ strip_builddir() {
418 }
419
420 src_prepare() {
421 + gnome2_environment_reset
422 +
423 # -O3 and company cause random crashes in applications. Bug #133469
424 replace-flags -O3 -O2
425 strip-flags
426
427 - # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=654108
428 - # epatch "${FILESDIR}/${PN}-3.3.18-fallback-theme.patch"
429 -
430 - # Non-working test in gentoo's env
431 - sed 's:\(g_test_add_func ("/ui-tests/keys-events.*\):/*\1*/:g' \
432 - -i gtk/tests/testing.c || die "sed 1 failed"
433 - sed '\%/recent-manager/add%,/recent_manager_purge/ d' \
434 - -i gtk/tests/recentmanager.c || die "sed 2 failed"
435 -
436 - # FIXME: multiple reftests fail when run from portage (but succeed when
437 - # run from a manual compile in a temp directory)
438 - sed -e 's:\(SUBDIRS.*\)reftests:\1:' \
439 - -i tests/Makefile.* || die "sed 3 failed"
440 -
441 - # Test results depend on the list of mounted filesystems!
442 - rm -v tests/a11y/pickers.{ui,txt} || die "rm failed"
443 -
444 - if ! use test; then
445 + if ! use test ; then
446 # don't waste time building tests
447 strip_builddir SRC_SUBDIRS tests Makefile.am
448 [[ ${PV} != 9999 ]] && strip_builddir SRC_SUBDIRS tests Makefile.in
449 @@ -140,31 +134,35 @@ src_prepare() {
450 }
451
452 src_configure() {
453 - local myconf="$(use_enable aqua quartz-backend)
454 - $(use_enable colord)
455 - $(use_enable cups cups auto)
456 - $(use_enable introspection)
457 - $(use_enable packagekit)
458 - $(use_enable wayland wayland-backend)
459 - $(use_enable X x11-backend)
460 - $(use_enable X xcomposite)
461 - $(use_enable X xdamage)
462 - $(use_enable X xfixes)
463 - $(use_enable X xkb)
464 - $(use_enable X xrandr)
465 - $(use_enable xinerama)
466 - --disable-papi
467 - --enable-man
468 - --enable-gtk2-dependency"
469 + local myconf=""
470
471 [[ ${PV} = 9999 ]] && myconf="${myconf} $(use_enable doc gtk-doc)"
472
473 # Passing --disable-debug is not recommended for production use
474 - use debug && myconf="${myconf} --enable-debug=yes"
475 -
476 # need libdir here to avoid a double slash in a path that libtool doesn't
477 # grok so well during install (// between $EPREFIX and usr ...)
478 - econf --libdir="${EPREFIX}/usr/$(get_libdir)" ${myconf}
479 + econf \
480 + $(use_enable aqua quartz-backend) \
481 + $(use_enable colord) \
482 + $(use_enable cups cups auto) \
483 + $(usex debug --enable-debug=yes "") \
484 + $(use_enable introspection) \
485 + $(use_enable packagekit) \
486 + $(use_enable wayland wayland-backend) \
487 + $(use_enable X x11-backend) \
488 + $(use_enable X xcomposite) \
489 + $(use_enable X xdamage) \
490 + $(use_enable X xfixes) \
491 + $(use_enable X xkb) \
492 + $(use_enable X xrandr) \
493 + $(use_enable xinerama) \
494 + --disable-gtk-doc \
495 + --disable-papi \
496 + --enable-man \
497 + --enable-gtk2-dependency \
498 + --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \
499 + --libdir="${EPREFIX}/usr/$(get_libdir)" \
500 + ${myconf}
501 }
502
503 src_test() {
504 @@ -177,11 +175,12 @@ src_test() {
505 ewarn "required version of gnome-themes-standard."
506 return 0
507 fi
508 +
509 + # FIXME: this should be handled at eclass level
510 + "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
511 +
512 unset DBUS_SESSION_BUS_ADDRESS
513 - # Exporting HOME fixes tests using XDG directories spec since all defaults
514 - # are based on $HOME. It is also backward compatible with functions not
515 - # yet ported to this spec.
516 - XDG_DATA_HOME="${T}" HOME="${T}" Xemake check || die "tests failed"
517 + GSETTINGS_SCHEMA_DIR="${S}/gtk" Xemake check
518 }
519
520 src_install() {
521 @@ -192,25 +191,33 @@ src_install() {
522
523 dodoc AUTHORS ChangeLog* HACKING NEWS* README*
524
525 - # Remove unneeded *.la files
526 - prune_libtool_files --all
527 + prune_libtool_files --modules
528
529 # add -framework Carbon to the .pc files
530 - use aqua && for i in gtk+-3.0.pc gtk+-quartz-3.0.pc gtk+-unix-print-3.0.pc; do
531 - sed -i -e "s:Libs\: :Libs\: -framework Carbon :" "${ED}"usr/$(get_libdir)/pkgconfig/$i || die "sed failed"
532 - done
533 + if use aqua ; then
534 + for i in gtk+-3.0.pc gtk+-quartz-3.0.pc gtk+-unix-print-3.0.pc; do
535 + sed -e "s:Libs\: :Libs\: -framework Carbon :" \
536 + -i "${ED}"usr/$(get_libdir)/pkgconfig/$i || die "sed failed"
537 + done
538 + fi
539 }
540
541 pkg_preinst() {
542 gnome2_schemas_savelist
543 +
544 + # Make sure loaders.cache belongs to gdk-pixbuf alone
545 + local cache="usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
546 +
547 + if [[ -e ${EROOT}${cache} ]]; then
548 + cp "${EROOT}"${cache} "${ED}"/${cache} || die
549 + else
550 + touch "${ED}"/${cache} || die
551 + fi
552 }
553
554 pkg_postinst() {
555 gnome2_schemas_update
556 -
557 - local GTK3_MODDIR="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0"
558 - gtk-query-immodules-3.0 > "${GTK3_MODDIR}/immodules.cache" \
559 - || ewarn "Failed to run gtk-query-immodules-3.0"
560 + gnome2_query_immodules_gtk3
561
562 if ! has_version "app-text/evince"; then
563 elog "Please install app-text/evince for print preview functionality."
564 @@ -221,4 +228,8 @@ pkg_postinst() {
565
566 pkg_postrm() {
567 gnome2_schemas_update
568 +
569 + if [[ -z ${REPLACED_BY_VERSIONS} ]]; then
570 + rm -f "${EROOT}"usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache
571 + fi
572 }
573
574 diff --git a/x11-libs/gtk+/metadata.xml b/x11-libs/gtk+/metadata.xml
575 new file mode 100644
576 index 0000000..dde3aef
577 --- /dev/null
578 +++ b/x11-libs/gtk+/metadata.xml
579 @@ -0,0 +1,20 @@
580 +<?xml version="1.0" encoding="UTF-8"?>
581 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
582 +<pkgmetadata>
583 + <herd>gnome</herd>
584 + <longdescription>
585 + GTK+ is a multi-platform toolkit for creating graphical user
586 + interfaces. Offering a complete set of widgets, GTK+ is suitable
587 + for projects ranging from small one-off projects to complete
588 + application suites.
589 + </longdescription>
590 + <use>
591 + <flag name="colord">Use <pkg>x11-misc/colord</pkg> for color management
592 + in printing</flag>
593 + <flag name="packagekit">Enable support for the distro-neutral package
594 + manager GUI <pkg>app-admin/packagekit</pkg> in application chooser</flag>
595 + </use>
596 + <upstream>
597 + <remote-id type="cpe">cpe:/a:gtk:gtk%2B</remote-id>
598 + </upstream>
599 +</pkgmetadata>