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