Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
Date: Wed, 29 Mar 2017 16:48:08
Message-Id: 1490806042.7196e3be28e9ff7821b5757c88c78f1ff62ed7cf.lluixhi@gentoo
1 commit: 7196e3be28e9ff7821b5757c88c78f1ff62ed7cf
2 Author: Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de>
3 AuthorDate: Wed Mar 29 14:37:29 2017 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Wed Mar 29 16:47:22 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7196e3be
7
8 dev-libs/glib: include additional patches
9
10 dev-libs/glib/Manifest | 6 +-
11 dev-libs/glib/files/glib-2.48.2-musl-glibmm.patch | 47 -----------
12 .../files/glib-2.50.3-fix-gdatetime-tests.patch | 52 +++++++++++++
13 dev-libs/glib/files/gobject_init_on_demand.patch | 91 ++++++++++++++++++++++
14 dev-libs/glib/files/quark_init_on_demand.patch | 77 ++++++++++++++++++
15 dev-libs/glib/glib-2.48.2.ebuild | 6 +-
16 6 files changed, 228 insertions(+), 51 deletions(-)
17
18 diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
19 index 4f1405f..f9f4e55 100644
20 --- a/dev-libs/glib/Manifest
21 +++ b/dev-libs/glib/Manifest
22 @@ -1,6 +1,8 @@
23 AUX glib-2.40.0-external-gdbus-codegen.patch 3901 SHA256 d06d2775c3632212c11eceb715f0da6a3b1ab6d8d901bb2fcb7c1fc3ca6b004a SHA512 2f960a53cf51f809af6788664e2cd6d67a29eb58dfe34156f665e2d5ae1fd53a3c792714672fc82dcbfae38e1c793a3eef07116484511ef21d96536559339b00 WHIRLPOOL 39dc4d38e6a3450cbba3a1843096da330b6b2bc8954b9cce4a890454e5546d3e6440ddd237772407bd4ffec05b78eb6ddddb5c4cb6c86a86e01a5ad4c96fe8b0
24 -AUX glib-2.48.2-musl-glibmm.patch 1496 SHA256 17cd23f9bea7eaa0ed4c3a83e894392d3d6824a462790cb1e3b6f10d591b9448 SHA512 6656b6c40366c43e48916a1851319f0a6b939ae5f1c78b9496930f47b566ab17924ee031ed6a0ea9beb8a4b1fc37b66ef1784b4a95a890dd71410717175509e7 WHIRLPOOL afc16f2a772a474f92eec77d666b88c88b6a96e2ded4b1e4e02f824bea7a903ead48ed2cdc1ab0f273f7e1d492e99bb5ae5e3545ffa3318e2fe56538d0a55d85
25 +AUX glib-2.50.3-fix-gdatetime-tests.patch 2052 SHA256 182695950e34356f3d97005cd0120d3a0ed1e485ec97b86b0c121a72c418c7b5 SHA512 7701cd1116626ef2b5a79e0d31f4c445a609b8b4481745f443fbac290670c776fbf4196a33a80629bf13bd9e405579715758e6c7ffcee72b6129d444d1dfa724 WHIRLPOOL 19f0193c57d2a4de5b1429ee3171c554e43aaadbc53e2f1471803a8b3c32c8ac6cd0ff5d5ed4ff46bb2923b09f97a354b2a3ae0989a633f2757c250a5b80a2f7
26 +AUX gobject_init_on_demand.patch 2113 SHA256 ffb30a240f23ee76dff0fc1ecc155288ea8bb976e814cc52e55c025e7ab792d0 SHA512 4281f0e1405618c593988b549b34f66bc530c2d3196364e0a387ca8f61fdd75065b40b039afc0711f73a8fcf5f9483f1d3c57fe3154bae9bc72243ede3bd239e WHIRLPOOL a7090b51c28421e7c600b495665a47866554e317810abce07dfa07070a7887655d09ac12c04b0dbb30ab442b22175849f49e433f25f3ef41b519de6bf49f42a6
27 +AUX quark_init_on_demand.patch 1725 SHA256 e09d8e723752c1f36b7451b244bbe4dd9b5c39ff0dcd5a778ddbfe93c5343ef5 SHA512 29311855d0058b8171914542304d04536c83cca265f094f9d537b6e9c2e2d71a5975967bb2743c4fa3a6c569c058c0c21b78dfaa0c9c3ce8aed7f474678a53d9 WHIRLPOOL 71bb85a258417014cd4ab7dbcc16779ef222408be37e590f9f67dfb2dbbf6bfefb9ce8ac1d0097216b6d92fb69c9c846678d7f71f5f45ab8de07f6b88f6c8ff0
28 DIST glib-2.48.2.tar.xz 6408644 SHA256 f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4 SHA512 2eac104eb2207d0a6488992e48069a34b417f51e141364f281ab7b0953a6de88be177b1c694dd9464a856c9a5d8021e3cf0193a8d9c5aaf6ea11f1f9ff743c43 WHIRLPOOL cba211000d5597e93d01113e5f2b6736e47f4daa00935a53af182b3304fef9a1ac25f78995c7a53cc1234261433a1bbd1ec751c87b556845a15da720af5b971b
29 DIST pkg-config-0.28.tar.gz 1931203 SHA256 6b6eb31c6ec4421174578652c7e141fdaae2dabad1021f420d8713206ac1f845 SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320 WHIRLPOOL db4ddb4ce61724e629931c5ffccb4d7a551b4dc0f4efed5a966822307e4b5a786adee5705dd80ec0a9aa32cb1af9ad9615e307360e131fc34688207216161486
30 -EBUILD glib-2.48.2.ebuild 8617 SHA256 2b64e2ebb7ecc6eda84de3254e5ce8ae984b60ddc3c54e20652059ec2eded32d SHA512 ea1327f401eae1ad945602e4e686a396ff6c90115beb161e6703fd102f534ef3e02104abdf9d9404307f66997fca2500013e63967f698dbd0e290a5c073b2e56 WHIRLPOOL f58d2c94fea90aef272e0009a5da9b01f216df26432b390c421985804bb19ba03a47c95b29d2e2a2e103bbc1a65af65154ba9e3aa6332629df66a03600daec51
31 +EBUILD glib-2.48.2.ebuild 8727 SHA256 a2baeca411a6c6755d42e1ab144466ae71502fbebefdf8c2511b615575c9589a SHA512 3f853481a142967e494fb88b1798c429b05ab81fa6d71e39a0d021ea1bbf24eda73ef5abdac4c4bcb0ebfd170ec261a658a5f4a40802dd5d1dcff4f941efe10a WHIRLPOOL 6d0063403a73bb3502b58520a349c828ebc991b4f7a2c06f0f5de2a6519e04431f1e0a1a9f7f45df8e149d360ea4f22f8db2f8154ea8f0f9bbe657c2d7e71af4
32 MISC metadata.xml 955 SHA256 424ffc685dcfdfa5dcb142046d937915d07945217db814ff759b9b736d67f9e4 SHA512 31b87bd850ffaa3f2263e6435d2929ef9f8f979e6fe6cff86433c8841dc383088bc6d672ac7daf94c1ef660767d0e91a03860267df9c750dcde3204dd6631cb1 WHIRLPOOL cf59bd50dcfcc466ad19a81f458875b7e62fc569cda4f730defdbed72f0112395b332b52574c5794539c8e0255f7abaa9e7f14a9c5bb5fd6048ad3c4c35991c8
33
34 diff --git a/dev-libs/glib/files/glib-2.48.2-musl-glibmm.patch b/dev-libs/glib/files/glib-2.48.2-musl-glibmm.patch
35 deleted file mode 100644
36 index 818ccf1..0000000
37 --- a/dev-libs/glib/files/glib-2.48.2-musl-glibmm.patch
38 +++ /dev/null
39 @@ -1,47 +0,0 @@
40 -From 424c077cde206acdbb4d2c072513dc9bc8e850a4 Mon Sep 17 00:00:00 2001
41 -From: Natanael Copa <ncopa@×××××××××××.org>
42 -Date: Wed, 6 Jul 2016 12:38:40 +0200
43 -Subject: [PATCH 3/3] gquark: fix initialization with c++ constructors
44 -
45 -C++ constructors may want create new quarks, but we can not guarantee
46 -that the glib library ctor is executed first. Therefore we make sure
47 -that quarks are always initialized from g_quark_from_string and
48 -g_quark_from_static_string
49 -
50 -This fixes crashes in glibmm with musl which likely happens on AIX too.
51 -
52 -https://bugzilla.gnome.org/show_bug.cgi?id=768215
53 -https://bugzilla.gnome.org/show_bug.cgi?id=756139#c14
54 ----
55 - glib/gquark.c | 8 ++++++++
56 - 1 file changed, 8 insertions(+)
57 -
58 -diff --git a/glib/gquark.c b/glib/gquark.c
59 -index e79ec9e..e93281e 100644
60 ---- a/glib/gquark.c
61 -+++ b/glib/gquark.c
62 -@@ -57,6 +57,11 @@ static gint quark_block_offset = 0;
63 - void
64 - g_quark_init (void)
65 - {
66 -+ /* we may be initialized from c++ constructor or the glib ctor, but we
67 -+ cannot guarantee in what order. So we check if we have been initialized */
68 -+ if (quark_ht != NULL)
69 -+ return;
70 -+
71 - g_assert (quark_seq_id == 0);
72 - quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
73 - quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
74 -@@ -182,6 +187,9 @@ quark_from_string (const gchar *string,
75 - return 0;
76 -
77 - G_LOCK (quark_global);
78 -+ if (G_UNLIKELY (quark_ht == NULL))
79 -+ g_quark_init();
80 -+
81 - quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
82 -
83 - if (!quark)
84 ---
85 -2.9.0
86 -
87
88 diff --git a/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
89 new file mode 100644
90 index 0000000..6c41c5c
91 --- /dev/null
92 +++ b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
93 @@ -0,0 +1,52 @@
94 +From ec02a1875f29ecb8e46c0d8c1403cd00a0b3a9e4 Mon Sep 17 00:00:00 2001
95 +From: Iain Lane <iain@××××××××××××××××.uk>
96 +Date: Mon, 13 Mar 2017 16:52:11 +0000
97 +Subject: [PATCH] tests/gdatetime: Use a real rather than invented timezone
98 +
99 +The tzdata maintainers had previously invented abbreviations for
100 +timezones. As of their 2017a release, the one we were testing ("BRT")
101 +has been dropped.
102 +
103 +Switch to testing PST, which is a real timezone abbreviation.
104 +
105 +https://bugzilla.gnome.org/show_bug.cgi?id=779799
106 +---
107 + glib/tests/gdatetime.c | 12 ++++++------
108 + 1 file changed, 6 insertions(+), 6 deletions(-)
109 +
110 +diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
111 +index dcb8a8f..c54031d 100644
112 +--- a/glib/tests/gdatetime.c
113 ++++ b/glib/tests/gdatetime.c
114 +@@ -635,22 +635,22 @@ test_GDateTime_new_full (void)
115 + g_date_time_unref (dt);
116 +
117 + #ifdef G_OS_UNIX
118 +- tz = g_time_zone_new ("America/Recife");
119 ++ tz = g_time_zone_new ("America/Tijuana");
120 + #elif defined G_OS_WIN32
121 +- tz = g_time_zone_new ("E. South America Standard Time");
122 ++ tz = g_time_zone_new ("Pacific Standard Time");
123 + #endif
124 +- dt = g_date_time_new (tz, 2010, 5, 24, 8, 4, 0);
125 ++ dt = g_date_time_new (tz, 2010, 11, 24, 8, 4, 0);
126 + g_time_zone_unref (tz);
127 + g_assert_cmpint (2010, ==, g_date_time_get_year (dt));
128 +- g_assert_cmpint (5, ==, g_date_time_get_month (dt));
129 ++ g_assert_cmpint (11, ==, g_date_time_get_month (dt));
130 + g_assert_cmpint (24, ==, g_date_time_get_day_of_month (dt));
131 + g_assert_cmpint (8, ==, g_date_time_get_hour (dt));
132 + g_assert_cmpint (4, ==, g_date_time_get_minute (dt));
133 + g_assert_cmpint (0, ==, g_date_time_get_second (dt));
134 + #ifdef G_OS_UNIX
135 +- g_assert_cmpstr ("BRT", ==, g_date_time_get_timezone_abbreviation (dt));
136 ++ g_assert_cmpstr ("PST", ==, g_date_time_get_timezone_abbreviation (dt));
137 + #elif defined G_OS_WIN32
138 +- g_assert_cmpstr ("E. South America Standard Time", ==,
139 ++ g_assert_cmpstr ("Pacific Standard Time", ==,
140 + g_date_time_get_timezone_abbreviation (dt));
141 + #endif
142 + g_assert (!g_date_time_is_daylight_savings (dt));
143 +--
144 +2.10.1
145 +
146
147 diff --git a/dev-libs/glib/files/gobject_init_on_demand.patch b/dev-libs/glib/files/gobject_init_on_demand.patch
148 new file mode 100644
149 index 0000000..024e588
150 --- /dev/null
151 +++ b/dev-libs/glib/files/gobject_init_on_demand.patch
152 @@ -0,0 +1,91 @@
153 +Initialize the gobject system on demand, i.e. before it is
154 +expected to be initialized. Do this only once by checking
155 +a local static variable gobject_initialized.
156 +
157 +--- a/gobject/gtype.c 2016-08-17 17:20:47.000000000 +0200
158 ++++ b/gobject/gtype.c 2016-09-01 21:56:31.777406646 +0200
159 +@@ -209,6 +209,9 @@
160 + static gboolean type_node_is_a_L (TypeNode *node,
161 + TypeNode *iface_node);
162 +
163 ++#if !defined(__GLIBC__)
164 ++static void gobject_init (void);
165 ++#endif
166 +
167 + /* --- enumeration --- */
168 +
169 +@@ -2631,7 +2634,10 @@
170 + GTypeFlags flags)
171 + {
172 + TypeNode *node;
173 +-
174 ++
175 ++#if !defined(__GLIBC__)
176 ++ gobject_init();
177 ++#endif
178 + g_assert_type_system_initialized ();
179 + g_return_val_if_fail (type_id > 0, 0);
180 + g_return_val_if_fail (type_name != NULL, 0);
181 +@@ -2749,6 +2755,9 @@
182 + TypeNode *pnode, *node;
183 + GType type = 0;
184 +
185 ++#if !defined(__GLIBC__)
186 ++ gobject_init();
187 ++#endif
188 + g_assert_type_system_initialized ();
189 + g_return_val_if_fail (parent_type > 0, 0);
190 + g_return_val_if_fail (type_name != NULL, 0);
191 +@@ -2804,6 +2813,9 @@
192 + TypeNode *pnode, *node;
193 + GType type;
194 +
195 ++#if !defined(__GLIBC__)
196 ++ gobject_init();
197 ++#endif
198 + g_assert_type_system_initialized ();
199 + g_return_val_if_fail (parent_type > 0, 0);
200 + g_return_val_if_fail (type_name != NULL, 0);
201 +@@ -3319,6 +3331,9 @@
202 + {
203 + TypeNode *node;
204 +
205 ++#if !defined(__GLIBC__)
206 ++ gobject_init();
207 ++#endif
208 + g_assert_type_system_initialized ();
209 +
210 + node = lookup_type_node_I (type);
211 +@@ -4343,6 +4358,9 @@
212 + void
213 + g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
214 + {
215 ++#if !defined(__GLIBC__)
216 ++ gobject_init();
217 ++#endif
218 + g_assert_type_system_initialized ();
219 +
220 + if (debug_flags)
221 +@@ -4361,6 +4379,9 @@
222 + void
223 + g_type_init (void)
224 + {
225 ++#if !defined(__GLIBC__)
226 ++ gobject_init();
227 ++#endif
228 + g_assert_type_system_initialized ();
229 + }
230 +
231 +@@ -4372,6 +4393,12 @@
232 + TypeNode *node;
233 + GType type;
234 +
235 ++#if !defined(__GLIBC__)
236 ++ static int gobject_initialized = 0;
237 ++ if (gobject_initialized)
238 ++ return;
239 ++ gobject_initialized = 1;
240 ++#endif
241 + /* Ensure GLib is initialized first, see
242 + * https://bugzilla.gnome.org/show_bug.cgi?id=756139
243 + */
244
245 diff --git a/dev-libs/glib/files/quark_init_on_demand.patch b/dev-libs/glib/files/quark_init_on_demand.patch
246 new file mode 100644
247 index 0000000..4c07fa7
248 --- /dev/null
249 +++ b/dev-libs/glib/files/quark_init_on_demand.patch
250 @@ -0,0 +1,77 @@
251 +musl does not run ctors in the assumed order that glib-2.46 expects.
252 +Call g_quark_init() where it is expected to have been called.
253 +
254 +
255 +--- a/glib/gquark.c 2016-08-17 17:20:47.000000000 +0200
256 ++++ b/glib/gquark.c 2016-08-30 07:49:13.298234757 +0200
257 +@@ -57,6 +57,9 @@
258 + void
259 + g_quark_init (void)
260 + {
261 ++ if (quark_ht)
262 ++ return;
263 ++
264 + g_assert (quark_seq_id == 0);
265 + quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
266 + quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
267 +@@ -138,9 +141,12 @@
268 + return 0;
269 +
270 + G_LOCK (quark_global);
271 ++#if !defined(__GLIBC__)
272 ++ g_quark_init ();
273 ++#endif
274 + quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
275 + G_UNLOCK (quark_global);
276 +
277 + return quark;
278 + }
279 +
280 +@@ -209,6 +213,9 @@
281 + return 0;
282 +
283 + G_LOCK (quark_global);
284 ++#if !defined(__GLIBC__)
285 ++ g_quark_init ();
286 ++#endif
287 + quark = quark_from_string (string, TRUE);
288 + G_UNLOCK (quark_global);
289 +
290 +@@ -243,6 +248,9 @@
291 + return 0;
292 +
293 + G_LOCK (quark_global);
294 ++#if !defined(__GLIBC__)
295 ++ g_quark_init ();
296 ++#endif
297 + quark = quark_from_string (string, FALSE);
298 + G_UNLOCK (quark_global);
299 +
300 +@@ -280,6 +286,7 @@
301 + GQuark quark;
302 + gchar **quarks_new;
303 +
304 ++ g_quark_init ();
305 + if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
306 + {
307 + quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
308 +@@ -323,6 +330,9 @@
309 + return NULL;
310 +
311 + G_LOCK (quark_global);
312 ++#if !defined(__GLIBC__)
313 ++ g_quark_init ();
314 ++#endif
315 + quark = quark_from_string (string, TRUE);
316 + result = quarks[quark];
317 + G_UNLOCK (quark_global);
318 +@@ -353,6 +361,9 @@
319 + return NULL;
320 +
321 + G_LOCK (quark_global);
322 ++#if !defined(__GLIBC__)
323 ++ g_quark_init ();
324 ++#endif
325 + quark = quark_from_string (string, FALSE);
326 + result = quarks[quark];
327 + G_UNLOCK (quark_global);
328
329 diff --git a/dev-libs/glib/glib-2.48.2.ebuild b/dev-libs/glib/glib-2.48.2.ebuild
330 index dbcb2ca..707a4f6 100644
331 --- a/dev-libs/glib/glib-2.48.2.ebuild
332 +++ b/dev-libs/glib/glib-2.48.2.ebuild
333 @@ -1,6 +1,5 @@
334 # Copyright 1999-2017 Gentoo Foundation
335 # Distributed under the terms of the GNU General Public License v2
336 -# $Id$
337
338 # Until bug #537330 glib is a reverse dependency of pkgconfig and, then
339 # adding new dependencies end up making stage3 to grow. Every addition needs
340 @@ -84,7 +83,8 @@ pkg_setup() {
341
342 src_prepare() {
343 # Fix for MUSL
344 - epatch "${FILESDIR}"/${P}-musl-glibmm.patch
345 + eapply "${FILESDIR}"/quark_init_on_demand.patch
346 + eapply "${FILESDIR}"/gobject_init_on_demand.patch
347
348 # Prevent build failure in stage3 where pkgconfig is not available, bug #481056
349 mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
350 @@ -116,6 +116,8 @@ src_prepare() {
351 sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
352 fi
353
354 + eapply "${FILESDIR}"/${PN}-2.50.3-fix-gdatetime-tests.patch
355 +
356 # gdbus-codegen is a separate package
357 eapply "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch