Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-libs/glib/files/, dev-libs/glib/
Date: Mon, 19 Nov 2018 13:47:17
Message-Id: 1542635217.fd250250914cb74a246d985614e9b737601148b3.grobian@gentoo
1 commit: fd250250914cb74a246d985614e9b737601148b3
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 19 13:46:57 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 19 13:46:57 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=fd250250
7
8 dev-libs/glib: sync
9
10 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
11 Package-Manager: Portage-2.3.40.3-prefix, Repoman-2.3.9
12
13 dev-libs/glib/Manifest | 1 +
14 .../files/glib-2.54.3-external-gdbus-codegen.patch | 86 ++++++
15 dev-libs/glib/glib-2.56.2.ebuild | 337 +++++++++++++++++++++
16 3 files changed, 424 insertions(+)
17
18 diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
19 index 96bc816c50..1a2a1b7d65 100644
20 --- a/dev-libs/glib/Manifest
21 +++ b/dev-libs/glib/Manifest
22 @@ -1,4 +1,5 @@
23 DIST 07d4a86e74b9b12a562b57ce5fa3a275bf0fe774.zip 13852 SHA256 decff3d1b7f259154940153cc65994fdc9d6a6ffe32e0e99334fe2163844ac4f SHA512 971a0519b53e066adcce27176bc134f6ccd6660d85113d5be10fa7cd421ef1e089a1780459de63234de618abd68df62d308f409a7097fe6a9e91e20510af40b9 WHIRLPOOL 0d2908fdd3c355479886387fd2619ae16470e971948a1af4a4a499a3d00dcbaeaf3b0dbe6115f06eca74bb99a40ce5e670bc8c14a1deb15450fd4a06aa642320
24 DIST glib-2.50.2.tar.xz 7582312 BLAKE2B 1faa4bec57b0dc9538a5d86b6530b5b60c37d01c6b1e3d3667c1e0204bb78fa5890699456425f302f33b48792af0fe448c17760614895d10b27358a5c187a518 SHA512 63d7b5ece8d7d15b10e06ef10a8e0a4446f30a8d9c97daa3352ec00dfef622728bd42ed24cbf67e553166a0f9e29a3e3d024d1d085b9804fd67608db438b6771
25 DIST glib-2.52.3.tar.xz 7679972 BLAKE2B 8d9f6b714571bd04ab9717fbf9ded8556664e43dcdb7dd59436b8b7f1a8a5cdf98e9ce60ca1ead941af1d57688044fefb6c749fa735084622a3482b058864ff6 SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017
26 +DIST glib-2.56.2.tar.xz 8041756 BLAKE2B 1af5bb37378856e959602bcb9299266bba46b990839c923f6b9881624aed306af0779005281b3e3a46b5994c54812edc86aade9cb782c596fd63b6fd91baba51 SHA512 8201ea82d3613d2e879284abe01520b766da30957c5a1a22f3e6019b0cce6bf95d25beae78867b6a133401c4165153c0c92974dd459ab12f9e0e9dd0c95df5d4
27 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320
28
29 diff --git a/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch
30 new file mode 100644
31 index 0000000000..a27966e039
32 --- /dev/null
33 +++ b/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch
34 @@ -0,0 +1,86 @@
35 +From 2e47d49bc91d83cd0abea4c1944bfca4336040fa Mon Sep 17 00:00:00 2001
36 +From: Sobhan Mohammadpour <sobhan@g.o>
37 +Date: Fri, 23 Feb 2018 15:27:33 +0330
38 +Subject: [PATCH] glib-2.54.3-external-gdbus-codegen-for-autotools
39 +
40 +---
41 + configure.ac | 1 -
42 + docs/reference/gio/Makefile.am | 1 -
43 + gio/Makefile.am | 2 +-
44 + gio/tests/Makefile.am | 6 ++----
45 + gio/tests/gdbus-object-manager-example/Makefile.am | 6 ++----
46 + 5 files changed, 5 insertions(+), 11 deletions(-)
47 +
48 +diff --git a/configure.ac b/configure.ac
49 +index 0457c90..07166c9 100644
50 +--- a/configure.ac
51 ++++ b/configure.ac
52 +@@ -3469,7 +3469,6 @@ gobject/glib-mkenums
53 + gobject/tests/Makefile
54 + gthread/Makefile
55 + gio/Makefile
56 +-gio/gdbus-2.0/codegen/Makefile
57 + gio/gdbus-2.0/codegen/config.py
58 + gio/gnetworking.h
59 + gio/xdgmime/Makefile
60 +diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
61 +index 5741a3e..d38e768 100644
62 +--- a/docs/reference/gio/Makefile.am
63 ++++ b/docs/reference/gio/Makefile.am
64 +@@ -177,7 +177,6 @@ man_MANS += \
65 + gsettings.1 \
66 + gresource.1 \
67 + gdbus.1 \
68 +- gdbus-codegen.1 \
69 + gio.1 \
70 + $(NULL)
71 +
72 +diff --git a/gio/Makefile.am b/gio/Makefile.am
73 +index b2db995..53d7162 100644
74 +--- a/gio/Makefile.am
75 ++++ b/gio/Makefile.am
76 +@@ -1,6 +1,6 @@
77 + include $(top_srcdir)/glib.mk
78 +
79 +-SUBDIRS = gdbus-2.0/codegen
80 ++SUBDIRS =
81 +
82 + if OS_UNIX
83 + if !OS_COCOA
84 +diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
85 +index acc1da4..7c51eab 100644
86 +--- a/gio/tests/Makefile.am
87 ++++ b/gio/tests/Makefile.am
88 +@@ -460,10 +460,8 @@ gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotifica
89 +
90 + BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
91 + gdbus-test-codegen.o: gdbus-test-codegen-generated.h
92 +-gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
93 +- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
94 +- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
95 +- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
96 ++gdbus-test-codegen-generated.h: test-codegen.xml Makefile
97 ++ $(AM_V_GEN) gdbus-codegen \
98 + --interface-prefix org.project. \
99 + --generate-c-code gdbus-test-codegen-generated \
100 + --c-generate-object-manager \
101 +diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
102 +index 1d0464c..f390dca 100644
103 +--- a/gio/tests/gdbus-object-manager-example/Makefile.am
104 ++++ b/gio/tests/gdbus-object-manager-example/Makefile.am
105 +@@ -11,10 +11,8 @@ GDBUS_GENERATED = \
106 + gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml \
107 + $(NULL)
108 +
109 +-$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
110 +- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
111 +- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
112 +- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
113 ++$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile
114 ++ $(AM_V_GEN) gdbus-codegen \
115 + --interface-prefix org.gtk.GDBus.Example.ObjectManager. \
116 + --c-namespace Example \
117 + --c-generate-object-manager \
118 +--
119 +2.16.1
120 +
121
122 diff --git a/dev-libs/glib/glib-2.56.2.ebuild b/dev-libs/glib/glib-2.56.2.ebuild
123 new file mode 100644
124 index 0000000000..d9775a178c
125 --- /dev/null
126 +++ b/dev-libs/glib/glib-2.56.2.ebuild
127 @@ -0,0 +1,337 @@
128 +# Copyright 1999-2018 Gentoo Foundation
129 +# Distributed under the terms of the GNU General Public License v2
130 +
131 +EAPI=6
132 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
133 +GNOME2_EAUTORECONF=yes
134 +
135 +inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
136 + multilib multilib-minimal pax-utils python-any-r1 toolchain-funcs virtualx
137 +
138 +# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
139 +# adding new dependencies end up making stage3 to grow. Every addition needs
140 +# then to be think very closely.
141 +
142 +DESCRIPTION="The GLib library of C routines"
143 +HOMEPAGE="https://www.gtk.org/"
144 +SRC_URI="${SRC_URI}
145 + https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
146 +#needs update CYGWINPORTS_GITREV="07d4a86e74b9b12a562b57ce5fa3a275bf0fe774"
147 +
148 +[[ -n ${CYGWINPORTS_GITREV} ]] &&
149 +SRC_URI+=" elibc_Cygwin? ( https://github.com/cygwinports/glib2.0/archive/${CYGWINPORTS_GITREV}.zip )"
150 +
151 +LICENSE="LGPL-2.1+"
152 +SLOT="2"
153 +IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
154 +
155 +KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
156 +
157 +# Added util-linux multilib dependency to have libmount support (which
158 +# is always turned on on linux systems, unless explicitly disabled, but
159 +# this ebuild does not do that anyway) (bug #599586)
160 +
161 +RDEPEND="
162 + !<dev-util/gdbus-codegen-${PV}
163 + >=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP},static-libs?]
164 + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
165 + >=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
166 + >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
167 + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
168 + kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
169 + selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
170 + xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
171 + fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
172 + utils? (
173 + >=dev-util/gdbus-codegen-${PV}
174 + virtual/libelf:0=
175 + )
176 +"
177 +DEPEND="${RDEPEND}
178 + app-text/docbook-xml-dtd:4.1.2
179 + >=dev-libs/libxslt-1.0
180 + >=sys-devel/gettext-0.11
181 + >=dev-util/gtk-doc-am-1.20
182 + systemtap? ( >=dev-util/systemtap-1.3 )
183 + ${PYTHON_DEPS}
184 + test? (
185 + sys-devel/gdb
186 + >=dev-util/gdbus-codegen-${PV}
187 + >=sys-apps/dbus-1.2.14 )
188 + !<dev-util/gtk-doc-1.15-r2
189 +"
190 +# Migration of glib-genmarshal, glib-mkenums and gtester-report to a separate
191 +# python depending package, which can be buildtime depended in packages that
192 +# need these tools, without pulling in python at runtime.
193 +RDEPEND="${RDEPEND}
194 + >=dev-util/glib-utils-${PV}"
195 +PDEPEND="
196 + dbus? ( gnome-base/dconf )
197 + mime? ( x11-misc/shared-mime-info )
198 +"
199 +# shared-mime-info needed for gio/xdgmime, bug #409481
200 +# dconf is needed to be able to save settings, bug #498436
201 +
202 +MULTILIB_CHOST_TOOLS=(
203 + /usr/bin/gio-querymodules$(get_exeext)
204 +)
205 +
206 +pkg_setup() {
207 + if use kernel_linux ; then
208 + CONFIG_CHECK="~INOTIFY_USER"
209 + if use test ; then
210 + CONFIG_CHECK="~IPV6"
211 + WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
212 + fi
213 + linux-info_pkg_setup
214 + fi
215 + python-any-r1_pkg_setup
216 +}
217 +
218 +src_prepare() {
219 + # Prevent build failure in stage3 where pkgconfig is not available, bug #481056
220 + mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
221 +
222 + if use test; then
223 + # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
224 + if ! has_version dev-util/desktop-file-utils ; then
225 + ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
226 + ewarn "think on installing it to get these tests run."
227 + sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
228 + sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
229 + fi
230 +
231 + # gdesktopappinfo requires existing terminal (gnome-terminal or any
232 + # other), falling back to xterm if one doesn't exist
233 + if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
234 + ewarn "Some tests will be skipped due to missing terminal program"
235 + sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
236 + fi
237 +
238 + # https://bugzilla.gnome.org/show_bug.cgi?id=722604
239 + sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
240 + sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
241 +
242 + ewarn "Tests for search-utils have been skipped"
243 + sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
244 + else
245 + # Don't build tests, also prevents extra deps, bug #512022
246 + sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
247 + fi
248 +
249 + # gdbus-codegen is a separate package
250 + eapply "${FILESDIR}"/${PN}-2.54.3-external-gdbus-codegen.patch
251 +
252 + if [[ -n ${CYGWINPORTS_GITREV} ]] && use elibc_Cygwin; then
253 + local p d="${WORKDIR}/glib2.0-${CYGWINPORTS_GITREV}"
254 + for p in $(
255 + eval "$(sed -ne '/PATCH_URI="/,/"/p' < "${d}"/glib2.0.cygport)"
256 + echo ${PATCH_URI}
257 + ); do
258 + # Cygwin hasn't updated to 2.50.2 yet, which has patches merged.
259 + [[ ${p} == 2.46-glocalfilemonitor.patch ]] && continue
260 + epatch "${d}/${p}"
261 + done
262 + fi
263 +
264 + # make default sane for us
265 + if use prefix ; then
266 + sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c || die
267 + # bug #308609, without path, bug #314057
268 + export PERL=perl
269 + fi
270 +
271 + if [[ ${CHOST} == *-solaris* ]] ; then
272 + # fix standards conflicts
273 + sed -i \
274 + -e 's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/\1_DISABLED/' \
275 + -e '/\<_XOPEN_SOURCE\>/s/ 2,/600,/' \
276 + configure.ac || die
277 + sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
278 + glib/giounix.c || die
279 + fi
280 +
281 + gnome2_src_prepare
282 + epunt_cxx
283 +}
284 +
285 +multilib_src_configure() {
286 + # Avoid circular depend with dev-util/pkgconfig and
287 + # native builds (cross-compiles won't need pkg-config
288 + # in the target ROOT to work here)
289 + if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
290 + if has_version sys-apps/dbus; then
291 + export DBUS1_CFLAGS="-I${EPREFIX}/usr/include/dbus-1.0 -I${EPREFIX}/usr/$(get_libdir)/dbus-1.0/include"
292 + export DBUS1_LIBS="-ldbus-1"
293 + fi
294 + export LIBFFI_CFLAGS="-I$(echo ${EPREFIX}/usr/$(get_libdir)/libffi-*/include)"
295 + export LIBFFI_LIBS="-lffi"
296 + export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
297 + export PCRE_LIBS="-lpcre"
298 + fi
299 +
300 + # These configure tests don't work when cross-compiling.
301 + if tc-is-cross-compiler ; then
302 + # https://bugzilla.gnome.org/show_bug.cgi?id=756473
303 + case ${CHOST} in
304 + hppa*|metag*) export glib_cv_stack_grows=yes ;;
305 + *) export glib_cv_stack_grows=no ;;
306 + esac
307 + # https://bugzilla.gnome.org/show_bug.cgi?id=756474
308 + export glib_cv_uscore=no
309 + # https://bugzilla.gnome.org/show_bug.cgi?id=756475
310 + export ac_cv_func_posix_get{pwuid,grgid}_r=yes
311 + fi
312 +
313 + local myconf
314 +
315 + case "${CHOST}" in
316 + *-mingw*) myconf="${myconf} --with-threads=win32" ;;
317 + *) myconf="${myconf} --with-threads=posix" ;;
318 + esac
319 +
320 + # non-glibc platforms use GNU libiconv, but configure needs to know about
321 + # that not to get confused when it finds something outside the prefix too
322 + if use !elibc_glibc ; then
323 + myconf="${myconf} --with-libiconv=gnu"
324 + # add the libdir for libtool, otherwise it'll make love with system
325 + # installed libiconv. Automake passes LDFLAGS before local libs,
326 + # add this to LIBS instead to come after local lib dirs.
327 + append-libs "-L${EPREFIX}/usr/$(get_libdir)"
328 + fi
329 +
330 + # libelf used only by the gresource bin
331 + ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
332 + $(usex debug --enable-debug=yes ' ') \
333 + $(use_enable xattr) \
334 + $(use_enable fam) \
335 + $(use_enable kernel_linux libmount) \
336 + $(use_enable selinux) \
337 + $(use_enable static-libs static) \
338 + $(use_enable systemtap dtrace) \
339 + $(use_enable systemtap systemtap) \
340 + $(multilib_native_use_enable utils libelf) \
341 + --with-python=${EPYTHON} \
342 + --disable-compile-warnings \
343 + --enable-man \
344 + --with-pcre=system \
345 + --with-xml-catalog="${EPREFIX}/etc/xml/catalog"
346 +
347 + if multilib_is_native_abi; then
348 + local d
349 + for d in glib gio gobject; do
350 + ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
351 + done
352 + fi
353 +}
354 +
355 +multilib_src_test() {
356 + export XDG_CONFIG_DIRS="${EPREFIX}"/etc/xdg
357 + export XDG_DATA_DIRS="${EPREFIX}"/usr/local/share:/usr/share
358 + export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
359 + export LC_TIME=C # bug #411967
360 + unset GSETTINGS_BACKEND # bug #596380
361 + python_setup
362 +
363 + # Related test is a bit nitpicking
364 + mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
365 + chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
366 +
367 + # Hardened: gdb needs this, bug #338891
368 + if host-is-pax ; then
369 + pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
370 + || die "Hardened adjustment failed"
371 + fi
372 +
373 + # Need X for dbus-launch session X11 initialization
374 + virtx emake check
375 +}
376 +
377 +multilib_src_install() {
378 + emake DESTDIR="${D}" completiondir="$(get_bashcompdir)" install
379 + keepdir /usr/$(get_libdir)/gio/modules
380 +}
381 +
382 +multilib_src_install_all() {
383 + einstalldocs
384 +
385 + # These are installed by dev-util/glib-utils
386 + # TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit with meson
387 + rm "${ED}usr/bin/glib-genmarshal" || die
388 + rm "${ED}usr/share/man/man1/glib-genmarshal.1" || die
389 + rm "${ED}usr/bin/glib-mkenums" || die
390 + rm "${ED}usr/share/man/man1/glib-mkenums.1" || die
391 + rm "${ED}usr/bin/gtester-report" || die
392 + rm "${ED}usr/share/man/man1/gtester-report.1" || die
393 +
394 + # Do not install charset.alias even if generated, leave it to libiconv
395 + rm -f "${ED}/usr/$(get_libdir)/charset.alias"
396 +
397 + # Don't install gdb python macros, bug 291328
398 + rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
399 +
400 + # Completely useless with or without USE static-libs, people need to use pkg-config
401 + find "${ED}" -name '*.la' -delete || die
402 +}
403 +
404 +pkg_preinst() {
405 + gnome2_pkg_preinst
406 +
407 + # Make gschemas.compiled belong to glib alone
408 + local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
409 +
410 + if [[ -e ${EROOT}${cache} ]]; then
411 + cp "${EROOT}"${cache} "${ED}"/${cache} || die
412 + else
413 + touch "${ED}"/${cache} || die
414 + fi
415 +
416 + multilib_pkg_preinst() {
417 + # Make giomodule.cache belong to glib alone
418 + local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
419 +
420 + if [[ -e ${EROOT}${cache} ]]; then
421 + cp "${EROOT}"${cache} "${ED}"/${cache} || die
422 + else
423 + touch "${ED}"/${cache} || die
424 + fi
425 + }
426 +
427 + # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
428 + # file due to inability to create it and GIO might not look at any of the modules there
429 + if ! tc-is-cross-compiler ; then
430 + multilib_foreach_abi multilib_pkg_preinst
431 + fi
432 +}
433 +
434 +pkg_postinst() {
435 + # force (re)generation of gschemas.compiled
436 + GNOME2_ECLASS_GLIB_SCHEMAS="force"
437 +
438 + gnome2_pkg_postinst
439 +
440 + multilib_pkg_postinst() {
441 + gnome2_giomodule_cache_update \
442 + || die "Update GIO modules cache failed (for ${ABI})"
443 + }
444 + if ! tc-is-cross-compiler ; then
445 + multilib_foreach_abi multilib_pkg_postinst
446 + else
447 + ewarn "Updating of GIO modules cache skipped due to cross-compilation."
448 + ewarn "You might want to run gio-querymodules manually on the target for"
449 + ewarn "your final image for performance reasons and re-run it when packages"
450 + ewarn "installing GIO modules get upgraded or added to the image."
451 + fi
452 +}
453 +
454 +pkg_postrm() {
455 + gnome2_pkg_postrm
456 +
457 + if [[ -z ${REPLACED_BY_VERSION} ]]; then
458 + multilib_pkg_postrm() {
459 + rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
460 + }
461 + multilib_foreach_abi multilib_pkg_postrm
462 + rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
463 + fi
464 +}