Gentoo Archives: gentoo-commits

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