Gentoo Archives: gentoo-commits

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