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