Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/
Date: Sun, 24 May 2020 20:38:12
Message-Id: 1590352326.ba353c93db87c768c4efb6d1adfaccf5dd2d713b.mattst88@gentoo
1 commit: ba353c93db87c768c4efb6d1adfaccf5dd2d713b
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Sat May 23 19:41:23 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun May 24 20:32:06 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba353c93
7
8 dev-libs/glib: remove old 2.64.* ebuilds
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
12 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
13
14 dev-libs/glib/Manifest | 2 -
15 dev-libs/glib/glib-2.64.1.ebuild | 285 --------------------------------------
16 dev-libs/glib/glib-2.64.2.ebuild | 288 ---------------------------------------
17 3 files changed, 575 deletions(-)
18
19 diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
20 index cc713e8d127..0bc6c77c82b 100644
21 --- a/dev-libs/glib/Manifest
22 +++ b/dev-libs/glib/Manifest
23 @@ -1,5 +1,3 @@
24 DIST glib-2.60.7.tar.xz 4590568 BLAKE2B a3f2a3bd0443a27326e8359c2ad1e6022ca1634f5c7cb4502a8011fbe85df690fff7d67665cf160bf4ed426214b87f6501a69158fb1656bdb86cacdcf076ee15 SHA512 d56d805a5abf6f7aeb8bf5be06b60ad049177ee23f78eacef4ce2ea88a8be49966a95e48fed17c752649f6e80937fd0ebc8f959709f623ec1f2f43ffd42d078a
25 DIST glib-2.62.6.tar.xz 4703424 BLAKE2B 0a27245be2575c574dcc730dd051a8c284f421dbc46579aadc5fbbacb8f934af4374b61bb26085e5c9ab78a868c567818f3fb9d67adddce37f5c4fec00e0d276 SHA512 8e3972a371f3c1a50b7d245b30e4f740583ad72ba4ab325e0e15e0732be44dfb69b603fb39dcf4989255a23a181e9ea5dd25982dd94c386cd9f21952243ad6f5
26 -DIST glib-2.64.1.tar.xz 4758548 BLAKE2B 5585d23fee28d7c32b1bb9e1defbc31ba469aa259e3c328760d1e702d98706cf251bfb50b5e2aed37b2cdfa6ab4319372ddcd0a9937c97a2614741b504af17a5 SHA512 1cefe49a42233f24ac6bd09c134ceea7119f4f74f42204a731be56100a180eec69c8224674f0b08d1538ad0859896ed08260a6af0fed469c7d10b4508116a6bc
27 -DIST glib-2.64.2.tar.xz 4760436 BLAKE2B 8145684ca9f966f92ed9cdafcbf46c59291dc1215fc9feae482fb33f61bd175a679fe5bc80f031190c9a0eb5eb650fab01e13bdda4bd41e9df3d21c6779681bc SHA512 c65adb76f4a03c19f2df186dde49724135975ec6cd059efca5d753e7459f77925657b1fb6fc4ff0d09b2461b2f6e58c9710fc8cde0a5d648ba0d68ccfef1ec57
28 DIST glib-2.64.3.tar.xz 4778964 BLAKE2B 98ec6e15a8ff642fbccd4809d749234d5adae8abcab7a3619caed0aa60370d0409a76a2c64a95998401e8a339dcc264f4f808f3d7be457ff40e38d70b0a8076b SHA512 a3828c37a50e86eb8791be53bd8af848d144e4580841ffab28f3b6eae5144f5cdf4a5d4b43130615b97488e700b274c2468fc7d561b3701a1fc686349501a1db
29
30 diff --git a/dev-libs/glib/glib-2.64.1.ebuild b/dev-libs/glib/glib-2.64.1.ebuild
31 deleted file mode 100644
32 index 9e610133a79..00000000000
33 --- a/dev-libs/glib/glib-2.64.1.ebuild
34 +++ /dev/null
35 @@ -1,285 +0,0 @@
36 -# Copyright 1999-2020 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=7
40 -PYTHON_COMPAT=( python3_{6,7,8} )
41 -
42 -inherit flag-o-matic gnome.org gnome2-utils linux-info meson multilib multilib-minimal python-any-r1 toolchain-funcs xdg
43 -
44 -DESCRIPTION="The GLib library of C routines"
45 -HOMEPAGE="https://www.gtk.org/"
46 -
47 -LICENSE="LGPL-2.1+"
48 -SLOT="2"
49 -IUSE="dbus debug elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
50 -RESTRICT="!test? ( test )"
51 -
52 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
53 -
54 -# * libelf isn't strictly necessary, but makes gresource tool more useful, and
55 -# the check is automagic in gio/meson.build. gresource is not a multilib tool
56 -# right now, thus it doesn't matter if non-native ABI libelf exists or not
57 -# (non-native binary is overwritten, it doesn't matter if libelf was linked to).
58 -# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
59 -# these are used by GIO, which glib[static-libs] consumers don't really seem
60 -# to need at all, thus not imposing the deps for now and once some consumers
61 -# are actually found to static link libgio-2.0.a, we can revisit and either add
62 -# them or just put the (build) deps in that rare consumer instead of recursive
63 -# RDEPEND here (due to lack of recursive DEPEND).
64 -RDEPEND="
65 - !<dev-util/gdbus-codegen-${PV}
66 - >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
67 - >=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
68 - >=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
69 - >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
70 - >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
71 - kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
72 - selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
73 - xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
74 - virtual/libelf:0=
75 - fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
76 -"
77 -DEPEND="${RDEPEND}"
78 -# libxml2 used for optional tests that get automatically skipped
79 -BDEPEND="
80 - app-text/docbook-xsl-stylesheets
81 - dev-libs/libxslt
82 - >=sys-devel/gettext-0.19.8
83 - gtk-doc? ( >=dev-util/gtk-doc-1.20
84 - app-text/docbook-xml-dtd:4.2
85 - app-text/docbook-xml-dtd:4.5 )
86 - systemtap? ( >=dev-util/systemtap-1.3 )
87 - ${PYTHON_DEPS}
88 - test? ( >=sys-apps/dbus-1.2.14 )
89 - virtual/pkgconfig[${MULTILIB_USEDEP}]
90 -"
91 -# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
92 -
93 -PDEPEND="
94 - dbus? ( gnome-base/dconf )
95 - mime? ( x11-misc/shared-mime-info )
96 -"
97 -# shared-mime-info needed for gio/xdgmime, bug #409481
98 -# dconf is needed to be able to save settings, bug #498436
99 -
100 -MULTILIB_CHOST_TOOLS=(
101 - /usr/bin/gio-querymodules$(get_exeext)
102 -)
103 -
104 -PATCHES=(
105 - "${FILESDIR}"/${P}-mark-gdbus-server-auth-test-flaky.patch
106 -)
107 -
108 -pkg_setup() {
109 - if use kernel_linux ; then
110 - CONFIG_CHECK="~INOTIFY_USER"
111 - if use test ; then
112 - CONFIG_CHECK="~IPV6"
113 - WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
114 - fi
115 - linux-info_pkg_setup
116 - fi
117 - python-any-r1_pkg_setup
118 -}
119 -
120 -src_prepare() {
121 - if use test; then
122 - # TODO: Review the test exclusions, especially now with meson
123 - # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
124 - if ! has_version dev-util/desktop-file-utils ; then
125 - ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
126 - ewarn "think on installing it to get these tests run."
127 - sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
128 - sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
129 - fi
130 -
131 - # gdesktopappinfo requires existing terminal (gnome-terminal or any
132 - # other), falling back to xterm if one doesn't exist
133 - #if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
134 - # ewarn "Some tests will be skipped due to missing terminal program"
135 - # These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
136 - # Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
137 - sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
138 - # desktop-app-info/launch* might fail similarly
139 - sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
140 - #fi
141 -
142 - # https://bugzilla.gnome.org/show_bug.cgi?id=722604
143 - sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
144 - sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
145 -
146 - ewarn "Tests for search-utils have been skipped"
147 - sed -i -e "/search-utils/d" glib/tests/meson.build || die
148 -
149 - # Play nice with network-sandbox, but this approach would defeat the purpose of the test
150 - #sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
151 - else
152 - # Don't build tests, also prevents extra deps, bug #512022
153 - sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
154 - fi
155 -
156 - # Don't build fuzzing binaries - not used
157 - sed -i -e '/subdir.*fuzzing/d' meson.build || die
158 -
159 - # gdbus-codegen is a separate package
160 - sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
161 -
162 - # Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
163 - sed -i -e '/install_dir/d' gio/tests/meson.build || die
164 -
165 - cat > "${T}/glib-test-ld-wrapper" <<-EOF
166 - #!/usr/bin/env sh
167 - exec \${LD:-ld} "\$@"
168 - EOF
169 - chmod a+x "${T}/glib-test-ld-wrapper" || die
170 - sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
171 -
172 - xdg_src_prepare
173 - gnome2_environment_reset
174 - # TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
175 -}
176 -
177 -multilib_src_configure() {
178 - if use debug; then
179 - append-cflags -DG_ENABLE_DEBUG
180 - else
181 - append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
182 - fi
183 -
184 - # TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
185 - #if tc-is-cross-compiler ; then
186 - # https://bugzilla.gnome.org/show_bug.cgi?id=756473
187 - # TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
188 - #case ${CHOST} in
189 - #hppa*|metag*) export glib_cv_stack_grows=yes ;;
190 - #*) export glib_cv_stack_grows=no ;;
191 - #esac
192 - #fi
193 -
194 - local emesonargs=(
195 - -Ddefault_library=$(usex static-libs both shared)
196 - $(meson_feature selinux)
197 - $(meson_use xattr)
198 - -Dlibmount=enabled # only used if host_system == 'linux'
199 - -Dinternal_pcre=false
200 - -Dman=true
201 - $(meson_use systemtap dtrace)
202 - $(meson_use systemtap)
203 - -Dgtk_doc=$(multilib_native_usex gtk-doc true false)
204 - $(meson_use fam)
205 - -Dinstalled_tests=false
206 - -Dnls=enabled
207 - -Doss_fuzz=disabled
208 - )
209 - meson_src_configure
210 -}
211 -
212 -multilib_src_compile() {
213 - meson_src_compile
214 -}
215 -
216 -multilib_src_test() {
217 - export XDG_CONFIG_DIRS=/etc/xdg
218 - export XDG_DATA_DIRS=/usr/local/share:/usr/share
219 - export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
220 - export LC_TIME=C # bug #411967
221 - unset GSETTINGS_BACKEND # bug #596380
222 - python_setup
223 -
224 - # Related test is a bit nitpicking
225 - mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
226 - chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
227 -
228 - meson_src_test --timeout-multiplier 2 --no-suite flaky
229 -}
230 -
231 -multilib_src_install() {
232 - meson_src_install
233 - keepdir /usr/$(get_libdir)/gio/modules
234 -}
235 -
236 -multilib_src_install_all() {
237 - einstalldocs
238 -
239 - # These are installed by dev-util/glib-utils
240 - # 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 now with meson
241 - rm "${ED}/usr/bin/glib-genmarshal" || die
242 - rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
243 - rm "${ED}/usr/bin/glib-mkenums" || die
244 - rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
245 - rm "${ED}/usr/bin/gtester-report" || die
246 - rm "${ED}/usr/share/man/man1/gtester-report.1" || die
247 - # gdbus-codegen manpage installed by dev-util/gdbus-codegen
248 - rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
249 -}
250 -
251 -pkg_preinst() {
252 - xdg_pkg_preinst
253 -
254 - # Make gschemas.compiled belong to glib alone
255 - local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
256 -
257 - if [[ -e ${EROOT}${cache} ]]; then
258 - cp "${EROOT}"${cache} "${ED}"/${cache} || die
259 - else
260 - touch "${ED}"${cache} || die
261 - fi
262 -
263 - multilib_pkg_preinst() {
264 - # Make giomodule.cache belong to glib alone
265 - local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
266 -
267 - if [[ -e ${EROOT}${cache} ]]; then
268 - cp "${EROOT}"${cache} "${ED}"${cache} || die
269 - else
270 - touch "${ED}"${cache} || die
271 - fi
272 - }
273 -
274 - # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
275 - # file due to inability to create it and GIO might not look at any of the modules there
276 - if ! tc-is-cross-compiler ; then
277 - multilib_foreach_abi multilib_pkg_preinst
278 - fi
279 -}
280 -
281 -pkg_postinst() {
282 - xdg_pkg_postinst
283 - # glib installs no schemas itself, but we force update for fresh install in case
284 - # something has dropped in a schemas file without direct glib dep; and for upgrades
285 - # in case the compiled schema format could have changed
286 - gnome2_schemas_update
287 -
288 - multilib_pkg_postinst() {
289 - gnome2_giomodule_cache_update \
290 - || die "Update GIO modules cache failed (for ${ABI})"
291 - }
292 - if ! tc-is-cross-compiler ; then
293 - multilib_foreach_abi multilib_pkg_postinst
294 - else
295 - ewarn "Updating of GIO modules cache skipped due to cross-compilation."
296 - ewarn "You might want to run gio-querymodules manually on the target for"
297 - ewarn "your final image for performance reasons and re-run it when packages"
298 - ewarn "installing GIO modules get upgraded or added to the image."
299 - fi
300 -
301 - for v in ${REPLACING_VERSIONS}; do
302 - if ver_test "$v" "-lt" "2.63.6"; then
303 - ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
304 - ewarn "to restart your session for \"Open With\" dialogs to work."
305 - fi
306 - done
307 -}
308 -
309 -pkg_postrm() {
310 - xdg_pkg_postrm
311 - gnome2_schemas_update
312 -
313 - if [[ -z ${REPLACED_BY_VERSION} ]]; then
314 - multilib_pkg_postrm() {
315 - rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
316 - }
317 - multilib_foreach_abi multilib_pkg_postrm
318 - rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
319 - fi
320 -}
321
322 diff --git a/dev-libs/glib/glib-2.64.2.ebuild b/dev-libs/glib/glib-2.64.2.ebuild
323 deleted file mode 100644
324 index 8b05703c347..00000000000
325 --- a/dev-libs/glib/glib-2.64.2.ebuild
326 +++ /dev/null
327 @@ -1,288 +0,0 @@
328 -# Copyright 1999-2020 Gentoo Authors
329 -# Distributed under the terms of the GNU General Public License v2
330 -
331 -EAPI=7
332 -PYTHON_COMPAT=( python3_{6,7,8} )
333 -
334 -inherit flag-o-matic gnome.org gnome2-utils linux-info meson multilib multilib-minimal python-any-r1 toolchain-funcs xdg
335 -
336 -DESCRIPTION="The GLib library of C routines"
337 -HOMEPAGE="https://www.gtk.org/"
338 -
339 -LICENSE="LGPL-2.1+"
340 -SLOT="2"
341 -IUSE="dbus debug elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
342 -RESTRICT="!test? ( test )"
343 -
344 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
345 -
346 -# * libelf isn't strictly necessary, but makes gresource tool more useful, and
347 -# the check is automagic in gio/meson.build. gresource is not a multilib tool
348 -# right now, thus it doesn't matter if non-native ABI libelf exists or not
349 -# (non-native binary is overwritten, it doesn't matter if libelf was linked to).
350 -# * elfutils (via libelf) does not build on Windows. gresources are not embedded
351 -# within ELF binaries on that platform anyway and inspecting ELF binaries from
352 -# other platforms is not that useful so exclude the dependency in this case.
353 -# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
354 -# these are used by GIO, which glib[static-libs] consumers don't really seem
355 -# to need at all, thus not imposing the deps for now and once some consumers
356 -# are actually found to static link libgio-2.0.a, we can revisit and either add
357 -# them or just put the (build) deps in that rare consumer instead of recursive
358 -# RDEPEND here (due to lack of recursive DEPEND).
359 -RDEPEND="
360 - !<dev-util/gdbus-codegen-${PV}
361 - >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
362 - >=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
363 - >=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
364 - >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
365 - >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
366 - kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
367 - selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
368 - xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
369 - !kernel_Winnt? ( virtual/libelf:0= )
370 - fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
371 -"
372 -DEPEND="${RDEPEND}"
373 -# libxml2 used for optional tests that get automatically skipped
374 -BDEPEND="
375 - app-text/docbook-xsl-stylesheets
376 - dev-libs/libxslt
377 - >=sys-devel/gettext-0.19.8
378 - gtk-doc? ( >=dev-util/gtk-doc-1.20
379 - app-text/docbook-xml-dtd:4.2
380 - app-text/docbook-xml-dtd:4.5 )
381 - systemtap? ( >=dev-util/systemtap-1.3 )
382 - ${PYTHON_DEPS}
383 - test? ( >=sys-apps/dbus-1.2.14 )
384 - virtual/pkgconfig[${MULTILIB_USEDEP}]
385 -"
386 -# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
387 -
388 -PDEPEND="
389 - dbus? ( gnome-base/dconf )
390 - mime? ( x11-misc/shared-mime-info )
391 -"
392 -# shared-mime-info needed for gio/xdgmime, bug #409481
393 -# dconf is needed to be able to save settings, bug #498436
394 -
395 -MULTILIB_CHOST_TOOLS=(
396 - /usr/bin/gio-querymodules$(get_exeext)
397 -)
398 -
399 -PATCHES=(
400 - "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
401 -)
402 -
403 -pkg_setup() {
404 - if use kernel_linux ; then
405 - CONFIG_CHECK="~INOTIFY_USER"
406 - if use test ; then
407 - CONFIG_CHECK="~IPV6"
408 - WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
409 - fi
410 - linux-info_pkg_setup
411 - fi
412 - python-any-r1_pkg_setup
413 -}
414 -
415 -src_prepare() {
416 - if use test; then
417 - # TODO: Review the test exclusions, especially now with meson
418 - # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
419 - if ! has_version dev-util/desktop-file-utils ; then
420 - ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
421 - ewarn "think on installing it to get these tests run."
422 - sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
423 - sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
424 - fi
425 -
426 - # gdesktopappinfo requires existing terminal (gnome-terminal or any
427 - # other), falling back to xterm if one doesn't exist
428 - #if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
429 - # ewarn "Some tests will be skipped due to missing terminal program"
430 - # These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
431 - # Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
432 - sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
433 - # desktop-app-info/launch* might fail similarly
434 - sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
435 - #fi
436 -
437 - # https://bugzilla.gnome.org/show_bug.cgi?id=722604
438 - sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
439 - sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
440 -
441 - ewarn "Tests for search-utils have been skipped"
442 - sed -i -e "/search-utils/d" glib/tests/meson.build || die
443 -
444 - # Play nice with network-sandbox, but this approach would defeat the purpose of the test
445 - #sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
446 - else
447 - # Don't build tests, also prevents extra deps, bug #512022
448 - sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
449 - fi
450 -
451 - # Don't build fuzzing binaries - not used
452 - sed -i -e '/subdir.*fuzzing/d' meson.build || die
453 -
454 - # gdbus-codegen is a separate package
455 - sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
456 -
457 - # Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
458 - sed -i -e '/install_dir/d' gio/tests/meson.build || die
459 -
460 - cat > "${T}/glib-test-ld-wrapper" <<-EOF
461 - #!/usr/bin/env sh
462 - exec \${LD:-ld} "\$@"
463 - EOF
464 - chmod a+x "${T}/glib-test-ld-wrapper" || die
465 - sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
466 -
467 - xdg_src_prepare
468 - gnome2_environment_reset
469 - # TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
470 -}
471 -
472 -multilib_src_configure() {
473 - if use debug; then
474 - append-cflags -DG_ENABLE_DEBUG
475 - else
476 - append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
477 - fi
478 -
479 - # TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
480 - #if tc-is-cross-compiler ; then
481 - # https://bugzilla.gnome.org/show_bug.cgi?id=756473
482 - # TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
483 - #case ${CHOST} in
484 - #hppa*|metag*) export glib_cv_stack_grows=yes ;;
485 - #*) export glib_cv_stack_grows=no ;;
486 - #esac
487 - #fi
488 -
489 - local emesonargs=(
490 - -Ddefault_library=$(usex static-libs both shared)
491 - $(meson_feature selinux)
492 - $(meson_use xattr)
493 - -Dlibmount=enabled # only used if host_system == 'linux'
494 - -Dinternal_pcre=false
495 - -Dman=true
496 - $(meson_use systemtap dtrace)
497 - $(meson_use systemtap)
498 - -Dgtk_doc=$(multilib_native_usex gtk-doc true false)
499 - $(meson_use fam)
500 - -Dinstalled_tests=false
501 - -Dnls=enabled
502 - -Doss_fuzz=disabled
503 - )
504 - meson_src_configure
505 -}
506 -
507 -multilib_src_compile() {
508 - meson_src_compile
509 -}
510 -
511 -multilib_src_test() {
512 - export XDG_CONFIG_DIRS=/etc/xdg
513 - export XDG_DATA_DIRS=/usr/local/share:/usr/share
514 - export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
515 - export LC_TIME=C # bug #411967
516 - unset GSETTINGS_BACKEND # bug #596380
517 - python_setup
518 -
519 - # Related test is a bit nitpicking
520 - mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
521 - chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
522 -
523 - meson_src_test --timeout-multiplier 2 --no-suite flaky
524 -}
525 -
526 -multilib_src_install() {
527 - meson_src_install
528 - keepdir /usr/$(get_libdir)/gio/modules
529 -}
530 -
531 -multilib_src_install_all() {
532 - einstalldocs
533 -
534 - # These are installed by dev-util/glib-utils
535 - # 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 now with meson
536 - rm "${ED}/usr/bin/glib-genmarshal" || die
537 - rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
538 - rm "${ED}/usr/bin/glib-mkenums" || die
539 - rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
540 - rm "${ED}/usr/bin/gtester-report" || die
541 - rm "${ED}/usr/share/man/man1/gtester-report.1" || die
542 - # gdbus-codegen manpage installed by dev-util/gdbus-codegen
543 - rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
544 -}
545 -
546 -pkg_preinst() {
547 - xdg_pkg_preinst
548 -
549 - # Make gschemas.compiled belong to glib alone
550 - local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
551 -
552 - if [[ -e ${EROOT}${cache} ]]; then
553 - cp "${EROOT}"${cache} "${ED}"/${cache} || die
554 - else
555 - touch "${ED}"${cache} || die
556 - fi
557 -
558 - multilib_pkg_preinst() {
559 - # Make giomodule.cache belong to glib alone
560 - local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
561 -
562 - if [[ -e ${EROOT}${cache} ]]; then
563 - cp "${EROOT}"${cache} "${ED}"${cache} || die
564 - else
565 - touch "${ED}"${cache} || die
566 - fi
567 - }
568 -
569 - # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
570 - # file due to inability to create it and GIO might not look at any of the modules there
571 - if ! tc-is-cross-compiler ; then
572 - multilib_foreach_abi multilib_pkg_preinst
573 - fi
574 -}
575 -
576 -pkg_postinst() {
577 - xdg_pkg_postinst
578 - # glib installs no schemas itself, but we force update for fresh install in case
579 - # something has dropped in a schemas file without direct glib dep; and for upgrades
580 - # in case the compiled schema format could have changed
581 - gnome2_schemas_update
582 -
583 - multilib_pkg_postinst() {
584 - gnome2_giomodule_cache_update \
585 - || die "Update GIO modules cache failed (for ${ABI})"
586 - }
587 - if ! tc-is-cross-compiler ; then
588 - multilib_foreach_abi multilib_pkg_postinst
589 - else
590 - ewarn "Updating of GIO modules cache skipped due to cross-compilation."
591 - ewarn "You might want to run gio-querymodules manually on the target for"
592 - ewarn "your final image for performance reasons and re-run it when packages"
593 - ewarn "installing GIO modules get upgraded or added to the image."
594 - fi
595 -
596 - for v in ${REPLACING_VERSIONS}; do
597 - if ver_test "$v" "-lt" "2.63.6"; then
598 - ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
599 - ewarn "to restart your session for \"Open With\" dialogs to work."
600 - fi
601 - done
602 -}
603 -
604 -pkg_postrm() {
605 - xdg_pkg_postrm
606 - gnome2_schemas_update
607 -
608 - if [[ -z ${REPLACED_BY_VERSION} ]]; then
609 - multilib_pkg_postrm() {
610 - rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
611 - }
612 - multilib_foreach_abi multilib_pkg_postrm
613 - rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
614 - fi
615 -}