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