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