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: Fri, 11 Jun 2021 04:53:06
Message-Id: 1623387144.b6ee835969455f348d81942a83e9db6505330878.mattst88@gentoo
1 commit: b6ee835969455f348d81942a83e9db6505330878
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 11 04:43:10 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 11 04:52:24 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6ee8359
7
8 dev-libs/glib: Version bump to 2.68.3
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 dev-libs/glib/Manifest | 1 +
13 dev-libs/glib/glib-2.68.3.ebuild | 283 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 284 insertions(+)
15
16 diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
17 index 856206798d9..53c8a24bc55 100644
18 --- a/dev-libs/glib/Manifest
19 +++ b/dev-libs/glib/Manifest
20 @@ -1 +1,2 @@
21 DIST glib-2.68.2.tar.xz 4944192 BLAKE2B d35489dcfe9d57d8bd6ecf4f893b7c8e93a5b8108765791071fc811598d1f41287e03d95f20591d50d51a78db34f11833cc7970b1bf29299385357a14977ba0b SHA512 74d481552629cab67d22f8a440a7263a4e4b83adb6f3b772d368e255c17321b206aafd3af4653e5efbb2c3c14ca67d35f453728cbc5cd68728275d0b56789019
22 +DIST glib-2.68.3.tar.xz 4945236 BLAKE2B 6086b7490f418cb98119ab25670766e3a84de81fd180dbc6e8f929d8f8ab748b0ae7ad6a85f5419ab3c00589c3afba95972d8b4541b310acdf6b6dc9b460a07d SHA512 fb120105c4cb582491a53a0e4c61fe4bdd1f94b279bb7c362afd591369ede50a196c706375564ededf3550d4062a285b038e20b605e6d5dfe36f5d208f4bad3f
23
24 diff --git a/dev-libs/glib/glib-2.68.3.ebuild b/dev-libs/glib/glib-2.68.3.ebuild
25 new file mode 100644
26 index 00000000000..d6796ff5e9a
27 --- /dev/null
28 +++ b/dev-libs/glib/glib-2.68.3.ebuild
29 @@ -0,0 +1,283 @@
30 +# Copyright 1999-2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +PYTHON_COMPAT=( python3_{7..9} )
35 +
36 +inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
37 +
38 +DESCRIPTION="The GLib library of C routines"
39 +HOMEPAGE="https://www.gtk.org/"
40 +
41 +LICENSE="LGPL-2.1+"
42 +SLOT="2"
43 +IUSE="dbus debug +elf elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs sysprof systemtap test utils xattr"
44 +RESTRICT="!test? ( test )"
45 +REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
46 +
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
48 +
49 +# * elfutils (via libelf) does not build on Windows. gresources are not embedded
50 +# within ELF binaries on that platform anyway and inspecting ELF binaries from
51 +# other platforms is not that useful so exclude the dependency in this case.
52 +# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
53 +# these are used by GIO, which glib[static-libs] consumers don't really seem
54 +# to need at all, thus not imposing the deps for now and once some consumers
55 +# are actually found to static link libgio-2.0.a, we can revisit and either add
56 +# them or just put the (build) deps in that rare consumer instead of recursive
57 +# RDEPEND here (due to lack of recursive DEPEND).
58 +RDEPEND="
59 + !<dev-util/gdbus-codegen-${PV}
60 + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
61 + >=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
62 + >=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
63 + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
64 + >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
65 + kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
66 + selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
67 + xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
68 + !kernel_Winnt? ( virtual/libelf:0= )
69 + fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
70 + sysprof? ( >=dev-util/sysprof-capture-3.38:4[${MULTILIB_USEDEP}] )
71 +"
72 +DEPEND="${RDEPEND}"
73 +# libxml2 used for optional tests that get automatically skipped
74 +BDEPEND="
75 + app-text/docbook-xsl-stylesheets
76 + dev-libs/libxslt
77 + >=sys-devel/gettext-0.19.8
78 + gtk-doc? ( >=dev-util/gtk-doc-1.33
79 + app-text/docbook-xml-dtd:4.2
80 + app-text/docbook-xml-dtd:4.5 )
81 + systemtap? ( >=dev-util/systemtap-1.3 )
82 + ${PYTHON_DEPS}
83 + test? ( >=sys-apps/dbus-1.2.14 )
84 + virtual/pkgconfig
85 +"
86 +# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
87 +
88 +PDEPEND="
89 + dbus? ( gnome-base/dconf )
90 + mime? ( x11-misc/shared-mime-info )
91 +"
92 +# shared-mime-info needed for gio/xdgmime, bug #409481
93 +# dconf is needed to be able to save settings, bug #498436
94 +
95 +MULTILIB_CHOST_TOOLS=(
96 + /usr/bin/gio-querymodules$(get_exeext)
97 +)
98 +
99 +PATCHES=(
100 + "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
101 +)
102 +
103 +pkg_setup() {
104 + if use kernel_linux ; then
105 + CONFIG_CHECK="~INOTIFY_USER"
106 + if use test ; then
107 + CONFIG_CHECK="~IPV6"
108 + WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
109 + fi
110 + linux-info_pkg_setup
111 + fi
112 + python-any-r1_pkg_setup
113 +}
114 +
115 +src_prepare() {
116 + if use test; then
117 + # TODO: Review the test exclusions, especially now with meson
118 + # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
119 + if ! has_version dev-util/desktop-file-utils ; then
120 + ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
121 + ewarn "think on installing it to get these tests run."
122 + sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
123 + sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
124 + fi
125 +
126 + # gdesktopappinfo requires existing terminal (gnome-terminal or any
127 + # other), falling back to xterm if one doesn't exist
128 + #if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
129 + # ewarn "Some tests will be skipped due to missing terminal program"
130 + # These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
131 + # 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
132 + sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
133 + # desktop-app-info/launch* might fail similarly
134 + sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
135 + #fi
136 +
137 + # https://bugzilla.gnome.org/show_bug.cgi?id=722604
138 + sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
139 + sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
140 +
141 + ewarn "Tests for search-utils have been skipped"
142 + sed -i -e "/search-utils/d" glib/tests/meson.build || die
143 +
144 + # Play nice with network-sandbox, but this approach would defeat the purpose of the test
145 + #sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
146 + else
147 + # Don't build tests, also prevents extra deps, bug #512022
148 + sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
149 + fi
150 +
151 + # Don't build fuzzing binaries - not used
152 + sed -i -e '/subdir.*fuzzing/d' meson.build || die
153 +
154 + # gdbus-codegen is a separate package
155 + sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
156 +
157 + # Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
158 + sed -i -e '/install_dir/d' gio/tests/meson.build || die
159 +
160 + cat > "${T}/glib-test-ld-wrapper" <<-EOF
161 + #!/usr/bin/env sh
162 + exec \${LD:-ld} "\$@"
163 + EOF
164 + chmod a+x "${T}/glib-test-ld-wrapper" || die
165 + sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
166 +
167 + xdg_src_prepare
168 + gnome2_environment_reset
169 + # TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
170 +}
171 +
172 +multilib_src_configure() {
173 + if use debug; then
174 + append-cflags -DG_ENABLE_DEBUG
175 + else
176 + append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
177 + fi
178 +
179 + # TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
180 + #if tc-is-cross-compiler ; then
181 + # https://bugzilla.gnome.org/show_bug.cgi?id=756473
182 + # TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
183 + #case ${CHOST} in
184 + #hppa*|metag*) export glib_cv_stack_grows=yes ;;
185 + #*) export glib_cv_stack_grows=no ;;
186 + #esac
187 + #fi
188 +
189 + local emesonargs=(
190 + -Ddefault_library=$(usex static-libs both shared)
191 + $(meson_feature selinux)
192 + $(meson_use xattr)
193 + -Dlibmount=enabled # only used if host_system == 'linux'
194 + -Dinternal_pcre=false
195 + -Dman=true
196 + $(meson_use systemtap dtrace)
197 + $(meson_use systemtap)
198 + $(meson_feature sysprof)
199 + $(meson_native_use_bool gtk-doc gtk_doc)
200 + $(meson_use fam)
201 + $(meson_use test tests)
202 + -Dinstalled_tests=false
203 + -Dnls=enabled
204 + -Doss_fuzz=disabled
205 + $(meson_native_use_feature elf libelf)
206 + )
207 + meson_src_configure
208 +}
209 +
210 +multilib_src_test() {
211 + export XDG_CONFIG_DIRS=/etc/xdg
212 + export XDG_DATA_DIRS=/usr/local/share:/usr/share
213 + export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
214 + export LC_TIME=C # bug #411967
215 + unset GSETTINGS_BACKEND # bug #596380
216 + python_setup
217 +
218 + # Related test is a bit nitpicking
219 + mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
220 + chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
221 +
222 + meson_src_test --timeout-multiplier 2 --no-suite flaky
223 +}
224 +
225 +multilib_src_install() {
226 + meson_src_install
227 + keepdir /usr/$(get_libdir)/gio/modules
228 +}
229 +
230 +multilib_src_install_all() {
231 + # These are installed by dev-util/glib-utils
232 + # 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
233 + rm "${ED}/usr/bin/glib-genmarshal" || die
234 + rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
235 + rm "${ED}/usr/bin/glib-mkenums" || die
236 + rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
237 + rm "${ED}/usr/bin/gtester-report" || die
238 + rm "${ED}/usr/share/man/man1/gtester-report.1" || die
239 + # gdbus-codegen manpage installed by dev-util/gdbus-codegen
240 + rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
241 +}
242 +
243 +pkg_preinst() {
244 + xdg_pkg_preinst
245 +
246 + # Make gschemas.compiled belong to glib alone
247 + local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
248 +
249 + if [[ -e ${EROOT}${cache} ]]; then
250 + cp "${EROOT}"${cache} "${ED}"/${cache} || die
251 + else
252 + touch "${ED}"${cache} || die
253 + fi
254 +
255 + multilib_pkg_preinst() {
256 + # Make giomodule.cache belong to glib alone
257 + local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
258 +
259 + if [[ -e ${EROOT}${cache} ]]; then
260 + cp "${EROOT}"${cache} "${ED}"${cache} || die
261 + else
262 + touch "${ED}"${cache} || die
263 + fi
264 + }
265 +
266 + # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
267 + # file due to inability to create it and GIO might not look at any of the modules there
268 + if ! tc-is-cross-compiler ; then
269 + multilib_foreach_abi multilib_pkg_preinst
270 + fi
271 +}
272 +
273 +pkg_postinst() {
274 + xdg_pkg_postinst
275 + # glib installs no schemas itself, but we force update for fresh install in case
276 + # something has dropped in a schemas file without direct glib dep; and for upgrades
277 + # in case the compiled schema format could have changed
278 + gnome2_schemas_update
279 +
280 + multilib_pkg_postinst() {
281 + gnome2_giomodule_cache_update \
282 + || die "Update GIO modules cache failed (for ${ABI})"
283 + }
284 + if ! tc-is-cross-compiler ; then
285 + multilib_foreach_abi multilib_pkg_postinst
286 + else
287 + ewarn "Updating of GIO modules cache skipped due to cross-compilation."
288 + ewarn "You might want to run gio-querymodules manually on the target for"
289 + ewarn "your final image for performance reasons and re-run it when packages"
290 + ewarn "installing GIO modules get upgraded or added to the image."
291 + fi
292 +
293 + for v in ${REPLACING_VERSIONS}; do
294 + if ver_test "$v" "-lt" "2.63.6"; then
295 + ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
296 + ewarn "to restart your session for \"Open With\" dialogs to work."
297 + fi
298 + done
299 +}
300 +
301 +pkg_postrm() {
302 + xdg_pkg_postrm
303 + gnome2_schemas_update
304 +
305 + if [[ -z ${REPLACED_BY_VERSION} ]]; then
306 + multilib_pkg_postrm() {
307 + rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
308 + }
309 + multilib_foreach_abi multilib_pkg_postrm
310 + rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
311 + fi
312 +}