1 |
commit: 0b605b42363650b0b8dcd49bb1b9787d317eceec |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 11 18:11:39 2020 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 11 18:12:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b605b42 |
7 |
|
8 |
dev-libs/glib: remove old |
9 |
|
10 |
Package-Manager: Portage-2.3.79, Repoman-2.3.12 |
11 |
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org> |
12 |
|
13 |
dev-libs/glib/Manifest | 2 - |
14 |
dev-libs/glib/files/2.58.3-CVE-2019-12450.patch | 53 ---- |
15 |
.../glib/files/2.58.3-gdbusmessage-limit-fix.patch | 120 -------- |
16 |
.../files/glib-2.58.2-external-gdbus-codegen.patch | 124 -------- |
17 |
dev-libs/glib/glib-2.58.3-r1.ebuild | 316 --------------------- |
18 |
5 files changed, 615 deletions(-) |
19 |
|
20 |
diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest |
21 |
index bb414b1e7f6..35f017b7582 100644 |
22 |
--- a/dev-libs/glib/Manifest |
23 |
+++ b/dev-libs/glib/Manifest |
24 |
@@ -1,3 +1 @@ |
25 |
-DIST glib-2.58.3.tar.xz 4863648 BLAKE2B 4269bd6e80869f39d567917438f750561debb1b45d40ecea487d2e76e2468e07dc8d80a23678699f7b8f7778c2ed9d29e866ae5e33770f51ed00709dd5fe97eb SHA512 1e1cb5b607367dcbadb95563d463e81702cf396b28f1173f6d933707f4f3d5595a70225423e918807a05994a24f16fa3ac87d2ec67e4b670244ea99836634cce |
26 |
DIST glib-2.60.7.tar.xz 4590568 BLAKE2B a3f2a3bd0443a27326e8359c2ad1e6022ca1634f5c7cb4502a8011fbe85df690fff7d67665cf160bf4ed426214b87f6501a69158fb1656bdb86cacdcf076ee15 SHA512 d56d805a5abf6f7aeb8bf5be06b60ad049177ee23f78eacef4ce2ea88a8be49966a95e48fed17c752649f6e80937fd0ebc8f959709f623ec1f2f43ffd42d078a |
27 |
-DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320 |
28 |
|
29 |
diff --git a/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch b/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch |
30 |
deleted file mode 100644 |
31 |
index 949ac56431f..00000000000 |
32 |
--- a/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch |
33 |
+++ /dev/null |
34 |
@@ -1,53 +0,0 @@ |
35 |
-From e6b769819d63d2b24b251dbc9f902fe6fd614da3 Mon Sep 17 00:00:00 2001 |
36 |
-From: Ondrej Holy <oholy@××××××.com> |
37 |
-Date: Thu, 23 May 2019 10:41:53 +0200 |
38 |
-Subject: [PATCH] gfile: Limit access to files when copying |
39 |
- |
40 |
-file_copy_fallback creates new files with default permissions and |
41 |
-set the correct permissions after the operation is finished. This |
42 |
-might cause that the files can be accessible by more users during |
43 |
-the operation than expected. Use G_FILE_CREATE_PRIVATE for the new |
44 |
-files to limit access to those files. |
45 |
---- |
46 |
- gio/gfile.c | 11 ++++++----- |
47 |
- 1 file changed, 6 insertions(+), 5 deletions(-) |
48 |
- |
49 |
-diff --git a/gio/gfile.c b/gio/gfile.c |
50 |
-index 1cc69166a..13b435480 100644 |
51 |
---- a/gio/gfile.c |
52 |
-+++ b/gio/gfile.c |
53 |
-@@ -3284,12 +3284,12 @@ file_copy_fallback (GFile *source, |
54 |
- out = (GOutputStream*)_g_local_file_output_stream_replace (_g_local_file_get_filename (G_LOCAL_FILE (destination)), |
55 |
- FALSE, NULL, |
56 |
- flags & G_FILE_COPY_BACKUP, |
57 |
-- G_FILE_CREATE_REPLACE_DESTINATION, |
58 |
-- info, |
59 |
-+ G_FILE_CREATE_REPLACE_DESTINATION | |
60 |
-+ G_FILE_CREATE_PRIVATE, info, |
61 |
- cancellable, error); |
62 |
- else |
63 |
- out = (GOutputStream*)_g_local_file_output_stream_create (_g_local_file_get_filename (G_LOCAL_FILE (destination)), |
64 |
-- FALSE, 0, info, |
65 |
-+ FALSE, G_FILE_CREATE_PRIVATE, info, |
66 |
- cancellable, error); |
67 |
- } |
68 |
- else if (flags & G_FILE_COPY_OVERWRITE) |
69 |
-@@ -3297,12 +3297,13 @@ file_copy_fallback (GFile *source, |
70 |
- out = (GOutputStream *)g_file_replace (destination, |
71 |
- NULL, |
72 |
- flags & G_FILE_COPY_BACKUP, |
73 |
-- G_FILE_CREATE_REPLACE_DESTINATION, |
74 |
-+ G_FILE_CREATE_REPLACE_DESTINATION | |
75 |
-+ G_FILE_CREATE_PRIVATE, |
76 |
- cancellable, error); |
77 |
- } |
78 |
- else |
79 |
- { |
80 |
-- out = (GOutputStream *)g_file_create (destination, 0, cancellable, error); |
81 |
-+ out = (GOutputStream *)g_file_create (destination, G_FILE_CREATE_PRIVATE, cancellable, error); |
82 |
- } |
83 |
- |
84 |
- if (!out) |
85 |
--- |
86 |
-2.20.1 |
87 |
- |
88 |
|
89 |
diff --git a/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch b/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch |
90 |
deleted file mode 100644 |
91 |
index 0828132003d..00000000000 |
92 |
--- a/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch |
93 |
+++ /dev/null |
94 |
@@ -1,120 +0,0 @@ |
95 |
-From 2d655ef8954695cabf9e99cc61411de2bb4cb847 Mon Sep 17 00:00:00 2001 |
96 |
-From: Philip Withnall <withnall@××××××××.com> |
97 |
-Date: Mon, 28 Jan 2019 14:36:42 +0000 |
98 |
-Subject: [PATCH] gdbusmessage: Fix check on upper limit of message size |
99 |
- |
100 |
-There was a typo in the figure checked against. Add a unit test. |
101 |
- |
102 |
-Signed-off-by: Philip Withnall <withnall@××××××××.com> |
103 |
- |
104 |
-https://gitlab.gnome.org/GNOME/glib/issues/1642 |
105 |
---- |
106 |
- gio/gdbusmessage.c | 2 +- |
107 |
- gio/tests/gdbus-message.c | 72 ++++++++++++++++++++++++++++++++++++++- |
108 |
- 2 files changed, 72 insertions(+), 2 deletions(-) |
109 |
- |
110 |
-diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c |
111 |
-index 169e6fd15..2ad51f888 100644 |
112 |
---- a/gio/gdbusmessage.c |
113 |
-+++ b/gio/gdbusmessage.c |
114 |
-@@ -1984,7 +1984,7 @@ g_dbus_message_bytes_needed (guchar *blob, |
115 |
- "Unable to determine message blob length - given blob is malformed"); |
116 |
- } |
117 |
- |
118 |
-- if (ret > (2<<27)) |
119 |
-+ if (ret > (1<<27)) |
120 |
- { |
121 |
- g_set_error (error, |
122 |
- G_IO_ERROR, |
123 |
-diff --git a/gio/tests/gdbus-message.c b/gio/tests/gdbus-message.c |
124 |
-index 88a9c5d86..74e0f712e 100644 |
125 |
---- a/gio/tests/gdbus-message.c |
126 |
-+++ b/gio/tests/gdbus-message.c |
127 |
-@@ -141,6 +141,74 @@ message_copy (void) |
128 |
- |
129 |
- /* ---------------------------------------------------------------------------------------------------- */ |
130 |
- |
131 |
-+/* Test g_dbus_message_bytes_needed() returns correct results for a variety of |
132 |
-+ * arbitrary binary inputs.*/ |
133 |
-+static void |
134 |
-+message_bytes_needed (void) |
135 |
-+{ |
136 |
-+ const struct |
137 |
-+ { |
138 |
-+ const guint8 blob[16]; |
139 |
-+ gssize expected_bytes_needed; |
140 |
-+ } |
141 |
-+ vectors[] = |
142 |
-+ { |
143 |
-+ /* Little endian with header rounding */ |
144 |
-+ { { 'l', 0, 0, 1, /* endianness, message type, flags, protocol version */ |
145 |
-+ 50, 0, 0, 0, /* body length */ |
146 |
-+ 1, 0, 0, 0, /* message serial */ |
147 |
-+ 7, 0, 0, 0 /* header length */}, 74 }, |
148 |
-+ /* Little endian without header rounding */ |
149 |
-+ { { 'l', 0, 0, 1, /* endianness, message type, flags, protocol version */ |
150 |
-+ 50, 0, 0, 0, /* body length */ |
151 |
-+ 1, 0, 0, 0, /* message serial */ |
152 |
-+ 8, 0, 0, 0 /* header length */}, 74 }, |
153 |
-+ /* Big endian with header rounding */ |
154 |
-+ { { 'B', 0, 0, 1, /* endianness, message type, flags, protocol version */ |
155 |
-+ 0, 0, 0, 50, /* body length */ |
156 |
-+ 0, 0, 0, 1, /* message serial */ |
157 |
-+ 0, 0, 0, 7 /* header length */}, 74 }, |
158 |
-+ /* Big endian without header rounding */ |
159 |
-+ { { 'B', 0, 0, 1, /* endianness, message type, flags, protocol version */ |
160 |
-+ 0, 0, 0, 50, /* body length */ |
161 |
-+ 0, 0, 0, 1, /* message serial */ |
162 |
-+ 0, 0, 0, 8 /* header length */}, 74 }, |
163 |
-+ /* Invalid endianness */ |
164 |
-+ { { '!', 0, 0, 1, /* endianness, message type, flags, protocol version */ |
165 |
-+ 0, 0, 0, 50, /* body length */ |
166 |
-+ 0, 0, 0, 1, /* message serial */ |
167 |
-+ 0, 0, 0, 8 /* header length */}, -1 }, |
168 |
-+ /* Oversized */ |
169 |
-+ { { 'l', 0, 0, 1, /* endianness, message type, flags, protocol version */ |
170 |
-+ 0, 0, 0, 0x08, /* body length (128MiB) */ |
171 |
-+ 1, 0, 0, 0, /* message serial */ |
172 |
-+ 7, 0, 0, 0 /* header length */}, -1 }, |
173 |
-+ }; |
174 |
-+ gsize i; |
175 |
-+ |
176 |
-+ for (i = 0; i < G_N_ELEMENTS (vectors); i++) |
177 |
-+ { |
178 |
-+ gssize bytes_needed; |
179 |
-+ GError *local_error = NULL; |
180 |
-+ |
181 |
-+ g_test_message ("Vector: %" G_GSIZE_FORMAT, i); |
182 |
-+ |
183 |
-+ bytes_needed = g_dbus_message_bytes_needed ((guchar *) vectors[i].blob, |
184 |
-+ G_N_ELEMENTS (vectors[i].blob), |
185 |
-+ &local_error); |
186 |
-+ |
187 |
-+ if (vectors[i].expected_bytes_needed < 0) |
188 |
-+ g_assert_error (local_error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT); |
189 |
-+ else |
190 |
-+ g_assert_no_error (local_error); |
191 |
-+ g_assert_cmpint (bytes_needed, ==, vectors[i].expected_bytes_needed); |
192 |
-+ |
193 |
-+ g_clear_error (&local_error); |
194 |
-+ } |
195 |
-+} |
196 |
-+ |
197 |
-+/* ---------------------------------------------------------------------------------------------------- */ |
198 |
-+ |
199 |
- int |
200 |
- main (int argc, |
201 |
- char *argv[]) |
202 |
-@@ -151,6 +219,8 @@ main (int argc, |
203 |
- |
204 |
- g_test_add_func ("/gdbus/message/lock", message_lock); |
205 |
- g_test_add_func ("/gdbus/message/copy", message_copy); |
206 |
-- return g_test_run(); |
207 |
-+ g_test_add_func ("/gdbus/message/bytes-needed", message_bytes_needed); |
208 |
-+ |
209 |
-+ return g_test_run (); |
210 |
- } |
211 |
- |
212 |
--- |
213 |
-2.20.1 |
214 |
- |
215 |
|
216 |
diff --git a/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch |
217 |
deleted file mode 100644 |
218 |
index 7615dbb248b..00000000000 |
219 |
--- a/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch |
220 |
+++ /dev/null |
221 |
@@ -1,124 +0,0 @@ |
222 |
-From 69da419c33c24a05126d21fb3098139d30ba9093 Mon Sep 17 00:00:00 2001 |
223 |
-From: Mart Raudsepp <leio@g.o> |
224 |
-Date: Wed, 19 Dec 2018 14:01:43 +0200 |
225 |
-Subject: [PATCH] build: don't build gdbus-codegen and rely on external |
226 |
- gdbus-codegen for tests |
227 |
- |
228 |
---- |
229 |
- configure.ac | 1 - |
230 |
- docs/reference/gio/Makefile.am | 1 - |
231 |
- gio/Makefile.am | 2 +- |
232 |
- gio/tests/Makefile.am | 22 ++++++------------- |
233 |
- .../gdbus-object-manager-example/Makefile.am | 6 ++--- |
234 |
- 5 files changed, 10 insertions(+), 22 deletions(-) |
235 |
- |
236 |
-diff --git a/configure.ac b/configure.ac |
237 |
-index 4b15b69b8..9187a12bb 100644 |
238 |
---- a/configure.ac |
239 |
-+++ b/configure.ac |
240 |
-@@ -3481,7 +3481,6 @@ gobject/glib-mkenums |
241 |
- gobject/tests/Makefile |
242 |
- gthread/Makefile |
243 |
- gio/Makefile |
244 |
--gio/gdbus-2.0/codegen/Makefile |
245 |
- gio/gdbus-2.0/codegen/config.py |
246 |
- gio/gnetworking.h |
247 |
- gio/xdgmime/Makefile |
248 |
-diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am |
249 |
-index 08093e8a0..9ce11f824 100644 |
250 |
---- a/docs/reference/gio/Makefile.am |
251 |
-+++ b/docs/reference/gio/Makefile.am |
252 |
-@@ -212,7 +212,6 @@ man_MANS += \ |
253 |
- gsettings.1 \ |
254 |
- gresource.1 \ |
255 |
- gdbus.1 \ |
256 |
-- gdbus-codegen.1 \ |
257 |
- gio.1 \ |
258 |
- $(NULL) |
259 |
- |
260 |
-diff --git a/gio/Makefile.am b/gio/Makefile.am |
261 |
-index 05b20cdef..ed5d7d4cb 100644 |
262 |
---- a/gio/Makefile.am |
263 |
-+++ b/gio/Makefile.am |
264 |
-@@ -1,6 +1,6 @@ |
265 |
- include $(top_srcdir)/glib.mk |
266 |
- |
267 |
--SUBDIRS = gdbus-2.0/codegen |
268 |
-+SUBDIRS = |
269 |
- |
270 |
- if OS_UNIX |
271 |
- SUBDIRS += xdgmime |
272 |
-diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am |
273 |
-index c4e7a9257..4b538b1e9 100644 |
274 |
---- a/gio/tests/Makefile.am |
275 |
-+++ b/gio/tests/Makefile.am |
276 |
-@@ -253,9 +253,7 @@ gdbus-daemon-impl.c: $(top_srcdir)/gio/gdbusdaemon.c |
277 |
- # These files are only generated on Windows builds inside GIO, |
278 |
- # but we want them on non-Windows builds for the tests |
279 |
- gdbus-daemon-generated.h gdbus-daemon-generated.c: $(top_srcdir)/gio/dbus-daemon.xml $(GDBUS_PYTHON_DEPS) |
280 |
-- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ |
281 |
-- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ |
282 |
-- $(PYTHON) $(top_srcdir)/gio/gdbus-2.0/codegen/gdbus-codegen.in \ |
283 |
-+ $(AM_V_GEN) gdbus-codegen \ |
284 |
- --interface-prefix org. \ |
285 |
- --generate-c-code gdbus-daemon-generated \ |
286 |
- --c-namespace _G \ |
287 |
-@@ -494,10 +492,8 @@ gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotifica |
288 |
- |
289 |
- BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h gdbus-test-codegen-generated-interface-info.c gdbus-test-codegen-generated-interface-info.h |
290 |
- gdbus-test-codegen.o: gdbus-test-codegen-generated.h gdbus-test-codegen-generated-interface-info.h |
291 |
--gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen |
292 |
-- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ |
293 |
-- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ |
294 |
-- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \ |
295 |
-+gdbus-test-codegen-generated.h: test-codegen.xml Makefile |
296 |
-+ $(AM_V_GEN) gdbus-codegen \ |
297 |
- --interface-prefix org.project. \ |
298 |
- --generate-c-code gdbus-test-codegen-generated \ |
299 |
- --c-generate-object-manager \ |
300 |
-@@ -516,10 +512,8 @@ gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gd |
301 |
- $(NULL) |
302 |
- gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h |
303 |
- @: # Generated as side-effect of .h |
304 |
--gdbus-test-codegen-generated-interface-info.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen |
305 |
-- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ |
306 |
-- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ |
307 |
-- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \ |
308 |
-+gdbus-test-codegen-generated-interface-info.h: test-codegen.xml Makefile |
309 |
-+ $(AM_V_GEN) gdbus-codegen \ |
310 |
- --interface-info-header \ |
311 |
- --annotate "org.project.Bar" Key1 Value1 \ |
312 |
- --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \ |
313 |
-@@ -532,10 +526,8 @@ gdbus-test-codegen-generated-interface-info.h: test-codegen.xml Makefile $(top_b |
314 |
- --output $@ \ |
315 |
- $(srcdir)/test-codegen.xml \ |
316 |
- $(NULL) |
317 |
--gdbus-test-codegen-generated-interface-info.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen |
318 |
-- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ |
319 |
-- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ |
320 |
-- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \ |
321 |
-+gdbus-test-codegen-generated-interface-info.c: test-codegen.xml Makefile |
322 |
-+ $(AM_V_GEN) gdbus-codegen \ |
323 |
- --interface-info-body \ |
324 |
- --annotate "org.project.Bar" Key1 Value1 \ |
325 |
- --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \ |
326 |
-diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am |
327 |
-index 1d0464c5c..0603d9b0a 100644 |
328 |
---- a/gio/tests/gdbus-object-manager-example/Makefile.am |
329 |
-+++ b/gio/tests/gdbus-object-manager-example/Makefile.am |
330 |
-@@ -11,10 +11,8 @@ GDBUS_GENERATED = \ |
331 |
- gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml \ |
332 |
- $(NULL) |
333 |
- |
334 |
--$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen |
335 |
-- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ |
336 |
-- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ |
337 |
-- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \ |
338 |
-+$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile |
339 |
-+ $(AM_V_GEN) gdbus-codegen \ |
340 |
- --interface-prefix org.gtk.GDBus.Example.ObjectManager. \ |
341 |
- --c-namespace Example \ |
342 |
- --c-generate-object-manager \ |
343 |
--- |
344 |
-2.17.0 |
345 |
- |
346 |
|
347 |
diff --git a/dev-libs/glib/glib-2.58.3-r1.ebuild b/dev-libs/glib/glib-2.58.3-r1.ebuild |
348 |
deleted file mode 100644 |
349 |
index bc9c6a10e39..00000000000 |
350 |
--- a/dev-libs/glib/glib-2.58.3-r1.ebuild |
351 |
+++ /dev/null |
352 |
@@ -1,316 +0,0 @@ |
353 |
-# Copyright 1999-2020 Gentoo Authors |
354 |
-# Distributed under the terms of the GNU General Public License v2 |
355 |
- |
356 |
-EAPI=6 |
357 |
-PYTHON_COMPAT=( python{2_7,3_6,3_7} ) |
358 |
-GNOME2_EAUTORECONF=yes |
359 |
- |
360 |
-inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \ |
361 |
- multilib multilib-minimal pax-utils python-any-r1 toolchain-funcs virtualx |
362 |
- |
363 |
-# Until bug #537330 glib is a reverse dependency of pkgconfig and, then |
364 |
-# adding new dependencies end up making stage3 to grow. Every addition needs |
365 |
-# then to be think very closely. |
366 |
- |
367 |
-DESCRIPTION="The GLib library of C routines" |
368 |
-HOMEPAGE="https://www.gtk.org/" |
369 |
-SRC_URI="${SRC_URI} |
370 |
- https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf |
371 |
- |
372 |
-LICENSE="LGPL-2.1+" |
373 |
-SLOT="2" |
374 |
-IUSE="dbus debug fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr" |
375 |
-RESTRICT="!test? ( test )" |
376 |
- |
377 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~amd64-linux ~x86-linux" |
378 |
- |
379 |
-# Added util-linux multilib dependency to have libmount support (which |
380 |
-# is always turned on on linux systems, unless explicitly disabled, but |
381 |
-# this ebuild does not do that anyway) (bug #599586) |
382 |
- |
383 |
-RDEPEND=" |
384 |
- !<dev-util/gdbus-codegen-${PV} |
385 |
- >=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?] |
386 |
- >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] |
387 |
- >=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}] |
388 |
- >=virtual/libintl-0-r2[${MULTILIB_USEDEP}] |
389 |
- >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
390 |
- kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] ) |
391 |
- selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] ) |
392 |
- xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) |
393 |
- fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] ) |
394 |
- utils? ( |
395 |
- >=dev-util/gdbus-codegen-${PV} |
396 |
- virtual/libelf:0= |
397 |
- ) |
398 |
-" |
399 |
-DEPEND="${RDEPEND} |
400 |
- app-text/docbook-xml-dtd:4.1.2 |
401 |
- app-text/docbook-xsl-stylesheets |
402 |
- >=dev-libs/libxslt-1.0 |
403 |
- >=sys-devel/gettext-0.11 |
404 |
- gtk-doc? ( >=dev-util/gtk-doc-1.20 ) |
405 |
- systemtap? ( >=dev-util/systemtap-1.3 ) |
406 |
- ${PYTHON_DEPS} |
407 |
- test? ( |
408 |
- sys-devel/gdb |
409 |
- >=dev-util/gdbus-codegen-${PV} |
410 |
- >=sys-apps/dbus-1.2.14 ) |
411 |
-" |
412 |
-# configure.ac has gtk-doc-am stuff behind m4_ifdef, so we don't need a gtk-doc-am build dep |
413 |
- |
414 |
-# Migration of glib-genmarshal, glib-mkenums and gtester-report to a separate |
415 |
-# python depending package, which can be buildtime depended in packages that |
416 |
-# need these tools, without pulling in python at runtime. |
417 |
-RDEPEND="${RDEPEND} |
418 |
- >=dev-util/glib-utils-${PV}" |
419 |
-PDEPEND=" |
420 |
- dbus? ( gnome-base/dconf ) |
421 |
- mime? ( x11-misc/shared-mime-info ) |
422 |
-" |
423 |
-# shared-mime-info needed for gio/xdgmime, bug #409481 |
424 |
-# dconf is needed to be able to save settings, bug #498436 |
425 |
- |
426 |
-MULTILIB_CHOST_TOOLS=( |
427 |
- /usr/bin/gio-querymodules$(get_exeext) |
428 |
-) |
429 |
- |
430 |
-pkg_setup() { |
431 |
- if use kernel_linux ; then |
432 |
- CONFIG_CHECK="~INOTIFY_USER" |
433 |
- if use test ; then |
434 |
- CONFIG_CHECK="~IPV6" |
435 |
- WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them." |
436 |
- fi |
437 |
- linux-info_pkg_setup |
438 |
- fi |
439 |
- python-any-r1_pkg_setup |
440 |
-} |
441 |
- |
442 |
-src_prepare() { |
443 |
- # Prevent build failure in stage3 where pkgconfig is not available, bug #481056 |
444 |
- mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die |
445 |
- |
446 |
- if use test; then |
447 |
- # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163 |
448 |
- if ! has_version dev-util/desktop-file-utils ; then |
449 |
- ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system," |
450 |
- ewarn "think on installing it to get these tests run." |
451 |
- sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die |
452 |
- sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die |
453 |
- fi |
454 |
- |
455 |
- # gdesktopappinfo requires existing terminal (gnome-terminal or any |
456 |
- # other), falling back to xterm if one doesn't exist |
457 |
- #if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then |
458 |
- # ewarn "Some tests will be skipped due to missing terminal program" |
459 |
- # These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson |
460 |
- # 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 |
461 |
- sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die |
462 |
- # desktop-app-info/launch* might fail similarly |
463 |
- sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die |
464 |
- #fi |
465 |
- |
466 |
- # https://bugzilla.gnome.org/show_bug.cgi?id=722604 |
467 |
- sed -i -e "/timer\/stop/d" glib/tests/timer.c || die |
468 |
- sed -i -e "/timer\/basic/d" glib/tests/timer.c || die |
469 |
- |
470 |
- ewarn "Tests for search-utils have been skipped" |
471 |
- sed -i -e "/search-utils/d" glib/tests/Makefile.am || die |
472 |
- else |
473 |
- # Don't build tests, also prevents extra deps, bug #512022 |
474 |
- sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die |
475 |
- fi |
476 |
- |
477 |
- # gdbus-codegen is a separate package |
478 |
- eapply "${FILESDIR}"/${PN}-2.58.2-external-gdbus-codegen.patch |
479 |
- |
480 |
- # gdbus message upper limit check fix from glib-2-58 |
481 |
- eapply "${FILESDIR}"/${PV}-gdbusmessage-limit-fix.patch |
482 |
- # gfile copy fallback security fix (wrong permissions at start) |
483 |
- eapply "${FILESDIR}"/${PV}-CVE-2019-12450.patch |
484 |
- |
485 |
- # Tarball doesn't come with gtk-doc.make and we can't unconditionally depend on dev-util/gtk-doc due |
486 |
- # to circular deps during bootstramp. If actually not building gtk-doc, an almost empty file will do |
487 |
- # fine as well - this is also what upstream autogen.sh does if gtkdocize is not found. If gtk-doc is |
488 |
- # installed, eautoreconf will call gtkdocize, which overwrites the empty gtk-doc.make with a full copy. |
489 |
- cat > gtk-doc.make << EOF |
490 |
-EXTRA_DIST = |
491 |
-CLEANFILES = |
492 |
-EOF |
493 |
- |
494 |
- gnome2_src_prepare |
495 |
- epunt_cxx |
496 |
-} |
497 |
- |
498 |
-multilib_src_configure() { |
499 |
- # Avoid circular depend with dev-util/pkgconfig and |
500 |
- # native builds (cross-compiles won't need pkg-config |
501 |
- # in the target ROOT to work here) |
502 |
- if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then |
503 |
- if has_version sys-apps/dbus; then |
504 |
- export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include" |
505 |
- export DBUS1_LIBS="-ldbus-1" |
506 |
- fi |
507 |
- export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)" |
508 |
- export LIBFFI_LIBS="-lffi" |
509 |
- export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass |
510 |
- export PCRE_LIBS="-lpcre" |
511 |
- fi |
512 |
- |
513 |
- # These configure tests don't work when cross-compiling. |
514 |
- if tc-is-cross-compiler ; then |
515 |
- # https://bugzilla.gnome.org/show_bug.cgi?id=756473 |
516 |
- case ${CHOST} in |
517 |
- hppa*|metag*) export glib_cv_stack_grows=yes ;; |
518 |
- *) export glib_cv_stack_grows=no ;; |
519 |
- esac |
520 |
- # https://bugzilla.gnome.org/show_bug.cgi?id=756474 |
521 |
- export glib_cv_uscore=no |
522 |
- # https://bugzilla.gnome.org/show_bug.cgi?id=756475 |
523 |
- export ac_cv_func_posix_get{pwuid,grgid}_r=yes |
524 |
- fi |
525 |
- |
526 |
- local myconf |
527 |
- |
528 |
- case "${CHOST}" in |
529 |
- *-mingw*) myconf="${myconf} --with-threads=win32" ;; |
530 |
- *) myconf="${myconf} --with-threads=posix" ;; |
531 |
- esac |
532 |
- |
533 |
- # libelf used only by the gresource bin |
534 |
- ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \ |
535 |
- $(usex debug --enable-debug=yes ' ') \ |
536 |
- $(use_enable xattr) \ |
537 |
- $(use_enable fam) \ |
538 |
- $(multilib_native_use_enable gtk-doc) \ |
539 |
- $(use_enable kernel_linux libmount) \ |
540 |
- $(use_enable selinux) \ |
541 |
- $(use_enable static-libs static) \ |
542 |
- $(use_enable systemtap dtrace) \ |
543 |
- $(use_enable systemtap systemtap) \ |
544 |
- $(multilib_native_use_enable utils libelf) \ |
545 |
- --with-python=${EPYTHON} \ |
546 |
- --disable-compile-warnings \ |
547 |
- --enable-man \ |
548 |
- --with-pcre=system \ |
549 |
- --with-xml-catalog="${EPREFIX}/etc/xml/catalog" |
550 |
- |
551 |
- if multilib_is_native_abi; then |
552 |
- local d |
553 |
- for d in glib gio gobject; do |
554 |
- ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die |
555 |
- done |
556 |
- fi |
557 |
-} |
558 |
- |
559 |
-multilib_src_test() { |
560 |
- export XDG_CONFIG_DIRS=/etc/xdg |
561 |
- export XDG_DATA_DIRS=/usr/local/share:/usr/share |
562 |
- export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp" |
563 |
- export LC_TIME=C # bug #411967 |
564 |
- unset GSETTINGS_BACKEND # bug #596380 |
565 |
- python_setup |
566 |
- |
567 |
- # Related test is a bit nitpicking |
568 |
- mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" |
569 |
- chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" |
570 |
- |
571 |
- # Hardened: gdb needs this, bug #338891 |
572 |
- if host-is-pax ; then |
573 |
- pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \ |
574 |
- || die "Hardened adjustment failed" |
575 |
- fi |
576 |
- |
577 |
- # Need X for dbus-launch session X11 initialization |
578 |
- virtx emake check |
579 |
-} |
580 |
- |
581 |
-multilib_src_install() { |
582 |
- emake DESTDIR="${D}" completiondir="$(get_bashcompdir)" install |
583 |
- keepdir /usr/$(get_libdir)/gio/modules |
584 |
-} |
585 |
- |
586 |
-multilib_src_install_all() { |
587 |
- einstalldocs |
588 |
- |
589 |
- # These are installed by dev-util/glib-utils |
590 |
- # 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 with meson |
591 |
- rm "${ED}usr/bin/glib-genmarshal" || die |
592 |
- rm "${ED}usr/share/man/man1/glib-genmarshal.1" || die |
593 |
- rm "${ED}usr/bin/glib-mkenums" || die |
594 |
- rm "${ED}usr/share/man/man1/glib-mkenums.1" || die |
595 |
- rm "${ED}usr/bin/gtester-report" || die |
596 |
- rm "${ED}usr/share/man/man1/gtester-report.1" || die |
597 |
- |
598 |
- # Do not install charset.alias even if generated, leave it to libiconv |
599 |
- rm -f "${ED}/usr/$(get_libdir)/charset.alias" |
600 |
- |
601 |
- # Don't install gdb python macros, bug 291328 |
602 |
- rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/" |
603 |
- |
604 |
- # Completely useless with or without USE static-libs, people need to use pkg-config |
605 |
- find "${ED}" -name '*.la' -delete || die |
606 |
-} |
607 |
- |
608 |
-pkg_preinst() { |
609 |
- gnome2_pkg_preinst |
610 |
- |
611 |
- # Make gschemas.compiled belong to glib alone |
612 |
- local cache="usr/share/glib-2.0/schemas/gschemas.compiled" |
613 |
- |
614 |
- if [[ -e ${EROOT}${cache} ]]; then |
615 |
- cp "${EROOT}"${cache} "${ED}"/${cache} || die |
616 |
- else |
617 |
- touch "${ED}"/${cache} || die |
618 |
- fi |
619 |
- |
620 |
- multilib_pkg_preinst() { |
621 |
- # Make giomodule.cache belong to glib alone |
622 |
- local cache="usr/$(get_libdir)/gio/modules/giomodule.cache" |
623 |
- |
624 |
- if [[ -e ${EROOT}${cache} ]]; then |
625 |
- cp "${EROOT}"${cache} "${ED}"/${cache} || die |
626 |
- else |
627 |
- touch "${ED}"/${cache} || die |
628 |
- fi |
629 |
- } |
630 |
- |
631 |
- # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache |
632 |
- # file due to inability to create it and GIO might not look at any of the modules there |
633 |
- if ! tc-is-cross-compiler ; then |
634 |
- multilib_foreach_abi multilib_pkg_preinst |
635 |
- fi |
636 |
-} |
637 |
- |
638 |
-pkg_postinst() { |
639 |
- # force (re)generation of gschemas.compiled |
640 |
- GNOME2_ECLASS_GLIB_SCHEMAS="force" |
641 |
- |
642 |
- gnome2_pkg_postinst |
643 |
- |
644 |
- multilib_pkg_postinst() { |
645 |
- gnome2_giomodule_cache_update \ |
646 |
- || die "Update GIO modules cache failed (for ${ABI})" |
647 |
- } |
648 |
- if ! tc-is-cross-compiler ; then |
649 |
- multilib_foreach_abi multilib_pkg_postinst |
650 |
- else |
651 |
- ewarn "Updating of GIO modules cache skipped due to cross-compilation." |
652 |
- ewarn "You might want to run gio-querymodules manually on the target for" |
653 |
- ewarn "your final image for performance reasons and re-run it when packages" |
654 |
- ewarn "installing GIO modules get upgraded or added to the image." |
655 |
- fi |
656 |
-} |
657 |
- |
658 |
-pkg_postrm() { |
659 |
- gnome2_pkg_postrm |
660 |
- |
661 |
- if [[ -z ${REPLACED_BY_VERSION} ]]; then |
662 |
- multilib_pkg_postrm() { |
663 |
- rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache |
664 |
- } |
665 |
- multilib_foreach_abi multilib_pkg_postrm |
666 |
- rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled |
667 |
- fi |
668 |
-} |