public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2016-11-09  4:22 Aric Belsito
  0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2016-11-09  4:22 UTC (permalink / raw
  To: gentoo-commits

commit:     73a9861eb5c15986da7938487e050494cabb1de7
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Nov  9 01:17:36 2016 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Nov  9 01:17:36 2016 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=73a9861e

dev-libs/glib: Add 2.46.2-r3

The 2.46.x series was buggy, but unfortunately it's marked stable right now.

 dev-libs/glib/Manifest                             |   9 +
 .../files/glib-2.40.0-external-gdbus-codegen.patch |  95 ++++++
 .../glib-2.46.2-fix-gstrerror-on-non-glibc.patch   |  30 ++
 dev-libs/glib/files/glib-2.46.2-memleak.patch      |  25 ++
 dev-libs/glib/files/glib-2.46.2-musl.patch         |  98 +++++++
 .../files/glib-2.48.0-GContextSpecificGroup.patch  |  44 +++
 dev-libs/glib/glib-2.46.2-r3.ebuild                | 323 +++++++++++++++++++++
 dev-libs/glib/metadata.xml                         |  23 ++
 8 files changed, 647 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
new file mode 100644
index 0000000..d9075ac
--- /dev/null
+++ b/dev-libs/glib/Manifest
@@ -0,0 +1,9 @@
+AUX glib-2.40.0-external-gdbus-codegen.patch 3901 SHA256 d06d2775c3632212c11eceb715f0da6a3b1ab6d8d901bb2fcb7c1fc3ca6b004a SHA512 2f960a53cf51f809af6788664e2cd6d67a29eb58dfe34156f665e2d5ae1fd53a3c792714672fc82dcbfae38e1c793a3eef07116484511ef21d96536559339b00 WHIRLPOOL 39dc4d38e6a3450cbba3a1843096da330b6b2bc8954b9cce4a890454e5546d3e6440ddd237772407bd4ffec05b78eb6ddddb5c4cb6c86a86e01a5ad4c96fe8b0
+AUX glib-2.46.2-fix-gstrerror-on-non-glibc.patch 844 SHA256 2c4c622cf7a7236c73b4665ed3b202dbf6236bb11bdacf17b3cba023f90b280c SHA512 262f1d0314a8292c447d5561695b71ae9e27aabe3d94f2a40d78910ee93dd02b1f12ea515ae9c04c75c5ede9e256bf01a427090fdc005738d12d8aa1a0f594d0 WHIRLPOOL 5ea3133b31c523e220190e4157914e1dfa1cd599db8e02c0dfb8fc78378a0b0eb011234769814dfa1c91580967780b1f1225b91794e98759c16d1e9ef6f7fb2e
+AUX glib-2.46.2-memleak.patch 711 SHA256 baa9a70ea17bc0f78bc4c8353af28cc22fd16a1a94e5898757a87bddffd8762e SHA512 f6a52034744b3725ffd7219abbd9df8dfb562d31db2f846a86352a2481e8f5ae28b77a0bd2a19955e17c7ec9de7723a495367be051dc568d3498521ff58c4be6 WHIRLPOOL 0ded676353a97e327901ea66a8ddf85156c85143d19a4a3786d24e90ceed0fe36fef1effdeaa648b0404e58930c1ba2df6a65ea7e8a106bb3e84ea0a6b610609
+AUX glib-2.46.2-musl.patch 2497 SHA256 a9449e3f36725cdf19931fb0987de65779decb6a0fb214d384a1b32f17aeb036 SHA512 30b46bb13749d2879f84e1980fbaccb381fffe29c8d07ed0825ddc07421778cbf77896e18cb0bc1ebf9d0ff9c95064f05de81e5d78df2b9660117f6e85aa9adb WHIRLPOOL e24a6b68748330b0c62ad362aa6df2989511ddc86cd5aec582883b87ff1b6825d975f1f12126ba85fa6871d1a2f343b7a5057b81b23ce69da3dbb8f24708c94f
+AUX glib-2.48.0-GContextSpecificGroup.patch 1637 SHA256 3e0e6250775482357cd8727ad270a473be7c24431afa5445f9ac4214802a8fad SHA512 ed850d1455ac619ea97c8a82eb7f6a768882e9e1dbdfcffcf143cf3cddd46ea073d6b25c811eaa14a789d06f4cc2cf13c09541565eb34ed9bf616c8dea825e45 WHIRLPOOL 004196759130baeba4b4e72601dfaa25bf8c0e49b1d09222b21a6c51b9c84b6bf6b799bbfedf931d3eabbad91371017b5c61799c879d99aabaaf3cdaf11cbf0e
+DIST glib-2.46.2.tar.xz 7344636 SHA256 5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db SHA512 8b5298712710d77b4a47367071f782d2bb3042b149ec8fde8c065f80bf3c5375c94318d19665c0092572e4895e590231a47324d25f371310f02b43feb3009588 WHIRLPOOL 700b69360110351544780ace4dcb14f29505f63d8840882532a4b7c017860b6da86e09cbabca691b7b24cb08b8722e772555de044b8b21e4b0952c8a8e4e6ecb
+DIST pkg-config-0.28.tar.gz 1931203 SHA256 6b6eb31c6ec4421174578652c7e141fdaae2dabad1021f420d8713206ac1f845 SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320 WHIRLPOOL db4ddb4ce61724e629931c5ffccb4d7a551b4dc0f4efed5a966822307e4b5a786adee5705dd80ec0a9aa32cb1af9ad9615e307360e131fc34688207216161486
+EBUILD glib-2.46.2-r3.ebuild 10585 SHA256 c10f4010878f10ef32fb3b6d4331a37dfbf2eb94ab06d40ecf7e35a5537258e2 SHA512 b5bc42c6d6a42dfad750cf1ef4c3cfc9f19bb79777ba3846b0a797d0c75d25444114cd9698cf5e4291bfdd3cc2046fac8b45ed39ae54c59cd3e5354588fbeca7 WHIRLPOOL 7869514a3ba96faf4d98f0cd9e1018175bbba3568ac1948b5ee607452f8a863d675ddc2790b513fa7d7211595e2829a167803097fbabd71434b7c0556656d9fe
+MISC metadata.xml 955 SHA256 424ffc685dcfdfa5dcb142046d937915d07945217db814ff759b9b736d67f9e4 SHA512 31b87bd850ffaa3f2263e6435d2929ef9f8f979e6fe6cff86433c8841dc383088bc6d672ac7daf94c1ef660767d0e91a03860267df9c750dcde3204dd6631cb1 WHIRLPOOL cf59bd50dcfcc466ad19a81f458875b7e62fc569cda4f730defdbed72f0112395b332b52574c5794539c8e0255f7abaa9e7f14a9c5bb5fd6048ad3c4c35991c8

diff --git a/dev-libs/glib/files/glib-2.40.0-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.40.0-external-gdbus-codegen.patch
new file mode 100644
index 0000000..50a9370
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.40.0-external-gdbus-codegen.patch
@@ -0,0 +1,95 @@
+diff --git a/configure.ac b/configure.ac
+index a01e58d..59d4527 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -367,14 +367,14 @@ AC_SUBST(PERL_PATH)
+ # option to specify python interpreter to use; this just sets $PYTHON, so that
+ # we will fallback to reading $PYTHON if --with-python is not given, and
+ # python.m4 will get the expected input
+-AC_ARG_WITH(python,
+-            AS_HELP_STRING([--with-python=PATH],
+-                           [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]),
+-            [PYTHON="$withval"], [])
+-if test x"$PYTHON" = xyes; then
+-  AC_MSG_ERROR([--with-python option requires a path or program argument])
+-fi
+-AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5")
++# AC_ARG_WITH(python,
++#             AS_HELP_STRING([--with-python=PATH],
++#                            [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]),
++#             [PYTHON="$withval"], [])
++# if test x"$PYTHON" = xyes; then
++#   AC_MSG_ERROR([--with-python option requires a path or program argument])
++# fi
++# AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5")
+ 
+ 
+ dnl ***********************
+@@ -3580,7 +3580,6 @@ gobject/glib-mkenums
+ gobject/tests/Makefile
+ gthread/Makefile
+ gio/Makefile
+-gio/gdbus-2.0/codegen/Makefile
+ gio/gdbus-2.0/codegen/config.py
+ gio/gnetworking.h
+ gio/xdgmime/Makefile
+diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
+index 47fdd38..c7eb136 100644
+--- a/docs/reference/gio/Makefile.am
++++ b/docs/reference/gio/Makefile.am
+@@ -157,8 +157,7 @@ man_MANS +=			\
+ 	glib-compile-resources.1	\
+ 	gsettings.1		\
+ 	gresource.1		\
+-	gdbus.1			\
+-	gdbus-codegen.1
++	gdbus.1
+ 
+ XSLTPROC_FLAGS = \
+         --nonet \
+diff --git a/gio/Makefile.am b/gio/Makefile.am
+index e993e2f..025ad94 100644
+--- a/gio/Makefile.am
++++ b/gio/Makefile.am
+@@ -1,6 +1,6 @@
+ include $(top_srcdir)/glib.mk
+ 
+-SUBDIRS = gdbus-2.0/codegen
++SUBDIRS =
+ 
+ if OS_UNIX
+ SUBDIRS += xdgmime
+diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
+index 2c54e59..3cd3c5a 100644
+--- a/gio/tests/Makefile.am
++++ b/gio/tests/Makefile.am
+@@ -437,10 +437,8 @@ gnotification_SOURCES                    = $(gdbus_sessionbus_sources) gnotifica
+ 
+ BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
+ gdbus-test-codegen.o: gdbus-test-codegen-generated.h
+-gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
+-	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
+-		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
+-		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
++gdbus-test-codegen-generated.h: test-codegen.xml Makefile
++	$(AM_V_GEN) gdbus-codegen \
+ 		--interface-prefix org.project. \
+ 		--generate-c-code gdbus-test-codegen-generated \
+ 		--c-generate-object-manager \
+diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
+index d6d1412..62ef706 100644
+--- a/gio/tests/gdbus-object-manager-example/Makefile.am
++++ b/gio/tests/gdbus-object-manager-example/Makefile.am
+@@ -11,10 +11,8 @@ GDBUS_GENERATED = \
+ 	gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml	\
+ 	$(NULL)
+ 
+-$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
+-	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
+-		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
+-		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
++$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile
++	$(AM_V_GEN) gdbus-codegen \
+ 		--interface-prefix org.gtk.GDBus.Example.ObjectManager. \
+ 		--c-namespace Example \
+ 		--c-generate-object-manager \

diff --git a/dev-libs/glib/files/glib-2.46.2-fix-gstrerror-on-non-glibc.patch b/dev-libs/glib/files/glib-2.46.2-fix-gstrerror-on-non-glibc.patch
new file mode 100644
index 0000000..b0db991
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.46.2-fix-gstrerror-on-non-glibc.patch
@@ -0,0 +1,30 @@
+From feb4fb2842ef123b16b0cdf8d50be192e30862be Mon Sep 17 00:00:00 2001
+From: Dan Winship <danw@gnome.org>
+Date: Mon, 16 Nov 2015 16:57:38 -0500
+Subject: Fix g_strerror() on non-glibc
+
+When using one of the codepaths that copies the error string into buf,
+make sure the string gets strdup() afterward.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=758194
+---
+ glib/gstrfuncs.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
+index 6712a64..0e2498f 100644
+--- a/glib/gstrfuncs.c
++++ b/glib/gstrfuncs.c
+@@ -1293,6 +1293,8 @@ g_strerror (gint errnum)
+           if (error)
+             g_print ("%s\n", error->message);
+         }
++      else if (msg == (const gchar *)buf)
++        msg = g_strdup (buf);
+ 
+       g_hash_table_insert (errors, GINT_TO_POINTER (errnum), (char *) msg);
+     }
+-- 
+cgit v0.12
+
+

diff --git a/dev-libs/glib/files/glib-2.46.2-memleak.patch b/dev-libs/glib/files/glib-2.46.2-memleak.patch
new file mode 100644
index 0000000..e9eca2a
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.46.2-memleak.patch
@@ -0,0 +1,25 @@
+From e98e1eff83c742c73a148dd7b75c00d77e0cee40 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos@foutrelis.com>
+Date: Wed, 25 Nov 2015 23:29:18 +0200
+Subject: GDBusProxy: Fix a memory leak during initialization
+
+https://bugzilla.gnome.org/show_bug.cgi?id=758641
+---
+ gio/gdbusproxy.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
+index 52a22fb..7b1140f 100644
+--- a/gio/gdbusproxy.c
++++ b/gio/gdbusproxy.c
+@@ -1720,6 +1720,7 @@ async_initable_init_second_finish (GAsyncInitable  *initable,
+   if (result != NULL)
+     {
+       process_get_all_reply (proxy, result);
++      g_variant_unref (result);
+     }
+ 
+   proxy->priv->initialized = TRUE;
+-- 
+cgit v0.12
+

diff --git a/dev-libs/glib/files/glib-2.46.2-musl.patch b/dev-libs/glib/files/glib-2.46.2-musl.patch
new file mode 100644
index 0000000..a61708a
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.46.2-musl.patch
@@ -0,0 +1,98 @@
+Reverting commit https://github.com/GNOME/glib/commit/2fe992b099bfd3fb121a71b7af43e116b2142b5d
+
+musl's does not run ctors in the assumed order that glib-2.46 expects:
+
+- glib_init() should be called before gobject_init_ctor().
+
+
+diff --git glib/glib-init.c glib/glib-init.c
+index e7002e6..24efe9d 100644
+--- glib/glib-init.c
++++ glib/glib-init.c
+@@ -233,7 +233,6 @@ glib_init (void)
+ {
+   g_messages_prefixed_init ();
+   g_debug_init ();
+-  g_quark_init ();
+ }
+ 
+ #if defined (G_OS_WIN32)
+diff --git glib/glib-init.h glib/glib-init.h
+index b56f7e2..de6be78 100644
+--- glib/glib-init.h
++++ glib/glib-init.h
+@@ -25,8 +25,6 @@
+ extern GLogLevelFlags g_log_always_fatal;
+ extern GLogLevelFlags g_log_msg_prefix;
+ 
+-void g_quark_init (void);
+-
+ #ifdef G_OS_WIN32
+ #include <windows.h>
+ 
+diff --git glib/gquark.c glib/gquark.c
+index 9e51a92..d620533 100644
+--- glib/gquark.c
++++ glib/gquark.c
+@@ -40,7 +40,6 @@
+ #include "gthread.h"
+ #include "gtestutils.h"
+ #include "glib_trace.h"
+-#include "glib-init.h"
+ 
+ #define QUARK_BLOCK_SIZE         2048
+ #define QUARK_STRING_BLOCK_SIZE (4096 - sizeof (gsize))
+@@ -54,16 +53,6 @@ static gint           quark_seq_id = 0;
+ static gchar         *quark_block = NULL;
+ static gint           quark_block_offset = 0;
+ 
+-void
+-g_quark_init (void)
+-{
+-  g_assert (quark_seq_id == 0);
+-  quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
+-  quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
+-  quarks[0] = NULL;
+-  quark_seq_id = 1;
+-}
+-
+ /**
+  * SECTION:quarks
+  * @title: Quarks
+@@ -138,9 +127,10 @@ g_quark_try_string (const gchar *string)
+     return 0;
+ 
+   G_LOCK (quark_global);
+-  quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
++  if (quark_ht)
++    quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+   G_UNLOCK (quark_global);
+-
++  
+   return quark;
+ }
+ 
+@@ -179,7 +169,8 @@ quark_from_string (const gchar *string,
+ {
+   GQuark quark = 0;
+ 
+-  quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
++  if (quark_ht)
++    quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+ 
+   if (!quark)
+     {
+@@ -292,6 +283,13 @@ quark_new (gchar *string)
+        */
+       g_atomic_pointer_set (&quarks, quarks_new);
+     }
++  if (!quark_ht)
++    {
++      g_assert (quark_seq_id == 0);
++      quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
++      quarks[quark_seq_id] = NULL;
++      g_atomic_int_inc (&quark_seq_id);
++    }
+ 
+   quark = quark_seq_id;
+   g_atomic_pointer_set (&quarks[quark], string);

diff --git a/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch b/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch
new file mode 100644
index 0000000..be7ad3d
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch
@@ -0,0 +1,44 @@
+From 62f320e6bb09b4e6454e6a49dc3a844b13b9cc34 Mon Sep 17 00:00:00 2001
+From: Allison Ryan Lortie <desrt@desrt.ca>
+Date: Tue, 26 Apr 2016 10:39:42 +0200
+Subject: [PATCH] GContextSpecificGroup: detach sources
+
+GContextSpecificGroup has been somewhat broken for a rather long time:
+when we remove the last reference on an object held in the group, we try
+to clean up the source, but fail to actually remove it from the
+mainloop.
+
+We will soon stop emitting signals on the source (due to it having been
+removed from the hash table) but any "in flight" signals will still be
+delivered on the source, which continues to exist.  This is a problem if
+the event is being delivered just as the object is being destroyed.
+
+This also means that we leave the source attached to the mainloop
+forever (and next time will create a new one)...
+
+This is demonstrated with the GtkAppChooser dialog which writes an
+update to the mimeapps.list file just as it is closing, triggering the
+app info monitor to fire just as it is being destroyed.
+
+Karl Tomlinson correctly analysed the problem and proposed this fix.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=762994
+---
+ gio/gcontextspecificgroup.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gio/gcontextspecificgroup.c b/gio/gcontextspecificgroup.c
+index b0eb279..211d765 100644
+--- a/gio/gcontextspecificgroup.c
++++ b/gio/gcontextspecificgroup.c
+@@ -234,6 +234,7 @@ g_context_specific_group_remove (GContextSpecificGroup *group,
+ 
+   g_assert (css->instance == instance);
+ 
++  g_source_destroy ((GSource *) css);
+   g_source_unref ((GSource *) css);
+   g_main_context_unref (context);
+ }
+-- 
+2.8.1
+

diff --git a/dev-libs/glib/glib-2.46.2-r3.ebuild b/dev-libs/glib/glib-2.46.2-r3.ebuild
new file mode 100644
index 0000000..415f9d1
--- /dev/null
+++ b/dev-libs/glib/glib-2.46.2-r3.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
+# adding new dependencies end up making stage3 to grow. Every addition needs
+# then to be think very closely.
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+# Building with --disable-debug highly unrecommended.  It will build glib in
+# an unusable form as it disables some commonly used API.  Please do not
+# convert this to the use_enable form, as it results in a broken build.
+GCONF_DEBUG="yes"
+# Completely useless with or without USE static-libs, people need to use
+# pkg-config
+GNOME2_LA_PUNT="yes"
+
+inherit autotools bash-completion-r1 gnome2 libtool eutils flag-o-matic	multilib \
+	pax-utils python-r1 toolchain-funcs versionator virtualx linux-info multilib-minimal
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="http://www.gtk.org/"
+SRC_URI="${SRC_URI}
+	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
+
+LICENSE="LGPL-2+"
+SLOT="2"
+IUSE="dbus fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
+REQUIRED_USE="
+	utils? ( ${PYTHON_REQUIRED_USE} )
+	test? ( ${PYTHON_REQUIRED_USE} )
+"
+
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+
+RDEPEND="
+	!<dev-util/gdbus-codegen-${PV}
+	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
+	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
+	utils? (
+		${PYTHON_DEPS}
+		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
+		virtual/libelf:0=
+	)
+"
+DEPEND="${RDEPEND}
+	app-text/docbook-xml-dtd:4.1.2
+	>=dev-libs/libxslt-1.0
+	>=sys-devel/gettext-0.11
+	>=dev-util/gtk-doc-am-1.20
+	systemtap? ( >=dev-util/systemtap-1.3 )
+	test? (
+		sys-devel/gdb
+		${PYTHON_DEPS}
+		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
+		>=sys-apps/dbus-1.2.14 )
+	!<dev-util/gtk-doc-1.15-r2
+"
+# gobject-introspection blocker to ensure people don't mix
+# different g-i and glib major versions
+
+PDEPEND="!<gnome-base/gvfs-1.6.4-r990
+	dbus? ( gnome-base/dconf )
+	mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+# Earlier versions of gvfs do not work with glib
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/gio-querymodules$(get_exeext)
+)
+
+pkg_setup() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~INOTIFY_USER"
+		if use test; then
+			CONFIG_CHECK="~IPV6"
+			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+		fi
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# GDBusProxy: Fix a memory leak during initialization (from 2.46 branch)
+	epatch "${FILESDIR}"/${P}-memleak.patch
+
+	# Fix for MUSL
+	epatch "${FILESDIR}"/${P}-musl.patch
+
+	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
+	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
+
+	if use test; then
+		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+		if ! has_version dev-util/desktop-file-utils ; then
+			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+			ewarn "think on installing it to get these tests run."
+			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+		fi
+
+		# gdesktopappinfo requires existing terminal (gnome-terminal or any
+		# other), falling back to xterm if one doesn't exist
+		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+			ewarn "Some tests will be skipped due to missing terminal program"
+			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+		fi
+
+		# Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
+		if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:3' ; then
+			ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:3"
+			ewarn "not being present on your system, think on installing them to get these tests run."
+			sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
+			sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
+			sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
+			sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
+			sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
+			sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
+			# needed to prevent gdbus-threading from asserting
+			ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
+		fi
+
+		# Some tests need ipv6, upstream bug #667468
+		# https://bugs.gentoo.org/show_bug.cgi?id=508752
+		if [[ ! -f /proc/net/if_net6 ]]; then
+			sed -i -e "/gdbus\/peer-to-peer/d" gio/tests/gdbus-peer.c || die
+			sed -i -e "/gdbus\/delayed-message-processing/d" gio/tests/gdbus-peer.c || die
+			sed -i -e "/gdbus\/nonce-tcp/d" gio/tests/gdbus-peer.c || die
+		fi
+
+		# This test is prone to fail, bug #504024, upstream bug #723719
+		sed -i -e '/gdbus-close-pending/d' gio/tests/Makefile.am || die
+
+		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
+		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+	else
+		# Don't build tests, also prevents extra deps, bug #512022
+		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
+	fi
+
+	# gdbus-codegen is a separate package
+	epatch "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch
+
+	# crash in Firefox when choosing default application, fixed in 2.48.1; bug #577686
+	epatch "${FILESDIR}"/${PN}-2.48.0-GContextSpecificGroup.patch
+
+	# fixes https://bugzilla.gnome.org/show_bug.cgi?id=758194
+	epatch "${FILESDIR}"/${PN}-2.46.2-fix-gstrerror-on-non-glibc.patch
+
+	# leave python shebang alone
+	sed -e '/${PYTHON}/d' \
+		-i glib/Makefile.{am,in} || die
+
+	epatch_user
+
+	# Also needed to prevent cross-compile failures, see bug #267603
+	eautoreconf
+
+	gnome2_src_prepare
+
+	epunt_cxx
+}
+
+multilib_src_configure() {
+	# Avoid circular depend with dev-util/pkgconfig and
+	# native builds (cross-compiles won't need pkg-config
+	# in the target ROOT to work here)
+	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
+		if has_version sys-apps/dbus; then
+			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
+			export DBUS1_LIBS="-ldbus-1"
+		fi
+		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
+		export LIBFFI_LIBS="-lffi"
+	fi
+
+	# These configure tests don't work when cross-compiling.
+	if tc-is-cross-compiler ; then
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
+		case ${CHOST} in
+		hppa*|metag*) export glib_cv_stack_grows=yes ;;
+		*)            export glib_cv_stack_grows=no ;;
+		esac
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
+		export glib_cv_uscore=no
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
+		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
+	fi
+
+	local myconf
+
+	case "${CHOST}" in
+		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
+		*)        myconf="${myconf} --with-threads=posix" ;;
+	esac
+
+	# FIXME: Always use internal libpcre, bug #254659
+	# (maybe consider going back to system lib)
+	# libelf used only by the gresource bin
+	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
+		$(use_enable xattr) \
+		$(use_enable fam) \
+		$(use_enable selinux) \
+		$(use_enable static-libs static) \
+		$(use_enable systemtap dtrace) \
+		$(use_enable systemtap systemtap) \
+		$(multilib_native_use_enable utils libelf) \
+		--disable-compile-warnings \
+		--enable-man \
+		--with-pcre=internal \
+		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
+
+	if multilib_is_native_abi; then
+		local d
+		for d in glib gio gobject; do
+			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
+		done
+	fi
+}
+
+multilib_src_test() {
+	export XDG_CONFIG_DIRS=/etc/xdg
+	export XDG_DATA_DIRS=/usr/local/share:/usr/share
+	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+	export LC_TIME=C # bug #411967
+	python_export_best
+
+	# Related test is a bit nitpicking
+	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+
+	# Hardened: gdb needs this, bug #338891
+	if host-is-pax ; then
+		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
+			|| die "Hardened adjustment failed"
+	fi
+
+	# Need X for dbus-launch session X11 initialization
+	Xemake check
+}
+
+multilib_src_install() {
+	gnome2_src_install completiondir="$(get_bashcompdir)"
+	keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+	DOCS="AUTHORS ChangeLog* NEWS* README"
+	einstalldocs
+
+	if use utils ; then
+		python_replicate_script "${ED}"/usr/bin/gtester-report
+	else
+		rm "${ED}usr/bin/gtester-report"
+		rm "${ED}usr/share/man/man1/gtester-report.1"
+	fi
+
+	# Do not install charset.alias even if generated, leave it to libiconv
+	rm -f "${ED}/usr/lib/charset.alias"
+
+	# Don't install gdb python macros, bug 291328
+	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
+}
+
+pkg_preinst() {
+	gnome2_pkg_preinst
+
+	# Make gschemas.compiled belong to glib alone
+	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
+
+	if [[ -e ${EROOT}${cache} ]]; then
+		cp "${EROOT}"${cache} "${ED}"/${cache} || die
+	else
+		touch "${ED}"/${cache} || die
+	fi
+
+	multilib_pkg_preinst() {
+		# Make giomodule.cache belong to glib alone
+		local cache="usr/$(get_libdir)/gio/giomodule.cache"
+
+		if [[ -e ${EROOT}${cache} ]]; then
+			cp "${EROOT}"${cache} "${ED}"/${cache} || die
+		else
+			touch "${ED}"/${cache} || die
+		fi
+	}
+
+	multilib_foreach_abi multilib_pkg_preinst
+}
+
+pkg_postinst() {
+	# force (re)generation of gschemas.compiled
+	GNOME2_ECLASS_GLIB_SCHEMAS="force"
+
+	gnome2_pkg_postinst
+
+	multilib_pkg_postinst() {
+		gnome2_giomodule_cache_update \
+			|| die "Update GIO modules cache failed (for ${ABI})"
+	}
+	multilib_foreach_abi multilib_pkg_postinst
+}
+
+pkg_postrm() {
+	gnome2_pkg_postrm
+
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+		multilib_pkg_postrm() {
+			rm -f "${EROOT}"usr/$(get_libdir)/gio/giomodule.cache
+		}
+		multilib_foreach_abi multilib_pkg_postrm
+		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
+	fi
+}

diff --git a/dev-libs/glib/metadata.xml b/dev-libs/glib/metadata.xml
new file mode 100644
index 0000000..b73f9ed
--- /dev/null
+++ b/dev-libs/glib/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>gnome@gentoo.org</email>
+    <name>Gentoo GNOME Desktop</name>
+  </maintainer>
+  <use>
+	<flag name="dbus">Enable dependencies required by glib libraries
+		using dbus service to manage settings saving</flag>
+  	<flag name="mime">Pull in shared MIME database that many glib-based
+		applications require at runtime to detect or open files. Warning:
+		do not disable this flag unless installing on a headless server.</flag>
+	<flag name="systemtap">Build support for profiling and tracing using 
+		<pkg>dev-util/systemtap</pkg></flag>
+	<flag name="utils">Install gtester-report utility to generate test
+		report files for your software; build gresource utility with
+		ELF support.</flag>
+  </use>
+  <upstream>
+    <remote-id type="cpe">cpe:/a:gnome:glib</remote-id>
+  </upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2017-02-23  1:47 Aric Belsito
  0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2017-02-23  1:47 UTC (permalink / raw
  To: gentoo-commits

commit:     0d6487d861eb3c4cfab4377f089b4fe73e9c1a48
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Thu Feb 23 01:46:48 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Thu Feb 23 01:46:48 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=0d6487d8

dev-libs/glib: remove 2.46.2-r3

no longer in tree.

 dev-libs/glib/Manifest                             |   8 +-
 .../glib-2.46.2-fix-gstrerror-on-non-glibc.patch   |  30 --
 dev-libs/glib/files/glib-2.46.2-memleak.patch      |  25 --
 dev-libs/glib/files/glib-2.46.2-musl.patch         |  98 -------
 .../files/glib-2.48.0-GContextSpecificGroup.patch  |  44 ---
 dev-libs/glib/glib-2.46.2-r3.ebuild                | 323 ---------------------
 dev-libs/glib/glib-2.48.2.ebuild                   |   4 +-
 7 files changed, 3 insertions(+), 529 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 0cd28de..4f1405f 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,12 +1,6 @@
 AUX glib-2.40.0-external-gdbus-codegen.patch 3901 SHA256 d06d2775c3632212c11eceb715f0da6a3b1ab6d8d901bb2fcb7c1fc3ca6b004a SHA512 2f960a53cf51f809af6788664e2cd6d67a29eb58dfe34156f665e2d5ae1fd53a3c792714672fc82dcbfae38e1c793a3eef07116484511ef21d96536559339b00 WHIRLPOOL 39dc4d38e6a3450cbba3a1843096da330b6b2bc8954b9cce4a890454e5546d3e6440ddd237772407bd4ffec05b78eb6ddddb5c4cb6c86a86e01a5ad4c96fe8b0
-AUX glib-2.46.2-fix-gstrerror-on-non-glibc.patch 844 SHA256 2c4c622cf7a7236c73b4665ed3b202dbf6236bb11bdacf17b3cba023f90b280c SHA512 262f1d0314a8292c447d5561695b71ae9e27aabe3d94f2a40d78910ee93dd02b1f12ea515ae9c04c75c5ede9e256bf01a427090fdc005738d12d8aa1a0f594d0 WHIRLPOOL 5ea3133b31c523e220190e4157914e1dfa1cd599db8e02c0dfb8fc78378a0b0eb011234769814dfa1c91580967780b1f1225b91794e98759c16d1e9ef6f7fb2e
-AUX glib-2.46.2-memleak.patch 711 SHA256 baa9a70ea17bc0f78bc4c8353af28cc22fd16a1a94e5898757a87bddffd8762e SHA512 f6a52034744b3725ffd7219abbd9df8dfb562d31db2f846a86352a2481e8f5ae28b77a0bd2a19955e17c7ec9de7723a495367be051dc568d3498521ff58c4be6 WHIRLPOOL 0ded676353a97e327901ea66a8ddf85156c85143d19a4a3786d24e90ceed0fe36fef1effdeaa648b0404e58930c1ba2df6a65ea7e8a106bb3e84ea0a6b610609
-AUX glib-2.46.2-musl.patch 2497 SHA256 a9449e3f36725cdf19931fb0987de65779decb6a0fb214d384a1b32f17aeb036 SHA512 30b46bb13749d2879f84e1980fbaccb381fffe29c8d07ed0825ddc07421778cbf77896e18cb0bc1ebf9d0ff9c95064f05de81e5d78df2b9660117f6e85aa9adb WHIRLPOOL e24a6b68748330b0c62ad362aa6df2989511ddc86cd5aec582883b87ff1b6825d975f1f12126ba85fa6871d1a2f343b7a5057b81b23ce69da3dbb8f24708c94f
-AUX glib-2.48.0-GContextSpecificGroup.patch 1637 SHA256 3e0e6250775482357cd8727ad270a473be7c24431afa5445f9ac4214802a8fad SHA512 ed850d1455ac619ea97c8a82eb7f6a768882e9e1dbdfcffcf143cf3cddd46ea073d6b25c811eaa14a789d06f4cc2cf13c09541565eb34ed9bf616c8dea825e45 WHIRLPOOL 004196759130baeba4b4e72601dfaa25bf8c0e49b1d09222b21a6c51b9c84b6bf6b799bbfedf931d3eabbad91371017b5c61799c879d99aabaaf3cdaf11cbf0e
 AUX glib-2.48.2-musl-glibmm.patch 1496 SHA256 17cd23f9bea7eaa0ed4c3a83e894392d3d6824a462790cb1e3b6f10d591b9448 SHA512 6656b6c40366c43e48916a1851319f0a6b939ae5f1c78b9496930f47b566ab17924ee031ed6a0ea9beb8a4b1fc37b66ef1784b4a95a890dd71410717175509e7 WHIRLPOOL afc16f2a772a474f92eec77d666b88c88b6a96e2ded4b1e4e02f824bea7a903ead48ed2cdc1ab0f273f7e1d492e99bb5ae5e3545ffa3318e2fe56538d0a55d85
-DIST glib-2.46.2.tar.xz 7344636 SHA256 5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db SHA512 8b5298712710d77b4a47367071f782d2bb3042b149ec8fde8c065f80bf3c5375c94318d19665c0092572e4895e590231a47324d25f371310f02b43feb3009588 WHIRLPOOL 700b69360110351544780ace4dcb14f29505f63d8840882532a4b7c017860b6da86e09cbabca691b7b24cb08b8722e772555de044b8b21e4b0952c8a8e4e6ecb
 DIST glib-2.48.2.tar.xz 6408644 SHA256 f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4 SHA512 2eac104eb2207d0a6488992e48069a34b417f51e141364f281ab7b0953a6de88be177b1c694dd9464a856c9a5d8021e3cf0193a8d9c5aaf6ea11f1f9ff743c43 WHIRLPOOL cba211000d5597e93d01113e5f2b6736e47f4daa00935a53af182b3304fef9a1ac25f78995c7a53cc1234261433a1bbd1ec751c87b556845a15da720af5b971b
 DIST pkg-config-0.28.tar.gz 1931203 SHA256 6b6eb31c6ec4421174578652c7e141fdaae2dabad1021f420d8713206ac1f845 SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320 WHIRLPOOL db4ddb4ce61724e629931c5ffccb4d7a551b4dc0f4efed5a966822307e4b5a786adee5705dd80ec0a9aa32cb1af9ad9615e307360e131fc34688207216161486
-EBUILD glib-2.46.2-r3.ebuild 10585 SHA256 c10f4010878f10ef32fb3b6d4331a37dfbf2eb94ab06d40ecf7e35a5537258e2 SHA512 b5bc42c6d6a42dfad750cf1ef4c3cfc9f19bb79777ba3846b0a797d0c75d25444114cd9698cf5e4291bfdd3cc2046fac8b45ed39ae54c59cd3e5354588fbeca7 WHIRLPOOL 7869514a3ba96faf4d98f0cd9e1018175bbba3568ac1948b5ee607452f8a863d675ddc2790b513fa7d7211595e2829a167803097fbabd71434b7c0556656d9fe
-EBUILD glib-2.48.2.ebuild 8622 SHA256 f4d7799843b62ca2e8f2719b235908843e55ff8ccf071179b9f5b752152c5d86 SHA512 35f6798fc2b090133f71228ca60be1ddf3044cccce7a9fc7ea0548a8db59e260a193a6e77b33b1967c85061551f1a96aa96bae4cda7b0715221cb23b32757f42 WHIRLPOOL 96f9771197b83ec7119df9d059735443ebd91ec3ac1a0756b7fbed48c2870b11fd48b11bf982e604895332309d2ed9c683833b4c1a9e7d19c2750129a3804ab7
+EBUILD glib-2.48.2.ebuild 8617 SHA256 2b64e2ebb7ecc6eda84de3254e5ce8ae984b60ddc3c54e20652059ec2eded32d SHA512 ea1327f401eae1ad945602e4e686a396ff6c90115beb161e6703fd102f534ef3e02104abdf9d9404307f66997fca2500013e63967f698dbd0e290a5c073b2e56 WHIRLPOOL f58d2c94fea90aef272e0009a5da9b01f216df26432b390c421985804bb19ba03a47c95b29d2e2a2e103bbc1a65af65154ba9e3aa6332629df66a03600daec51
 MISC metadata.xml 955 SHA256 424ffc685dcfdfa5dcb142046d937915d07945217db814ff759b9b736d67f9e4 SHA512 31b87bd850ffaa3f2263e6435d2929ef9f8f979e6fe6cff86433c8841dc383088bc6d672ac7daf94c1ef660767d0e91a03860267df9c750dcde3204dd6631cb1 WHIRLPOOL cf59bd50dcfcc466ad19a81f458875b7e62fc569cda4f730defdbed72f0112395b332b52574c5794539c8e0255f7abaa9e7f14a9c5bb5fd6048ad3c4c35991c8

diff --git a/dev-libs/glib/files/glib-2.46.2-fix-gstrerror-on-non-glibc.patch b/dev-libs/glib/files/glib-2.46.2-fix-gstrerror-on-non-glibc.patch
deleted file mode 100644
index b0db991..0000000
--- a/dev-libs/glib/files/glib-2.46.2-fix-gstrerror-on-non-glibc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From feb4fb2842ef123b16b0cdf8d50be192e30862be Mon Sep 17 00:00:00 2001
-From: Dan Winship <danw@gnome.org>
-Date: Mon, 16 Nov 2015 16:57:38 -0500
-Subject: Fix g_strerror() on non-glibc
-
-When using one of the codepaths that copies the error string into buf,
-make sure the string gets strdup() afterward.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=758194
----
- glib/gstrfuncs.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
-index 6712a64..0e2498f 100644
---- a/glib/gstrfuncs.c
-+++ b/glib/gstrfuncs.c
-@@ -1293,6 +1293,8 @@ g_strerror (gint errnum)
-           if (error)
-             g_print ("%s\n", error->message);
-         }
-+      else if (msg == (const gchar *)buf)
-+        msg = g_strdup (buf);
- 
-       g_hash_table_insert (errors, GINT_TO_POINTER (errnum), (char *) msg);
-     }
--- 
-cgit v0.12
-
-

diff --git a/dev-libs/glib/files/glib-2.46.2-memleak.patch b/dev-libs/glib/files/glib-2.46.2-memleak.patch
deleted file mode 100644
index e9eca2a..0000000
--- a/dev-libs/glib/files/glib-2.46.2-memleak.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From e98e1eff83c742c73a148dd7b75c00d77e0cee40 Mon Sep 17 00:00:00 2001
-From: Evangelos Foutras <evangelos@foutrelis.com>
-Date: Wed, 25 Nov 2015 23:29:18 +0200
-Subject: GDBusProxy: Fix a memory leak during initialization
-
-https://bugzilla.gnome.org/show_bug.cgi?id=758641
----
- gio/gdbusproxy.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
-index 52a22fb..7b1140f 100644
---- a/gio/gdbusproxy.c
-+++ b/gio/gdbusproxy.c
-@@ -1720,6 +1720,7 @@ async_initable_init_second_finish (GAsyncInitable  *initable,
-   if (result != NULL)
-     {
-       process_get_all_reply (proxy, result);
-+      g_variant_unref (result);
-     }
- 
-   proxy->priv->initialized = TRUE;
--- 
-cgit v0.12
-

diff --git a/dev-libs/glib/files/glib-2.46.2-musl.patch b/dev-libs/glib/files/glib-2.46.2-musl.patch
deleted file mode 100644
index a61708a..0000000
--- a/dev-libs/glib/files/glib-2.46.2-musl.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Reverting commit https://github.com/GNOME/glib/commit/2fe992b099bfd3fb121a71b7af43e116b2142b5d
-
-musl's does not run ctors in the assumed order that glib-2.46 expects:
-
-- glib_init() should be called before gobject_init_ctor().
-
-
-diff --git glib/glib-init.c glib/glib-init.c
-index e7002e6..24efe9d 100644
---- glib/glib-init.c
-+++ glib/glib-init.c
-@@ -233,7 +233,6 @@ glib_init (void)
- {
-   g_messages_prefixed_init ();
-   g_debug_init ();
--  g_quark_init ();
- }
- 
- #if defined (G_OS_WIN32)
-diff --git glib/glib-init.h glib/glib-init.h
-index b56f7e2..de6be78 100644
---- glib/glib-init.h
-+++ glib/glib-init.h
-@@ -25,8 +25,6 @@
- extern GLogLevelFlags g_log_always_fatal;
- extern GLogLevelFlags g_log_msg_prefix;
- 
--void g_quark_init (void);
--
- #ifdef G_OS_WIN32
- #include <windows.h>
- 
-diff --git glib/gquark.c glib/gquark.c
-index 9e51a92..d620533 100644
---- glib/gquark.c
-+++ glib/gquark.c
-@@ -40,7 +40,6 @@
- #include "gthread.h"
- #include "gtestutils.h"
- #include "glib_trace.h"
--#include "glib-init.h"
- 
- #define QUARK_BLOCK_SIZE         2048
- #define QUARK_STRING_BLOCK_SIZE (4096 - sizeof (gsize))
-@@ -54,16 +53,6 @@ static gint           quark_seq_id = 0;
- static gchar         *quark_block = NULL;
- static gint           quark_block_offset = 0;
- 
--void
--g_quark_init (void)
--{
--  g_assert (quark_seq_id == 0);
--  quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
--  quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
--  quarks[0] = NULL;
--  quark_seq_id = 1;
--}
--
- /**
-  * SECTION:quarks
-  * @title: Quarks
-@@ -138,9 +127,10 @@ g_quark_try_string (const gchar *string)
-     return 0;
- 
-   G_LOCK (quark_global);
--  quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
-+  if (quark_ht)
-+    quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
-   G_UNLOCK (quark_global);
--
-+  
-   return quark;
- }
- 
-@@ -179,7 +169,8 @@ quark_from_string (const gchar *string,
- {
-   GQuark quark = 0;
- 
--  quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
-+  if (quark_ht)
-+    quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
- 
-   if (!quark)
-     {
-@@ -292,6 +283,13 @@ quark_new (gchar *string)
-        */
-       g_atomic_pointer_set (&quarks, quarks_new);
-     }
-+  if (!quark_ht)
-+    {
-+      g_assert (quark_seq_id == 0);
-+      quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
-+      quarks[quark_seq_id] = NULL;
-+      g_atomic_int_inc (&quark_seq_id);
-+    }
- 
-   quark = quark_seq_id;
-   g_atomic_pointer_set (&quarks[quark], string);

diff --git a/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch b/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch
deleted file mode 100644
index be7ad3d..0000000
--- a/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 62f320e6bb09b4e6454e6a49dc3a844b13b9cc34 Mon Sep 17 00:00:00 2001
-From: Allison Ryan Lortie <desrt@desrt.ca>
-Date: Tue, 26 Apr 2016 10:39:42 +0200
-Subject: [PATCH] GContextSpecificGroup: detach sources
-
-GContextSpecificGroup has been somewhat broken for a rather long time:
-when we remove the last reference on an object held in the group, we try
-to clean up the source, but fail to actually remove it from the
-mainloop.
-
-We will soon stop emitting signals on the source (due to it having been
-removed from the hash table) but any "in flight" signals will still be
-delivered on the source, which continues to exist.  This is a problem if
-the event is being delivered just as the object is being destroyed.
-
-This also means that we leave the source attached to the mainloop
-forever (and next time will create a new one)...
-
-This is demonstrated with the GtkAppChooser dialog which writes an
-update to the mimeapps.list file just as it is closing, triggering the
-app info monitor to fire just as it is being destroyed.
-
-Karl Tomlinson correctly analysed the problem and proposed this fix.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=762994
----
- gio/gcontextspecificgroup.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gio/gcontextspecificgroup.c b/gio/gcontextspecificgroup.c
-index b0eb279..211d765 100644
---- a/gio/gcontextspecificgroup.c
-+++ b/gio/gcontextspecificgroup.c
-@@ -234,6 +234,7 @@ g_context_specific_group_remove (GContextSpecificGroup *group,
- 
-   g_assert (css->instance == instance);
- 
-+  g_source_destroy ((GSource *) css);
-   g_source_unref ((GSource *) css);
-   g_main_context_unref (context);
- }
--- 
-2.8.1
-

diff --git a/dev-libs/glib/glib-2.46.2-r3.ebuild b/dev-libs/glib/glib-2.46.2-r3.ebuild
deleted file mode 100644
index 415f9d1..0000000
--- a/dev-libs/glib/glib-2.46.2-r3.ebuild
+++ /dev/null
@@ -1,323 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
-# adding new dependencies end up making stage3 to grow. Every addition needs
-# then to be think very closely.
-
-EAPI="5"
-PYTHON_COMPAT=( python2_7 )
-# Building with --disable-debug highly unrecommended.  It will build glib in
-# an unusable form as it disables some commonly used API.  Please do not
-# convert this to the use_enable form, as it results in a broken build.
-GCONF_DEBUG="yes"
-# Completely useless with or without USE static-libs, people need to use
-# pkg-config
-GNOME2_LA_PUNT="yes"
-
-inherit autotools bash-completion-r1 gnome2 libtool eutils flag-o-matic	multilib \
-	pax-utils python-r1 toolchain-funcs versionator virtualx linux-info multilib-minimal
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="http://www.gtk.org/"
-SRC_URI="${SRC_URI}
-	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
-
-LICENSE="LGPL-2+"
-SLOT="2"
-IUSE="dbus fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
-REQUIRED_USE="
-	utils? ( ${PYTHON_REQUIRED_USE} )
-	test? ( ${PYTHON_REQUIRED_USE} )
-"
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
-
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	utils? (
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		virtual/libelf:0=
-	)
-"
-DEPEND="${RDEPEND}
-	app-text/docbook-xml-dtd:4.1.2
-	>=dev-libs/libxslt-1.0
-	>=sys-devel/gettext-0.11
-	>=dev-util/gtk-doc-am-1.20
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	test? (
-		sys-devel/gdb
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		>=sys-apps/dbus-1.2.14 )
-	!<dev-util/gtk-doc-1.15-r2
-"
-# gobject-introspection blocker to ensure people don't mix
-# different g-i and glib major versions
-
-PDEPEND="!<gnome-base/gvfs-1.6.4-r990
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-# Earlier versions of gvfs do not work with glib
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	# GDBusProxy: Fix a memory leak during initialization (from 2.46 branch)
-	epatch "${FILESDIR}"/${P}-memleak.patch
-
-	# Fix for MUSL
-	epatch "${FILESDIR}"/${P}-musl.patch
-
-	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
-	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
-
-	if use test; then
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-			ewarn "Some tests will be skipped due to missing terminal program"
-			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		fi
-
-		# Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
-		if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:3' ; then
-			ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:3"
-			ewarn "not being present on your system, think on installing them to get these tests run."
-			sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
-			sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
-			sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
-			sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
-			sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
-			sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
-			# needed to prevent gdbus-threading from asserting
-			ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
-		fi
-
-		# Some tests need ipv6, upstream bug #667468
-		# https://bugs.gentoo.org/show_bug.cgi?id=508752
-		if [[ ! -f /proc/net/if_net6 ]]; then
-			sed -i -e "/gdbus\/peer-to-peer/d" gio/tests/gdbus-peer.c || die
-			sed -i -e "/gdbus\/delayed-message-processing/d" gio/tests/gdbus-peer.c || die
-			sed -i -e "/gdbus\/nonce-tcp/d" gio/tests/gdbus-peer.c || die
-		fi
-
-		# This test is prone to fail, bug #504024, upstream bug #723719
-		sed -i -e '/gdbus-close-pending/d' gio/tests/Makefile.am || die
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
-	fi
-
-	# gdbus-codegen is a separate package
-	epatch "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch
-
-	# crash in Firefox when choosing default application, fixed in 2.48.1; bug #577686
-	epatch "${FILESDIR}"/${PN}-2.48.0-GContextSpecificGroup.patch
-
-	# fixes https://bugzilla.gnome.org/show_bug.cgi?id=758194
-	epatch "${FILESDIR}"/${PN}-2.46.2-fix-gstrerror-on-non-glibc.patch
-
-	# leave python shebang alone
-	sed -e '/${PYTHON}/d' \
-		-i glib/Makefile.{am,in} || die
-
-	epatch_user
-
-	# Also needed to prevent cross-compile failures, see bug #267603
-	eautoreconf
-
-	gnome2_src_prepare
-
-	epunt_cxx
-}
-
-multilib_src_configure() {
-	# Avoid circular depend with dev-util/pkgconfig and
-	# native builds (cross-compiles won't need pkg-config
-	# in the target ROOT to work here)
-	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
-		if has_version sys-apps/dbus; then
-			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
-			export DBUS1_LIBS="-ldbus-1"
-		fi
-		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
-		export LIBFFI_LIBS="-lffi"
-	fi
-
-	# These configure tests don't work when cross-compiling.
-	if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		case ${CHOST} in
-		hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		*)            export glib_cv_stack_grows=no ;;
-		esac
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
-		export glib_cv_uscore=no
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
-		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
-	fi
-
-	local myconf
-
-	case "${CHOST}" in
-		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
-		*)        myconf="${myconf} --with-threads=posix" ;;
-	esac
-
-	# FIXME: Always use internal libpcre, bug #254659
-	# (maybe consider going back to system lib)
-	# libelf used only by the gresource bin
-	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
-		$(use_enable xattr) \
-		$(use_enable fam) \
-		$(use_enable selinux) \
-		$(use_enable static-libs static) \
-		$(use_enable systemtap dtrace) \
-		$(use_enable systemtap systemtap) \
-		$(multilib_native_use_enable utils libelf) \
-		--disable-compile-warnings \
-		--enable-man \
-		--with-pcre=internal \
-		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
-
-	if multilib_is_native_abi; then
-		local d
-		for d in glib gio gobject; do
-			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	python_export_best
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	# Hardened: gdb needs this, bug #338891
-	if host-is-pax ; then
-		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
-			|| die "Hardened adjustment failed"
-	fi
-
-	# Need X for dbus-launch session X11 initialization
-	Xemake check
-}
-
-multilib_src_install() {
-	gnome2_src_install completiondir="$(get_bashcompdir)"
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	DOCS="AUTHORS ChangeLog* NEWS* README"
-	einstalldocs
-
-	if use utils ; then
-		python_replicate_script "${ED}"/usr/bin/gtester-report
-	else
-		rm "${ED}usr/bin/gtester-report"
-		rm "${ED}usr/share/man/man1/gtester-report.1"
-	fi
-
-	# Do not install charset.alias even if generated, leave it to libiconv
-	rm -f "${ED}/usr/lib/charset.alias"
-
-	# Don't install gdb python macros, bug 291328
-	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
-}
-
-pkg_preinst() {
-	gnome2_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"/${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="usr/$(get_libdir)/gio/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"/${cache} || die
-		else
-			touch "${ED}"/${cache} || die
-		fi
-	}
-
-	multilib_foreach_abi multilib_pkg_preinst
-}
-
-pkg_postinst() {
-	# force (re)generation of gschemas.compiled
-	GNOME2_ECLASS_GLIB_SCHEMAS="force"
-
-	gnome2_pkg_postinst
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	multilib_foreach_abi multilib_pkg_postinst
-}
-
-pkg_postrm() {
-	gnome2_pkg_postrm
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"usr/$(get_libdir)/gio/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}

diff --git a/dev-libs/glib/glib-2.48.2.ebuild b/dev-libs/glib/glib-2.48.2.ebuild
index c6e3b3f..dbcb2ca 100644
--- a/dev-libs/glib/glib-2.48.2.ebuild
+++ b/dev-libs/glib/glib-2.48.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -28,7 +28,7 @@ REQUIRED_USE="
 	test? ( ${PYTHON_REQUIRED_USE} )
 "
 
-KEYWORDS="alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
 
 RDEPEND="
 	!<dev-util/gdbus-codegen-${PV}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2017-03-29 16:47 Aric Belsito
  0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2017-03-29 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     7196e3be28e9ff7821b5757c88c78f1ff62ed7cf
Author:     Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de>
AuthorDate: Wed Mar 29 14:37:29 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Mar 29 16:47:22 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=7196e3be

dev-libs/glib: include additional patches

 dev-libs/glib/Manifest                             |  6 +-
 dev-libs/glib/files/glib-2.48.2-musl-glibmm.patch  | 47 -----------
 .../files/glib-2.50.3-fix-gdatetime-tests.patch    | 52 +++++++++++++
 dev-libs/glib/files/gobject_init_on_demand.patch   | 91 ++++++++++++++++++++++
 dev-libs/glib/files/quark_init_on_demand.patch     | 77 ++++++++++++++++++
 dev-libs/glib/glib-2.48.2.ebuild                   |  6 +-
 6 files changed, 228 insertions(+), 51 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 4f1405f..f9f4e55 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,6 +1,8 @@
 AUX glib-2.40.0-external-gdbus-codegen.patch 3901 SHA256 d06d2775c3632212c11eceb715f0da6a3b1ab6d8d901bb2fcb7c1fc3ca6b004a SHA512 2f960a53cf51f809af6788664e2cd6d67a29eb58dfe34156f665e2d5ae1fd53a3c792714672fc82dcbfae38e1c793a3eef07116484511ef21d96536559339b00 WHIRLPOOL 39dc4d38e6a3450cbba3a1843096da330b6b2bc8954b9cce4a890454e5546d3e6440ddd237772407bd4ffec05b78eb6ddddb5c4cb6c86a86e01a5ad4c96fe8b0
-AUX glib-2.48.2-musl-glibmm.patch 1496 SHA256 17cd23f9bea7eaa0ed4c3a83e894392d3d6824a462790cb1e3b6f10d591b9448 SHA512 6656b6c40366c43e48916a1851319f0a6b939ae5f1c78b9496930f47b566ab17924ee031ed6a0ea9beb8a4b1fc37b66ef1784b4a95a890dd71410717175509e7 WHIRLPOOL afc16f2a772a474f92eec77d666b88c88b6a96e2ded4b1e4e02f824bea7a903ead48ed2cdc1ab0f273f7e1d492e99bb5ae5e3545ffa3318e2fe56538d0a55d85
+AUX glib-2.50.3-fix-gdatetime-tests.patch 2052 SHA256 182695950e34356f3d97005cd0120d3a0ed1e485ec97b86b0c121a72c418c7b5 SHA512 7701cd1116626ef2b5a79e0d31f4c445a609b8b4481745f443fbac290670c776fbf4196a33a80629bf13bd9e405579715758e6c7ffcee72b6129d444d1dfa724 WHIRLPOOL 19f0193c57d2a4de5b1429ee3171c554e43aaadbc53e2f1471803a8b3c32c8ac6cd0ff5d5ed4ff46bb2923b09f97a354b2a3ae0989a633f2757c250a5b80a2f7
+AUX gobject_init_on_demand.patch 2113 SHA256 ffb30a240f23ee76dff0fc1ecc155288ea8bb976e814cc52e55c025e7ab792d0 SHA512 4281f0e1405618c593988b549b34f66bc530c2d3196364e0a387ca8f61fdd75065b40b039afc0711f73a8fcf5f9483f1d3c57fe3154bae9bc72243ede3bd239e WHIRLPOOL a7090b51c28421e7c600b495665a47866554e317810abce07dfa07070a7887655d09ac12c04b0dbb30ab442b22175849f49e433f25f3ef41b519de6bf49f42a6
+AUX quark_init_on_demand.patch 1725 SHA256 e09d8e723752c1f36b7451b244bbe4dd9b5c39ff0dcd5a778ddbfe93c5343ef5 SHA512 29311855d0058b8171914542304d04536c83cca265f094f9d537b6e9c2e2d71a5975967bb2743c4fa3a6c569c058c0c21b78dfaa0c9c3ce8aed7f474678a53d9 WHIRLPOOL 71bb85a258417014cd4ab7dbcc16779ef222408be37e590f9f67dfb2dbbf6bfefb9ce8ac1d0097216b6d92fb69c9c846678d7f71f5f45ab8de07f6b88f6c8ff0
 DIST glib-2.48.2.tar.xz 6408644 SHA256 f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4 SHA512 2eac104eb2207d0a6488992e48069a34b417f51e141364f281ab7b0953a6de88be177b1c694dd9464a856c9a5d8021e3cf0193a8d9c5aaf6ea11f1f9ff743c43 WHIRLPOOL cba211000d5597e93d01113e5f2b6736e47f4daa00935a53af182b3304fef9a1ac25f78995c7a53cc1234261433a1bbd1ec751c87b556845a15da720af5b971b
 DIST pkg-config-0.28.tar.gz 1931203 SHA256 6b6eb31c6ec4421174578652c7e141fdaae2dabad1021f420d8713206ac1f845 SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320 WHIRLPOOL db4ddb4ce61724e629931c5ffccb4d7a551b4dc0f4efed5a966822307e4b5a786adee5705dd80ec0a9aa32cb1af9ad9615e307360e131fc34688207216161486
-EBUILD glib-2.48.2.ebuild 8617 SHA256 2b64e2ebb7ecc6eda84de3254e5ce8ae984b60ddc3c54e20652059ec2eded32d SHA512 ea1327f401eae1ad945602e4e686a396ff6c90115beb161e6703fd102f534ef3e02104abdf9d9404307f66997fca2500013e63967f698dbd0e290a5c073b2e56 WHIRLPOOL f58d2c94fea90aef272e0009a5da9b01f216df26432b390c421985804bb19ba03a47c95b29d2e2a2e103bbc1a65af65154ba9e3aa6332629df66a03600daec51
+EBUILD glib-2.48.2.ebuild 8727 SHA256 a2baeca411a6c6755d42e1ab144466ae71502fbebefdf8c2511b615575c9589a SHA512 3f853481a142967e494fb88b1798c429b05ab81fa6d71e39a0d021ea1bbf24eda73ef5abdac4c4bcb0ebfd170ec261a658a5f4a40802dd5d1dcff4f941efe10a WHIRLPOOL 6d0063403a73bb3502b58520a349c828ebc991b4f7a2c06f0f5de2a6519e04431f1e0a1a9f7f45df8e149d360ea4f22f8db2f8154ea8f0f9bbe657c2d7e71af4
 MISC metadata.xml 955 SHA256 424ffc685dcfdfa5dcb142046d937915d07945217db814ff759b9b736d67f9e4 SHA512 31b87bd850ffaa3f2263e6435d2929ef9f8f979e6fe6cff86433c8841dc383088bc6d672ac7daf94c1ef660767d0e91a03860267df9c750dcde3204dd6631cb1 WHIRLPOOL cf59bd50dcfcc466ad19a81f458875b7e62fc569cda4f730defdbed72f0112395b332b52574c5794539c8e0255f7abaa9e7f14a9c5bb5fd6048ad3c4c35991c8

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
deleted file mode 100644
index 818ccf1..0000000
--- a/dev-libs/glib/files/glib-2.48.2-musl-glibmm.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 424c077cde206acdbb4d2c072513dc9bc8e850a4 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 6 Jul 2016 12:38:40 +0200
-Subject: [PATCH 3/3] gquark: fix initialization with c++ constructors
-
-C++ constructors may want create new quarks, but we can not guarantee
-that the glib library ctor is executed first. Therefore we make sure
-that quarks are always initialized from g_quark_from_string and
-g_quark_from_static_string
-
-This fixes crashes in glibmm with musl which likely happens on AIX too.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=768215
-https://bugzilla.gnome.org/show_bug.cgi?id=756139#c14
----
- glib/gquark.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/glib/gquark.c b/glib/gquark.c
-index e79ec9e..e93281e 100644
---- a/glib/gquark.c
-+++ b/glib/gquark.c
-@@ -57,6 +57,11 @@ static gint           quark_block_offset = 0;
- void
- g_quark_init (void)
- {
-+  /* we may be initialized from c++ constructor or the glib ctor, but we
-+  cannot guarantee in what order. So we check if we have been initialized */
-+  if (quark_ht != NULL)
-+    return;
-+
-   g_assert (quark_seq_id == 0);
-   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
-   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
-@@ -182,6 +187,9 @@ quark_from_string (const gchar *string,
-     return 0;
- 
-   G_LOCK (quark_global);
-+  if (G_UNLIKELY (quark_ht == NULL))
-+    g_quark_init();
-+
-   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
- 
-   if (!quark)
--- 
-2.9.0
-

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
new file mode 100644
index 0000000..6c41c5c
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
@@ -0,0 +1,52 @@
+From ec02a1875f29ecb8e46c0d8c1403cd00a0b3a9e4 Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain@orangesquash.org.uk>
+Date: Mon, 13 Mar 2017 16:52:11 +0000
+Subject: [PATCH] tests/gdatetime: Use a real rather than invented timezone
+
+The tzdata maintainers had previously invented abbreviations for
+timezones. As of their 2017a release, the one we were testing ("BRT")
+has been dropped.
+
+Switch to testing PST, which is a real timezone abbreviation.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=779799
+---
+ glib/tests/gdatetime.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
+index dcb8a8f..c54031d 100644
+--- a/glib/tests/gdatetime.c
++++ b/glib/tests/gdatetime.c
+@@ -635,22 +635,22 @@ test_GDateTime_new_full (void)
+   g_date_time_unref (dt);
+ 
+ #ifdef G_OS_UNIX
+-  tz = g_time_zone_new ("America/Recife");
++  tz = g_time_zone_new ("America/Tijuana");
+ #elif defined G_OS_WIN32
+-  tz = g_time_zone_new ("E. South America Standard Time");
++  tz = g_time_zone_new ("Pacific Standard Time");
+ #endif
+-  dt = g_date_time_new (tz, 2010, 5, 24, 8, 4, 0);
++  dt = g_date_time_new (tz, 2010, 11, 24, 8, 4, 0);
+   g_time_zone_unref (tz);
+   g_assert_cmpint (2010, ==, g_date_time_get_year (dt));
+-  g_assert_cmpint (5, ==, g_date_time_get_month (dt));
++  g_assert_cmpint (11, ==, g_date_time_get_month (dt));
+   g_assert_cmpint (24, ==, g_date_time_get_day_of_month (dt));
+   g_assert_cmpint (8, ==, g_date_time_get_hour (dt));
+   g_assert_cmpint (4, ==, g_date_time_get_minute (dt));
+   g_assert_cmpint (0, ==, g_date_time_get_second (dt));
+ #ifdef G_OS_UNIX
+-  g_assert_cmpstr ("BRT", ==, g_date_time_get_timezone_abbreviation (dt));
++  g_assert_cmpstr ("PST", ==, g_date_time_get_timezone_abbreviation (dt));
+ #elif defined G_OS_WIN32
+-  g_assert_cmpstr ("E. South America Standard Time", ==,
++  g_assert_cmpstr ("Pacific Standard Time", ==,
+                     g_date_time_get_timezone_abbreviation (dt));
+ #endif
+   g_assert (!g_date_time_is_daylight_savings (dt));
+-- 
+2.10.1
+

diff --git a/dev-libs/glib/files/gobject_init_on_demand.patch b/dev-libs/glib/files/gobject_init_on_demand.patch
new file mode 100644
index 0000000..024e588
--- /dev/null
+++ b/dev-libs/glib/files/gobject_init_on_demand.patch
@@ -0,0 +1,91 @@
+Initialize the gobject system on demand, i.e. before it is
+expected to be initialized. Do this only once by checking
+a local static variable gobject_initialized.
+
+--- a/gobject/gtype.c	2016-08-17 17:20:47.000000000 +0200
++++ b/gobject/gtype.c	2016-09-01 21:56:31.777406646 +0200
+@@ -209,6 +209,9 @@
+ static gboolean				type_node_is_a_L		(TypeNode		*node,
+ 									 TypeNode		*iface_node);
+ 
++#if !defined(__GLIBC__)
++static void gobject_init (void);
++#endif
+ 
+ /* --- enumeration --- */
+ 
+@@ -2631,7 +2634,10 @@
+ 			     GTypeFlags			 flags)
+ {
+   TypeNode *node;
+-  
++ 
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (type_id > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -2749,6 +2755,9 @@
+   TypeNode *pnode, *node;
+   GType type = 0;
+   
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (parent_type > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -2804,6 +2813,9 @@
+   TypeNode *pnode, *node;
+   GType type;
+   
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (parent_type > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -3319,6 +3331,9 @@
+ {
+   TypeNode *node;
+   
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   
+   node = lookup_type_node_I (type);
+@@ -4343,6 +4358,9 @@
+ void
+ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
+ {
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+ 
+   if (debug_flags)
+@@ -4361,6 +4379,9 @@
+ void
+ g_type_init (void)
+ {
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+ }
+ 
+@@ -4372,6 +4393,12 @@
+   TypeNode *node;
+   GType type;
+ 
++#if !defined(__GLIBC__)
++  static int gobject_initialized = 0;
++  if (gobject_initialized)
++    return;
++  gobject_initialized = 1;
++#endif
+   /* Ensure GLib is initialized first, see
+    * https://bugzilla.gnome.org/show_bug.cgi?id=756139
+    */

diff --git a/dev-libs/glib/files/quark_init_on_demand.patch b/dev-libs/glib/files/quark_init_on_demand.patch
new file mode 100644
index 0000000..4c07fa7
--- /dev/null
+++ b/dev-libs/glib/files/quark_init_on_demand.patch
@@ -0,0 +1,77 @@
+musl does not run ctors in the assumed order that glib-2.46 expects.
+Call g_quark_init() where it is expected to have been called.
+
+
+--- a/glib/gquark.c	2016-08-17 17:20:47.000000000 +0200
++++ b/glib/gquark.c	2016-08-30 07:49:13.298234757 +0200
+@@ -57,6 +57,9 @@
+ void
+ g_quark_init (void)
+ {
++  if (quark_ht)
++    return;
++
+   g_assert (quark_seq_id == 0);
+   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
+   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
+@@ -138,9 +141,12 @@
+     return 0;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+   G_UNLOCK (quark_global);
+
+   return quark;
+ }
+ 
+@@ -209,6 +213,9 @@
+     return 0;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = quark_from_string (string, TRUE);
+   G_UNLOCK (quark_global);
+ 
+@@ -243,6 +248,9 @@
+     return 0;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = quark_from_string (string, FALSE);
+   G_UNLOCK (quark_global);
+ 
+@@ -280,6 +286,7 @@
+   GQuark quark;
+   gchar **quarks_new;
+ 
++  g_quark_init ();
+   if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
+     {
+       quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
+@@ -323,6 +330,9 @@
+     return NULL;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = quark_from_string (string, TRUE);
+   result = quarks[quark];
+   G_UNLOCK (quark_global);
+@@ -353,6 +361,9 @@
+     return NULL;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = quark_from_string (string, FALSE);
+   result = quarks[quark];
+   G_UNLOCK (quark_global);

diff --git a/dev-libs/glib/glib-2.48.2.ebuild b/dev-libs/glib/glib-2.48.2.ebuild
index dbcb2ca..707a4f6 100644
--- a/dev-libs/glib/glib-2.48.2.ebuild
+++ b/dev-libs/glib/glib-2.48.2.ebuild
@@ -1,6 +1,5 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # Until bug #537330 glib is a reverse dependency of pkgconfig and, then
 # adding new dependencies end up making stage3 to grow. Every addition needs
@@ -84,7 +83,8 @@ pkg_setup() {
 
 src_prepare() {
 	# Fix for MUSL
-	epatch "${FILESDIR}"/${P}-musl-glibmm.patch
+	eapply "${FILESDIR}"/quark_init_on_demand.patch
+	eapply "${FILESDIR}"/gobject_init_on_demand.patch
 
 	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
 	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
@@ -116,6 +116,8 @@ src_prepare() {
 		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
 	fi
 
+	eapply "${FILESDIR}"/${PN}-2.50.3-fix-gdatetime-tests.patch
+
 	# gdbus-codegen is a separate package
 	eapply "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2018-12-03 12:27 Anthony G. Basile
  0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2018-12-03 12:27 UTC (permalink / raw
  To: gentoo-commits

commit:     7d0b2206dddb90e67d0395467134da814921d342
Author:     g3ngr33n <gengreen <AT> tutanota <DOT> com>
AuthorDate: Mon Dec  3 08:57:02 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Dec  3 12:26:02 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=7d0b2206

dev-libs/glib: glib-2.56.2 with musl patch

- 2.56.2-gobject_init_on_demand.patch : Ported from gobject_init_on_demand.patch
- 2.56.2-quark_init_on_demand.patch : Ported from quark_init_on_demand.patch
- 2.56.2-network-monitor-race-test-iterations.patch : main Gentoo patch
- glib-2.54.3-external-gdbus-codegen.patch : Nothing to change

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   2 +-
 .../glib/files/2.56.2-gobject_init_on_demand.patch |  91 +++++++
 ...56.2-network-monitor-race-test-iterations.patch |  36 +++
 .../glib/files/2.56.2-quark_init_on_demand.patch   |  50 ++++
 dev-libs/glib/glib-2.56.2.ebuild                   | 302 +++++++++++++++++++++
 5 files changed, 480 insertions(+), 1 deletion(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index b840e13..ff5fb4b 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,5 +1,5 @@
-DIST glib-2.50.3.tar.xz 7589284 BLAKE2B 8648e5d9e8f4c943ca3ec5a5ec01f380f55f76555bf4ec731e211b33d0e23c29ea2a9323e2e839f35f89f292863df76d4e8c622fc44c0e5905eb904576618dbd SHA512 ef35806c15170b6608445f255136c0bebd2d433adf903c2af2865f6a57b4f2fcfc1e4a7cea1a0dac48ff5fe26248fbf7886dba4a8d209506f0a94160df8fb7af
 DIST glib-2.52.3.tar.xz 7679972 BLAKE2B 8d9f6b714571bd04ab9717fbf9ded8556664e43dcdb7dd59436b8b7f1a8a5cdf98e9ce60ca1ead941af1d57688044fefb6c749fa735084622a3482b058864ff6 SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017
 DIST glib-2.54.3-patchset.tar.xz 39488 BLAKE2B 0bebd1f8eadd1796c355dbad20739ec2428a5b67e363e6ea61e2bab1e672506c438c80c602e87ec7d221ad92ad5c52adf7b57fb13441835e41f1e1208c26c6db SHA512 3d880c2681893da9267c8b2ba9a695eddbb1cef63f4ea26e052ce2f69e1e9d78eccdb27b235cbf0693ecd262bd70d020b24f82fc72ab11a4dbc2c929cfb72942
 DIST glib-2.54.3.tar.xz 7836536 BLAKE2B 140e7cf09a41b72a5b22e5b87e9674cbfdfe1b82f3cf5f0fd3ecb2ed6b1f62a90f8b4c0bc2f655e297f91394f771f6ecad210357e31f104ee49ca178be6b9d76 SHA512 23eb4458684624f80c17aa784eab42a38eec87bb5979fcfe56f0bc63b5c7bcf8251a0d4ea916fe2c8109ff5b14a4b60c6260755d079ff984c0d8e6a2871d307d
+DIST glib-2.56.2.tar.xz 8041756 BLAKE2B 1af5bb37378856e959602bcb9299266bba46b990839c923f6b9881624aed306af0779005281b3e3a46b5994c54812edc86aade9cb782c596fd63b6fd91baba51 SHA512 8201ea82d3613d2e879284abe01520b766da30957c5a1a22f3e6019b0cce6bf95d25beae78867b6a133401c4165153c0c92974dd459ab12f9e0e9dd0c95df5d4
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

diff --git a/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch b/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch
new file mode 100644
index 0000000..d8be8e2
--- /dev/null
+++ b/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch
@@ -0,0 +1,91 @@
+--- a/gobject/gtype.c
++++ b/gobject/gtype.c
+@@ -200,6 +200,9 @@
+ static gboolean				type_node_is_a_L		(TypeNode		*node,
+ 									 TypeNode		*iface_node);
+ 
++#if !defined(__GLIBC__)
++static void gobject_init (void);
++#endif
+ 
+ /* --- enumeration --- */
+ 
+@@ -2623,6 +2626,10 @@
+ {
+   TypeNode *node;
+   
++ #if !defined(__GLIBC__)
++  gobject_init();
++ #endif
++
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (type_id > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -2740,6 +2747,10 @@
+   TypeNode *pnode, *node;
+   GType type = 0;
+   
++ #if !defined(__GLIBC__)
++  gobject_init();
++ #endif
++
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (parent_type > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -2795,6 +2806,10 @@
+   TypeNode *pnode, *node;
+   GType type;
+   
++ #if !defined(__GLIBC__)
++   gobject_init();
++ #endif
++
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (parent_type > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -3309,7 +3324,11 @@
+ g_type_name (GType type)
+ {
+   TypeNode *node;
+-  
++
++  #if !defined(__GLIBC__)
++   gobject_init();
++ #endif 
++
+   g_assert_type_system_initialized ();
+   
+   node = lookup_type_node_I (type);
+@@ -4335,6 +4354,9 @@
+ void
+ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
+ {
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif
+   g_assert_type_system_initialized ();
+ 
+   if (debug_flags)
+@@ -4353,6 +4375,9 @@
+ void
+ g_type_init (void)
+ {
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+ }
+ 
+@@ -4364,6 +4389,12 @@
+   TypeNode *node;
+   GType type;
+ 
++#if !defined(__GLIBC__)
++  static int gobject_initialized = 0;
++  if (gobject_initialized)
++    return;
++  gobject_initialized = 1;
++#endif
+   /* Ensure GLib is initialized first, see
+    * https://bugzilla.gnome.org/show_bug.cgi?id=756139
+    */

diff --git a/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch b/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
new file mode 100644
index 0000000..1ddec6d
--- /dev/null
+++ b/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
@@ -0,0 +1,36 @@
+From a90c578952219e740f24d9f2560f54f19ae7e906 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <withnall@endlessm.com>
+Date: Wed, 11 Apr 2018 15:45:10 +0100
+Subject: [PATCH] tests: Lower number of iterations in network-monitor-race
+
+While 333 runs is very likely to reproduce the bug, Milan has previously
+reproduced it with as few as 9 runs. Since this test will be run by the
+CI machinery quite often, a lower number of runs each CI run will still
+probably catch any regressions over time.
+
+This reduces the total test runtime from 33s to 2s.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=793727
+
+Signed-off-by: Philip Withnall <withnall@endlessm.com>
+Reviewed-by: nobody
+---
+ gio/tests/network-monitor-race.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gio/tests/network-monitor-race.c b/gio/tests/network-monitor-race.c
+index 4b92c87a5..cadd62cee 100644
+--- a/gio/tests/network-monitor-race.c
++++ b/gio/tests/network-monitor-race.c
+@@ -18,7 +18,7 @@
+ #include <glib/glib.h>
+ #include <gio/gio.h>
+ 
+-#define MAX_RUNS 333
++#define MAX_RUNS 20
+ 
+ static gboolean
+ quit_loop (gpointer user_data)
+-- 
+2.17.0
+

diff --git a/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch b/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch
new file mode 100644
index 0000000..d93f85c
--- /dev/null
+++ b/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch
@@ -0,0 +1,50 @@
+--- a/glib/gquark.c
++++ b/glib/gquark.c
+@@ -57,6 +57,9 @@
+ void
+ g_quark_init (void)
+ {
++  if (quark_ht)
++    return;
++
+   g_assert (quark_seq_id == 0);
+   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
+   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
+@@ -138,6 +141,9 @@
+     return 0;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+   G_UNLOCK (quark_global);
+ 
+@@ -200,6 +206,9 @@
+     return 0;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = quark_from_string (string, duplicate);
+   G_UNLOCK (quark_global);
+ 
+@@ -278,6 +287,7 @@
+   GQuark quark;
+   gchar **quarks_new;
+ 
++  g_quark_init ();
+   if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
+     {
+       quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
+@@ -310,6 +320,9 @@
+     return NULL;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++ g_quark_init ();
++#endif
+   quark = quark_from_string (string, duplicate);
+   result = quarks[quark];
+   G_UNLOCK (quark_global);

diff --git a/dev-libs/glib/glib-2.56.2.ebuild b/dev-libs/glib/glib-2.56.2.ebuild
new file mode 100644
index 0000000..ed88114
--- /dev/null
+++ b/dev-libs/glib/glib-2.56.2.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2018 Gentoo Fondation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
+GNOME2_EAUTORECONF=yes
+
+inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
+	multilib multilib-minimal pax-utils python-any-r1 toolchain-funcs virtualx
+
+# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
+# adding new dependencies end up making stage3 to grow. Every addition needs
+# then to be think very closely.
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="https://www.gtk.org/"
+SRC_URI="${SRC_URI}
+	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+
+# Added util-linux multilib dependency to have libmount support (which
+# is always turned on on linux systems, unless explicitly disabled, but
+# this ebuild does not do that anyway) (bug #599586)
+
+RDEPEND="
+	!<dev-util/gdbus-codegen-${PV}
+	>=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP},static-libs?]
+	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
+	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
+	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
+	utils? (
+		>=dev-util/gdbus-codegen-${PV}
+		virtual/libelf:0=
+	)
+"
+DEPEND="${RDEPEND}
+	app-text/docbook-xml-dtd:4.1.2
+	>=dev-libs/libxslt-1.0
+	>=sys-devel/gettext-0.11
+	>=dev-util/gtk-doc-am-1.20
+	systemtap? ( >=dev-util/systemtap-1.3 )
+	${PYTHON_DEPS}
+	test? (
+		sys-devel/gdb
+		>=dev-util/gdbus-codegen-${PV}
+		>=sys-apps/dbus-1.2.14 )
+	!<dev-util/gtk-doc-1.15-r2
+"
+# Migration of glib-genmarshal, glib-mkenums and gtester-report to a separate
+# python depending package, which can be buildtime depended in packages that
+# need these tools, without pulling in python at runtime.
+RDEPEND="${RDEPEND}
+	>=dev-util/glib-utils-${PV}"
+PDEPEND="
+	dbus? ( gnome-base/dconf )
+	mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/gio-querymodules$(get_exeext)
+)
+
+pkg_setup() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~INOTIFY_USER"
+		if use test ; then
+			CONFIG_CHECK="~IPV6"
+			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+		fi
+		linux-info_pkg_setup
+	fi
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+
+	# Musl fix
+	eapply "${FILESDIR}/${PV}-quark_init_on_demand.patch"
+	eapply "${FILESDIR}/${PV}-gobject_init_on_demand.patch"
+
+	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
+	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
+
+	if use test; then
+		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+		if ! has_version dev-util/desktop-file-utils ; then
+			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+			ewarn "think on installing it to get these tests run."
+			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+		fi
+
+		# gdesktopappinfo requires existing terminal (gnome-terminal or any
+		# other), falling back to xterm if one doesn't exist
+		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+			ewarn "Some tests will be skipped due to missing terminal program"
+			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+		fi
+
+		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
+		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+
+		ewarn "Tests for search-utils have been skipped"
+		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
+	else
+		# Don't build tests, also prevents extra deps, bug #512022
+		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
+	fi
+
+	# Less max runs in network monitor race test to avoid hitting timeout limits
+	eapply "${FILESDIR}"/${PV}-network-monitor-race-test-iterations.patch # included in 2.57.1
+
+	# gdbus-codegen is a separate package
+	eapply "${FILESDIR}"/${PN}-2.54.3-external-gdbus-codegen.patch
+
+	gnome2_src_prepare
+	epunt_cxx
+}
+
+multilib_src_configure() {
+	# Avoid circular depend with dev-util/pkgconfig and
+	# native builds (cross-compiles won't need pkg-config
+	# in the target ROOT to work here)
+	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
+		if has_version sys-apps/dbus; then
+			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
+			export DBUS1_LIBS="-ldbus-1"
+		fi
+		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
+		export LIBFFI_LIBS="-lffi"
+		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
+		export PCRE_LIBS="-lpcre"
+	fi
+
+	# These configure tests don't work when cross-compiling.
+	if tc-is-cross-compiler ; then
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
+		case ${CHOST} in
+		hppa*|metag*) export glib_cv_stack_grows=yes ;;
+		*)            export glib_cv_stack_grows=no ;;
+		esac
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
+		export glib_cv_uscore=no
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
+		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
+	fi
+
+	local myconf
+
+	case "${CHOST}" in
+		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
+		*)        myconf="${myconf} --with-threads=posix" ;;
+	esac
+
+	# libelf used only by the gresource bin
+	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
+		$(usex debug --enable-debug=yes ' ') \
+		$(use_enable xattr) \
+		$(use_enable fam) \
+		$(use_enable kernel_linux libmount) \
+		$(use_enable selinux) \
+		$(use_enable static-libs static) \
+		$(use_enable systemtap dtrace) \
+		$(use_enable systemtap systemtap) \
+		$(multilib_native_use_enable utils libelf) \
+		--with-python=${EPYTHON} \
+		--disable-compile-warnings \
+		--enable-man \
+		--with-pcre=system \
+		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
+
+	if multilib_is_native_abi; then
+		local d
+		for d in glib gio gobject; do
+			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
+		done
+	fi
+}
+
+multilib_src_test() {
+	export XDG_CONFIG_DIRS=/etc/xdg
+	export XDG_DATA_DIRS=/usr/local/share:/usr/share
+	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+	export LC_TIME=C # bug #411967
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# Related test is a bit nitpicking
+	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+
+	# Hardened: gdb needs this, bug #338891
+	if host-is-pax ; then
+		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
+			|| die "Hardened adjustment failed"
+	fi
+
+	# Need X for dbus-launch session X11 initialization
+	virtx emake check
+}
+
+multilib_src_install() {
+	emake DESTDIR="${D}" completiondir="$(get_bashcompdir)" install
+	keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	# These are installed by dev-util/glib-utils
+	# 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
+	rm "${ED}usr/bin/glib-genmarshal" || die
+	rm "${ED}usr/share/man/man1/glib-genmarshal.1" || die
+	rm "${ED}usr/bin/glib-mkenums" || die
+	rm "${ED}usr/share/man/man1/glib-mkenums.1" || die
+	rm "${ED}usr/bin/gtester-report" || die
+	rm "${ED}usr/share/man/man1/gtester-report.1" || die
+
+	# Do not install charset.alias even if generated, leave it to libiconv
+	rm -f "${ED}/usr/$(get_libdir)/charset.alias"
+
+	# Don't install gdb python macros, bug 291328
+	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
+
+	# Completely useless with or without USE static-libs, people need to use pkg-config
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+	gnome2_pkg_preinst
+
+	# Make gschemas.compiled belong to glib alone
+	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
+
+	if [[ -e ${EROOT}${cache} ]]; then
+		cp "${EROOT}"${cache} "${ED}"/${cache} || die
+	else
+		touch "${ED}"/${cache} || die
+	fi
+
+	multilib_pkg_preinst() {
+		# Make giomodule.cache belong to glib alone
+		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
+
+		if [[ -e ${EROOT}${cache} ]]; then
+			cp "${EROOT}"${cache} "${ED}"/${cache} || die
+		else
+			touch "${ED}"/${cache} || die
+		fi
+	}
+
+	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
+	# file due to inability to create it and GIO might not look at any of the modules there
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_preinst
+	fi
+}
+
+pkg_postinst() {
+	# force (re)generation of gschemas.compiled
+	GNOME2_ECLASS_GLIB_SCHEMAS="force"
+
+	gnome2_pkg_postinst
+
+	multilib_pkg_postinst() {
+		gnome2_giomodule_cache_update \
+			|| die "Update GIO modules cache failed (for ${ABI})"
+	}
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_postinst
+	else
+		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+		ewarn "You might want to run gio-querymodules manually on the target for"
+		ewarn "your final image for performance reasons and re-run it when packages"
+		ewarn "installing GIO modules get upgraded or added to the image."
+	fi
+}
+
+pkg_postrm() {
+	gnome2_pkg_postrm
+
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+		multilib_pkg_postrm() {
+			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
+		}
+		multilib_foreach_abi multilib_pkg_postrm
+		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
+	fi
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2018-12-29 18:15 Anthony G. Basile
  0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2018-12-29 18:15 UTC (permalink / raw
  To: gentoo-commits

commit:     fac88566301ae04eafc520a42c4fb971cfe9f6be
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 29 18:15:34 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 29 18:15:34 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=fac88566

dev-libs/glib: in tree version works

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   5 -
 .../glib/files/2.56.2-gobject_init_on_demand.patch |  91 ------
 ...56.2-network-monitor-race-test-iterations.patch |  36 ---
 .../glib/files/2.56.2-quark_init_on_demand.patch   |  50 ----
 .../files/glib-2.50.0-external-gdbus-codegen.patch |  93 -------
 .../files/glib-2.54.3-external-gdbus-codegen.patch |  86 ------
 dev-libs/glib/files/gobject_init_on_demand.patch   |  91 ------
 dev-libs/glib/files/quark_init_on_demand.patch     |  77 -----
 dev-libs/glib/glib-2.52.3.ebuild                   | 305 --------------------
 dev-libs/glib/glib-2.54.3-r6.ebuild                | 309 ---------------------
 dev-libs/glib/glib-2.56.2.ebuild                   | 302 --------------------
 dev-libs/glib/metadata.xml                         |  31 ---
 12 files changed, 1476 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
deleted file mode 100644
index ff5fb4b..0000000
--- a/dev-libs/glib/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-DIST glib-2.52.3.tar.xz 7679972 BLAKE2B 8d9f6b714571bd04ab9717fbf9ded8556664e43dcdb7dd59436b8b7f1a8a5cdf98e9ce60ca1ead941af1d57688044fefb6c749fa735084622a3482b058864ff6 SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017
-DIST glib-2.54.3-patchset.tar.xz 39488 BLAKE2B 0bebd1f8eadd1796c355dbad20739ec2428a5b67e363e6ea61e2bab1e672506c438c80c602e87ec7d221ad92ad5c52adf7b57fb13441835e41f1e1208c26c6db SHA512 3d880c2681893da9267c8b2ba9a695eddbb1cef63f4ea26e052ce2f69e1e9d78eccdb27b235cbf0693ecd262bd70d020b24f82fc72ab11a4dbc2c929cfb72942
-DIST glib-2.54.3.tar.xz 7836536 BLAKE2B 140e7cf09a41b72a5b22e5b87e9674cbfdfe1b82f3cf5f0fd3ecb2ed6b1f62a90f8b4c0bc2f655e297f91394f771f6ecad210357e31f104ee49ca178be6b9d76 SHA512 23eb4458684624f80c17aa784eab42a38eec87bb5979fcfe56f0bc63b5c7bcf8251a0d4ea916fe2c8109ff5b14a4b60c6260755d079ff984c0d8e6a2871d307d
-DIST glib-2.56.2.tar.xz 8041756 BLAKE2B 1af5bb37378856e959602bcb9299266bba46b990839c923f6b9881624aed306af0779005281b3e3a46b5994c54812edc86aade9cb782c596fd63b6fd91baba51 SHA512 8201ea82d3613d2e879284abe01520b766da30957c5a1a22f3e6019b0cce6bf95d25beae78867b6a133401c4165153c0c92974dd459ab12f9e0e9dd0c95df5d4
-DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

diff --git a/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch b/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch
deleted file mode 100644
index d8be8e2..0000000
--- a/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- a/gobject/gtype.c
-+++ b/gobject/gtype.c
-@@ -200,6 +200,9 @@
- static gboolean				type_node_is_a_L		(TypeNode		*node,
- 									 TypeNode		*iface_node);
- 
-+#if !defined(__GLIBC__)
-+static void gobject_init (void);
-+#endif
- 
- /* --- enumeration --- */
- 
-@@ -2623,6 +2626,10 @@
- {
-   TypeNode *node;
-   
-+ #if !defined(__GLIBC__)
-+  gobject_init();
-+ #endif
-+
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (type_id > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -2740,6 +2747,10 @@
-   TypeNode *pnode, *node;
-   GType type = 0;
-   
-+ #if !defined(__GLIBC__)
-+  gobject_init();
-+ #endif
-+
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (parent_type > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -2795,6 +2806,10 @@
-   TypeNode *pnode, *node;
-   GType type;
-   
-+ #if !defined(__GLIBC__)
-+   gobject_init();
-+ #endif
-+
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (parent_type > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -3309,7 +3324,11 @@
- g_type_name (GType type)
- {
-   TypeNode *node;
--  
-+
-+  #if !defined(__GLIBC__)
-+   gobject_init();
-+ #endif 
-+
-   g_assert_type_system_initialized ();
-   
-   node = lookup_type_node_I (type);
-@@ -4335,6 +4354,9 @@
- void
- g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
- {
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif
-   g_assert_type_system_initialized ();
- 
-   if (debug_flags)
-@@ -4353,6 +4375,9 @@
- void
- g_type_init (void)
- {
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
- }
- 
-@@ -4364,6 +4389,12 @@
-   TypeNode *node;
-   GType type;
- 
-+#if !defined(__GLIBC__)
-+  static int gobject_initialized = 0;
-+  if (gobject_initialized)
-+    return;
-+  gobject_initialized = 1;
-+#endif
-   /* Ensure GLib is initialized first, see
-    * https://bugzilla.gnome.org/show_bug.cgi?id=756139
-    */

diff --git a/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch b/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
deleted file mode 100644
index 1ddec6d..0000000
--- a/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From a90c578952219e740f24d9f2560f54f19ae7e906 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <withnall@endlessm.com>
-Date: Wed, 11 Apr 2018 15:45:10 +0100
-Subject: [PATCH] tests: Lower number of iterations in network-monitor-race
-
-While 333 runs is very likely to reproduce the bug, Milan has previously
-reproduced it with as few as 9 runs. Since this test will be run by the
-CI machinery quite often, a lower number of runs each CI run will still
-probably catch any regressions over time.
-
-This reduces the total test runtime from 33s to 2s.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=793727
-
-Signed-off-by: Philip Withnall <withnall@endlessm.com>
-Reviewed-by: nobody
----
- gio/tests/network-monitor-race.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/tests/network-monitor-race.c b/gio/tests/network-monitor-race.c
-index 4b92c87a5..cadd62cee 100644
---- a/gio/tests/network-monitor-race.c
-+++ b/gio/tests/network-monitor-race.c
-@@ -18,7 +18,7 @@
- #include <glib/glib.h>
- #include <gio/gio.h>
- 
--#define MAX_RUNS 333
-+#define MAX_RUNS 20
- 
- static gboolean
- quit_loop (gpointer user_data)
--- 
-2.17.0
-

diff --git a/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch b/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch
deleted file mode 100644
index d93f85c..0000000
--- a/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/glib/gquark.c
-+++ b/glib/gquark.c
-@@ -57,6 +57,9 @@
- void
- g_quark_init (void)
- {
-+  if (quark_ht)
-+    return;
-+
-   g_assert (quark_seq_id == 0);
-   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
-   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
-@@ -138,6 +141,9 @@
-     return 0;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
-   G_UNLOCK (quark_global);
- 
-@@ -200,6 +206,9 @@
-     return 0;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = quark_from_string (string, duplicate);
-   G_UNLOCK (quark_global);
- 
-@@ -278,6 +287,7 @@
-   GQuark quark;
-   gchar **quarks_new;
- 
-+  g_quark_init ();
-   if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
-     {
-       quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
-@@ -310,6 +320,9 @@
-     return NULL;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+ g_quark_init ();
-+#endif
-   quark = quark_from_string (string, duplicate);
-   result = quarks[quark];
-   G_UNLOCK (quark_global);

diff --git a/dev-libs/glib/files/glib-2.50.0-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.50.0-external-gdbus-codegen.patch
deleted file mode 100644
index 2c942d5..0000000
--- a/dev-libs/glib/files/glib-2.50.0-external-gdbus-codegen.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index e8e7553..216e59d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -385,14 +385,14 @@ AC_SUBST(PERL_PATH)
- # option to specify python interpreter to use; this just sets $PYTHON, so that
- # we will fallback to reading $PYTHON if --with-python is not given, and
- # python.m4 will get the expected input
--AC_ARG_WITH(python,
--            AS_HELP_STRING([--with-python=PATH],
--                           [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]),
--            [PYTHON="$withval"], [])
--if test x"$PYTHON" = xyes; then
--  AC_MSG_ERROR([--with-python option requires a path or program argument])
--fi
--AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5")
-+# AC_ARG_WITH(python,
-+#             AS_HELP_STRING([--with-python=PATH],
-+#                            [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]),
-+#             [PYTHON="$withval"], [])
-+# if test x"$PYTHON" = xyes; then
-+#   AC_MSG_ERROR([--with-python option requires a path or program argument])
-+# fi
-+# AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5")
- 
- 
- dnl ***********************
-@@ -3453,7 +3453,6 @@ gobject/glib-mkenums
- gobject/tests/Makefile
- gthread/Makefile
- gio/Makefile
--gio/gdbus-2.0/codegen/Makefile
- gio/gdbus-2.0/codegen/config.py
- gio/gnetworking.h
- gio/xdgmime/Makefile
-diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
-index 5741a3e..d38e768 100644
---- a/docs/reference/gio/Makefile.am
-+++ b/docs/reference/gio/Makefile.am
-@@ -177,7 +177,6 @@ man_MANS +=				\
- 	gsettings.1			\
- 	gresource.1			\
- 	gdbus.1				\
--	gdbus-codegen.1			\
- 	gio.1				\
- 	$(NULL)
- 
-diff --git a/gio/Makefile.am b/gio/Makefile.am
-index ffe5ee2..929d1b5 100644
---- a/gio/Makefile.am
-+++ b/gio/Makefile.am
-@@ -1,6 +1,6 @@
- include $(top_srcdir)/glib.mk
- 
--SUBDIRS = gdbus-2.0/codegen
-+SUBDIRS =
- 
- if OS_UNIX
- SUBDIRS += xdgmime
-diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
-index 749267b..f2a8c63 100644
---- a/gio/tests/Makefile.am
-+++ b/gio/tests/Makefile.am
-@@ -449,10 +449,8 @@ gnotification_SOURCES                    = $(gdbus_sessionbus_sources) gnotifica
- 
- BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
- gdbus-test-codegen.o: gdbus-test-codegen-generated.h
--gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
--	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
--		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
--		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
-+gdbus-test-codegen-generated.h: test-codegen.xml Makefile
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-prefix org.project. \
- 		--generate-c-code gdbus-test-codegen-generated \
- 		--c-generate-object-manager \
-diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
-index 1d0464c..0603d9b 100644
---- a/gio/tests/gdbus-object-manager-example/Makefile.am
-+++ b/gio/tests/gdbus-object-manager-example/Makefile.am
-@@ -11,10 +11,8 @@ GDBUS_GENERATED = \
- 	gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml	\
- 	$(NULL)
- 
--$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
--	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
--		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
--		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
-+$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-prefix org.gtk.GDBus.Example.ObjectManager. \
- 		--c-namespace Example \
- 		--c-generate-object-manager \

diff --git a/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch
deleted file mode 100644
index a27966e..0000000
--- a/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 2e47d49bc91d83cd0abea4c1944bfca4336040fa Mon Sep 17 00:00:00 2001
-From: Sobhan Mohammadpour <sobhan@gentoo.org>
-Date: Fri, 23 Feb 2018 15:27:33 +0330
-Subject: [PATCH] glib-2.54.3-external-gdbus-codegen-for-autotools
-
----
- configure.ac                                       |  1 -
- docs/reference/gio/Makefile.am                     |  1 -
- gio/Makefile.am                                    |  2 +-
- gio/tests/Makefile.am                              |  6 ++----
- gio/tests/gdbus-object-manager-example/Makefile.am |  6 ++----
- 5 files changed, 5 insertions(+), 11 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0457c90..07166c9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3469,7 +3469,6 @@ gobject/glib-mkenums
- gobject/tests/Makefile
- gthread/Makefile
- gio/Makefile
--gio/gdbus-2.0/codegen/Makefile
- gio/gdbus-2.0/codegen/config.py
- gio/gnetworking.h
- gio/xdgmime/Makefile
-diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
-index 5741a3e..d38e768 100644
---- a/docs/reference/gio/Makefile.am
-+++ b/docs/reference/gio/Makefile.am
-@@ -177,7 +177,6 @@ man_MANS +=				\
- 	gsettings.1			\
- 	gresource.1			\
- 	gdbus.1				\
--	gdbus-codegen.1			\
- 	gio.1				\
- 	$(NULL)
- 
-diff --git a/gio/Makefile.am b/gio/Makefile.am
-index b2db995..53d7162 100644
---- a/gio/Makefile.am
-+++ b/gio/Makefile.am
-@@ -1,6 +1,6 @@
- include $(top_srcdir)/glib.mk
- 
--SUBDIRS = gdbus-2.0/codegen
-+SUBDIRS = 
- 
- if OS_UNIX
- if !OS_COCOA
-diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
-index acc1da4..7c51eab 100644
---- a/gio/tests/Makefile.am
-+++ b/gio/tests/Makefile.am
-@@ -460,10 +460,8 @@ gnotification_SOURCES                    = $(gdbus_sessionbus_sources) gnotifica
- 
- BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
- gdbus-test-codegen.o: gdbus-test-codegen-generated.h
--gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
--	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
--		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
--		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
-+gdbus-test-codegen-generated.h: test-codegen.xml Makefile
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-prefix org.project. \
- 		--generate-c-code gdbus-test-codegen-generated \
- 		--c-generate-object-manager \
-diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
-index 1d0464c..f390dca 100644
---- a/gio/tests/gdbus-object-manager-example/Makefile.am
-+++ b/gio/tests/gdbus-object-manager-example/Makefile.am
-@@ -11,10 +11,8 @@ GDBUS_GENERATED = \
- 	gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml	\
- 	$(NULL)
- 
--$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
--	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
--		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
--		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
-+$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-prefix org.gtk.GDBus.Example.ObjectManager. \
- 		--c-namespace Example \
- 		--c-generate-object-manager \
--- 
-2.16.1
-

diff --git a/dev-libs/glib/files/gobject_init_on_demand.patch b/dev-libs/glib/files/gobject_init_on_demand.patch
deleted file mode 100644
index 024e588..0000000
--- a/dev-libs/glib/files/gobject_init_on_demand.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Initialize the gobject system on demand, i.e. before it is
-expected to be initialized. Do this only once by checking
-a local static variable gobject_initialized.
-
---- a/gobject/gtype.c	2016-08-17 17:20:47.000000000 +0200
-+++ b/gobject/gtype.c	2016-09-01 21:56:31.777406646 +0200
-@@ -209,6 +209,9 @@
- static gboolean				type_node_is_a_L		(TypeNode		*node,
- 									 TypeNode		*iface_node);
- 
-+#if !defined(__GLIBC__)
-+static void gobject_init (void);
-+#endif
- 
- /* --- enumeration --- */
- 
-@@ -2631,7 +2634,10 @@
- 			     GTypeFlags			 flags)
- {
-   TypeNode *node;
--  
-+ 
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (type_id > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -2749,6 +2755,9 @@
-   TypeNode *pnode, *node;
-   GType type = 0;
-   
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (parent_type > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -2804,6 +2813,9 @@
-   TypeNode *pnode, *node;
-   GType type;
-   
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (parent_type > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -3319,6 +3331,9 @@
- {
-   TypeNode *node;
-   
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
-   
-   node = lookup_type_node_I (type);
-@@ -4343,6 +4358,9 @@
- void
- g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
- {
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
- 
-   if (debug_flags)
-@@ -4361,6 +4379,9 @@
- void
- g_type_init (void)
- {
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
- }
- 
-@@ -4372,6 +4393,12 @@
-   TypeNode *node;
-   GType type;
- 
-+#if !defined(__GLIBC__)
-+  static int gobject_initialized = 0;
-+  if (gobject_initialized)
-+    return;
-+  gobject_initialized = 1;
-+#endif
-   /* Ensure GLib is initialized first, see
-    * https://bugzilla.gnome.org/show_bug.cgi?id=756139
-    */

diff --git a/dev-libs/glib/files/quark_init_on_demand.patch b/dev-libs/glib/files/quark_init_on_demand.patch
deleted file mode 100644
index 4c07fa7..0000000
--- a/dev-libs/glib/files/quark_init_on_demand.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-musl does not run ctors in the assumed order that glib-2.46 expects.
-Call g_quark_init() where it is expected to have been called.
-
-
---- a/glib/gquark.c	2016-08-17 17:20:47.000000000 +0200
-+++ b/glib/gquark.c	2016-08-30 07:49:13.298234757 +0200
-@@ -57,6 +57,9 @@
- void
- g_quark_init (void)
- {
-+  if (quark_ht)
-+    return;
-+
-   g_assert (quark_seq_id == 0);
-   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
-   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
-@@ -138,9 +141,12 @@
-     return 0;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
-   G_UNLOCK (quark_global);
-
-   return quark;
- }
- 
-@@ -209,6 +213,9 @@
-     return 0;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = quark_from_string (string, TRUE);
-   G_UNLOCK (quark_global);
- 
-@@ -243,6 +248,9 @@
-     return 0;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = quark_from_string (string, FALSE);
-   G_UNLOCK (quark_global);
- 
-@@ -280,6 +286,7 @@
-   GQuark quark;
-   gchar **quarks_new;
- 
-+  g_quark_init ();
-   if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
-     {
-       quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
-@@ -323,6 +330,9 @@
-     return NULL;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = quark_from_string (string, TRUE);
-   result = quarks[quark];
-   G_UNLOCK (quark_global);
-@@ -353,6 +361,9 @@
-     return NULL;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = quark_from_string (string, FALSE);
-   result = quarks[quark];
-   G_UNLOCK (quark_global);

diff --git a/dev-libs/glib/glib-2.52.3.ebuild b/dev-libs/glib/glib-2.52.3.ebuild
deleted file mode 100644
index 29ec14b..0000000
--- a/dev-libs/glib/glib-2.52.3.ebuild
+++ /dev/null
@@ -1,305 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
-# adding new dependencies end up making stage3 to grow. Every addition needs
-# then to be think very closely.
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-# Completely useless with or without USE static-libs, people need to use
-# pkg-config
-GNOME2_LA_PUNT="yes"
-
-inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
-	multilib multilib-minimal pax-utils python-r1 toolchain-funcs versionator virtualx
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-SRC_URI="${SRC_URI}
-	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
-REQUIRED_USE="
-	utils? ( ${PYTHON_REQUIRED_USE} )
-	test? ( ${PYTHON_REQUIRED_USE} )
-"
-
-KEYWORDS="amd64 arm arm64 ~mips ppc x86"
-
-# Added util-linux multilib dependency to have libmount support (which
-# is always turned on on linux systems, unless explicitly disabled, but
-# this ebuild does not do that anyway) (bug #599586)
-
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP},static-libs?]
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	utils? (
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		virtual/libelf:0=
-	)
-"
-DEPEND="${RDEPEND}
-	app-text/docbook-xml-dtd:4.1.2
-	>=dev-libs/libxslt-1.0
-	>=sys-devel/gettext-0.11
-	>=dev-util/gtk-doc-am-1.20
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	test? (
-		sys-devel/gdb
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		>=sys-apps/dbus-1.2.14 )
-	!<dev-util/gtk-doc-1.15-r2
-"
-PDEPEND="!<gnome-base/gvfs-1.6.4-r990
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-# Earlier versions of gvfs do not work with glib
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-
-	# Fix for MUSL
-	eapply "${FILESDIR}"/quark_init_on_demand.patch
-	eapply "${FILESDIR}"/gobject_init_on_demand.patch
-
-	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
-	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
-
-	if use test; then
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-			ewarn "Some tests will be skipped due to missing terminal program"
-			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
-	fi
-
-	# gdbus-codegen is a separate package
-	eapply "${FILESDIR}"/${PN}-2.50.0-external-gdbus-codegen.patch
-
-	# Leave python shebang alone - handled by python_replicate_script
-	# We could call python_setup and give configure a valid --with-python
-	# arg, but that would mean a build dep on python when USE=utils.
-	sed -e '/${PYTHON}/d' \
-		-i glib/Makefile.{am,in} || die
-
-	# Also needed to prevent cross-compile failures, see bug #267603
-	eautoreconf
-
-	gnome2_src_prepare
-
-	epunt_cxx
-}
-
-multilib_src_configure() {
-	# Avoid circular depend with dev-util/pkgconfig and
-	# native builds (cross-compiles won't need pkg-config
-	# in the target ROOT to work here)
-	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
-		if has_version sys-apps/dbus; then
-			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
-			export DBUS1_LIBS="-ldbus-1"
-		fi
-		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
-		export LIBFFI_LIBS="-lffi"
-		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
-		export PCRE_LIBS="-lpcre"
-	fi
-
-	# These configure tests don't work when cross-compiling.
-	if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		case ${CHOST} in
-		hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		*)            export glib_cv_stack_grows=no ;;
-		esac
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
-		export glib_cv_uscore=no
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
-		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
-	fi
-
-	local myconf
-
-	case "${CHOST}" in
-		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
-		*)        myconf="${myconf} --with-threads=posix" ;;
-	esac
-
-	# libelf used only by the gresource bin
-	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
-		$(usex debug --enable-debug=yes ' ') \
-		$(use_enable xattr) \
-		$(use_enable fam) \
-		$(use_enable kernel_linux libmount) \
-		$(use_enable selinux) \
-		$(use_enable static-libs static) \
-		$(use_enable systemtap dtrace) \
-		$(use_enable systemtap systemtap) \
-		$(multilib_native_use_enable utils libelf) \
-		--disable-compile-warnings \
-		--enable-man \
-		--with-pcre=system \
-		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
-
-	if multilib_is_native_abi; then
-		local d
-		for d in glib gio gobject; do
-			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	# Hardened: gdb needs this, bug #338891
-	if host-is-pax ; then
-		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
-			|| die "Hardened adjustment failed"
-	fi
-
-	# Need X for dbus-launch session X11 initialization
-	virtx emake check
-}
-
-multilib_src_install() {
-	gnome2_src_install completiondir="$(get_bashcompdir)"
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	if use utils ; then
-		python_replicate_script "${ED}"/usr/bin/gtester-report
-	else
-		rm "${ED}usr/bin/gtester-report"
-		rm "${ED}usr/share/man/man1/gtester-report.1"
-	fi
-
-	# Do not install charset.alias even if generated, leave it to libiconv
-	rm -f "${ED}/usr/lib/charset.alias"
-
-	# Don't install gdb python macros, bug 291328
-	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
-}
-
-pkg_preinst() {
-	gnome2_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"/${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"/${cache} || die
-		else
-			touch "${ED}"/${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	# force (re)generation of gschemas.compiled
-	GNOME2_ECLASS_GLIB_SCHEMAS="force"
-
-	gnome2_pkg_postinst
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-}
-
-pkg_postrm() {
-	gnome2_pkg_postrm
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}

diff --git a/dev-libs/glib/glib-2.54.3-r6.ebuild b/dev-libs/glib/glib-2.54.3-r6.ebuild
deleted file mode 100644
index 4521ac0..0000000
--- a/dev-libs/glib/glib-2.54.3-r6.ebuild
+++ /dev/null
@@ -1,309 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
-# adding new dependencies end up making stage3 to grow. Every addition needs
-# then to be think very closely.
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-# Completely useless with or without USE static-libs, people need to use
-# pkg-config
-GNOME2_LA_PUNT="yes"
-
-inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
-	multilib multilib-minimal pax-utils python-single-r1 toolchain-funcs versionator virtualx
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-SRC_URI="${SRC_URI} https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz
-	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	test? ( ${PYTHON_REQUIRED_USE} )
-" # test dep left here and elsewhere to not forget, as global python requirement is supposed to be temporary until a split package is made with meson
-
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-
-# Added util-linux multilib dependency to have libmount support (which
-# is always turned on on linux systems, unless explicitly disabled, but
-# this ebuild does not do that anyway) (bug #599586)
-
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP},static-libs?]
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	${PYTHON_DEPS}
-	utils? (
-		>=dev-util/gdbus-codegen-${PV}
-		virtual/libelf:0=
-	)
-"
-DEPEND="${RDEPEND}
-	app-text/docbook-xml-dtd:4.1.2
-	>=dev-libs/libxslt-1.0
-	>=sys-devel/gettext-0.11
-	>=dev-util/gtk-doc-am-1.20
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	test? (
-		sys-devel/gdb
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}
-		>=sys-apps/dbus-1.2.14 )
-	!<dev-util/gtk-doc-1.15-r2
-"
-PDEPEND="!<gnome-base/gvfs-1.6.4-r990
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-# Earlier versions of gvfs do not work with glib
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-	# FIXME: Move python deps that are only required at build time of other packages to a split package
-	python-single-r1_pkg_setup
-}
-
-src_prepare() {
-
-	# Fix for MUSL
-	eapply "${FILESDIR}"/quark_init_on_demand.patch
-	eapply "${FILESDIR}"/gobject_init_on_demand.patch
-
-	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
-	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
-
-	if use test; then
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-			ewarn "Some tests will be skipped due to missing terminal program"
-			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
-	fi
-
-	# gdbus-codegen is a separate package
-	eapply "${FILESDIR}"/${PN}-2.54.3-external-gdbus-codegen.patch
-
-	# Upstream glib-2-54 branch; includes fixups for potential libreoffice lockups
-	eapply "${WORKDIR}"/patches/
-
-	# Leave gtester-report python shebang alone - handled by python_fix_shebang
-	sed -e '/${PYTHON}/d' -i glib/Makefile.{am,in} || die
-
-	# Also needed to prevent cross-compile failures, see bug #267603
-	eautoreconf
-
-	gnome2_src_prepare
-
-	epunt_cxx
-}
-
-multilib_src_configure() {
-	# Avoid circular depend with dev-util/pkgconfig and
-	# native builds (cross-compiles won't need pkg-config
-	# in the target ROOT to work here)
-	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
-		if has_version sys-apps/dbus; then
-			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
-			export DBUS1_LIBS="-ldbus-1"
-		fi
-		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
-		export LIBFFI_LIBS="-lffi"
-		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
-		export PCRE_LIBS="-lpcre"
-	fi
-
-	# These configure tests don't work when cross-compiling.
-	if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		case ${CHOST} in
-		hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		*)            export glib_cv_stack_grows=no ;;
-		esac
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
-		export glib_cv_uscore=no
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
-		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
-	fi
-
-	local myconf
-
-	case "${CHOST}" in
-		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
-		*)        myconf="${myconf} --with-threads=posix" ;;
-	esac
-
-	# libelf used only by the gresource bin
-	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
-		$(usex debug --enable-debug=yes ' ') \
-		$(use_enable xattr) \
-		$(use_enable fam) \
-		$(use_enable kernel_linux libmount) \
-		$(use_enable selinux) \
-		$(use_enable static-libs static) \
-		$(use_enable systemtap dtrace) \
-		$(use_enable systemtap systemtap) \
-		$(multilib_native_use_enable utils libelf) \
-		--with-python=${EPYTHON} \
-		--disable-compile-warnings \
-		--enable-man \
-		--with-pcre=system \
-		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
-
-	if multilib_is_native_abi; then
-		local d
-		for d in glib gio gobject; do
-			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	# Hardened: gdb needs this, bug #338891
-	if host-is-pax ; then
-		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
-			|| die "Hardened adjustment failed"
-	fi
-
-	# Need X for dbus-launch session X11 initialization
-	virtx emake check
-}
-
-multilib_src_install() {
-	gnome2_src_install completiondir="$(get_bashcompdir)"
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	if use utils ; then
-		python_fix_shebang "${ED}"/usr/bin/gtester-report
-	else
-		# gtester-report is heavily deprecated, so do not install by default - https://bugzilla.gnome.org/show_bug.cgi?id=668035#c4
-		rm "${ED}usr/bin/gtester-report"
-		rm "${ED}usr/share/man/man1/gtester-report.1"
-	fi
-
-	# Do not install charset.alias even if generated, leave it to libiconv
-	rm -f "${ED}/usr/lib/charset.alias"
-
-	# Don't install gdb python macros, bug 291328
-	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
-}
-
-pkg_preinst() {
-	gnome2_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"/${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"/${cache} || die
-		else
-			touch "${ED}"/${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	# force (re)generation of gschemas.compiled
-	GNOME2_ECLASS_GLIB_SCHEMAS="force"
-
-	gnome2_pkg_postinst
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-}
-
-pkg_postrm() {
-	gnome2_pkg_postrm
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}

diff --git a/dev-libs/glib/glib-2.56.2.ebuild b/dev-libs/glib/glib-2.56.2.ebuild
deleted file mode 100644
index ed88114..0000000
--- a/dev-libs/glib/glib-2.56.2.ebuild
+++ /dev/null
@@ -1,302 +0,0 @@
-# Copyright 1999-2018 Gentoo Fondation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-GNOME2_EAUTORECONF=yes
-
-inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
-	multilib multilib-minimal pax-utils python-any-r1 toolchain-funcs virtualx
-
-# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
-# adding new dependencies end up making stage3 to grow. Every addition needs
-# then to be think very closely.
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-SRC_URI="${SRC_URI}
-	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-
-# Added util-linux multilib dependency to have libmount support (which
-# is always turned on on linux systems, unless explicitly disabled, but
-# this ebuild does not do that anyway) (bug #599586)
-
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP},static-libs?]
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	utils? (
-		>=dev-util/gdbus-codegen-${PV}
-		virtual/libelf:0=
-	)
-"
-DEPEND="${RDEPEND}
-	app-text/docbook-xml-dtd:4.1.2
-	>=dev-libs/libxslt-1.0
-	>=sys-devel/gettext-0.11
-	>=dev-util/gtk-doc-am-1.20
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	${PYTHON_DEPS}
-	test? (
-		sys-devel/gdb
-		>=dev-util/gdbus-codegen-${PV}
-		>=sys-apps/dbus-1.2.14 )
-	!<dev-util/gtk-doc-1.15-r2
-"
-# Migration of glib-genmarshal, glib-mkenums and gtester-report to a separate
-# python depending package, which can be buildtime depended in packages that
-# need these tools, without pulling in python at runtime.
-RDEPEND="${RDEPEND}
-	>=dev-util/glib-utils-${PV}"
-PDEPEND="
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-
-	# Musl fix
-	eapply "${FILESDIR}/${PV}-quark_init_on_demand.patch"
-	eapply "${FILESDIR}/${PV}-gobject_init_on_demand.patch"
-
-	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
-	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
-
-	if use test; then
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-			ewarn "Some tests will be skipped due to missing terminal program"
-			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
-	fi
-
-	# Less max runs in network monitor race test to avoid hitting timeout limits
-	eapply "${FILESDIR}"/${PV}-network-monitor-race-test-iterations.patch # included in 2.57.1
-
-	# gdbus-codegen is a separate package
-	eapply "${FILESDIR}"/${PN}-2.54.3-external-gdbus-codegen.patch
-
-	gnome2_src_prepare
-	epunt_cxx
-}
-
-multilib_src_configure() {
-	# Avoid circular depend with dev-util/pkgconfig and
-	# native builds (cross-compiles won't need pkg-config
-	# in the target ROOT to work here)
-	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
-		if has_version sys-apps/dbus; then
-			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
-			export DBUS1_LIBS="-ldbus-1"
-		fi
-		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
-		export LIBFFI_LIBS="-lffi"
-		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
-		export PCRE_LIBS="-lpcre"
-	fi
-
-	# These configure tests don't work when cross-compiling.
-	if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		case ${CHOST} in
-		hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		*)            export glib_cv_stack_grows=no ;;
-		esac
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
-		export glib_cv_uscore=no
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
-		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
-	fi
-
-	local myconf
-
-	case "${CHOST}" in
-		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
-		*)        myconf="${myconf} --with-threads=posix" ;;
-	esac
-
-	# libelf used only by the gresource bin
-	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
-		$(usex debug --enable-debug=yes ' ') \
-		$(use_enable xattr) \
-		$(use_enable fam) \
-		$(use_enable kernel_linux libmount) \
-		$(use_enable selinux) \
-		$(use_enable static-libs static) \
-		$(use_enable systemtap dtrace) \
-		$(use_enable systemtap systemtap) \
-		$(multilib_native_use_enable utils libelf) \
-		--with-python=${EPYTHON} \
-		--disable-compile-warnings \
-		--enable-man \
-		--with-pcre=system \
-		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
-
-	if multilib_is_native_abi; then
-		local d
-		for d in glib gio gobject; do
-			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	# Hardened: gdb needs this, bug #338891
-	if host-is-pax ; then
-		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
-			|| die "Hardened adjustment failed"
-	fi
-
-	# Need X for dbus-launch session X11 initialization
-	virtx emake check
-}
-
-multilib_src_install() {
-	emake DESTDIR="${D}" completiondir="$(get_bashcompdir)" install
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	# These are installed by dev-util/glib-utils
-	# 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
-	rm "${ED}usr/bin/glib-genmarshal" || die
-	rm "${ED}usr/share/man/man1/glib-genmarshal.1" || die
-	rm "${ED}usr/bin/glib-mkenums" || die
-	rm "${ED}usr/share/man/man1/glib-mkenums.1" || die
-	rm "${ED}usr/bin/gtester-report" || die
-	rm "${ED}usr/share/man/man1/gtester-report.1" || die
-
-	# Do not install charset.alias even if generated, leave it to libiconv
-	rm -f "${ED}/usr/$(get_libdir)/charset.alias"
-
-	# Don't install gdb python macros, bug 291328
-	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
-
-	# Completely useless with or without USE static-libs, people need to use pkg-config
-	find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_preinst() {
-	gnome2_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"/${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"/${cache} || die
-		else
-			touch "${ED}"/${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	# force (re)generation of gschemas.compiled
-	GNOME2_ECLASS_GLIB_SCHEMAS="force"
-
-	gnome2_pkg_postinst
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-}
-
-pkg_postrm() {
-	gnome2_pkg_postrm
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}

diff --git a/dev-libs/glib/metadata.xml b/dev-libs/glib/metadata.xml
deleted file mode 100644
index b88cceb..0000000
--- a/dev-libs/glib/metadata.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="project">
-		<email>gnome@gentoo.org</email>
-		<name>Gentoo GNOME Desktop</name>
-	</maintainer>
-	<use>
-		<flag name="dbus">
-			Enable dependencies required by glib libraries
-			using dbus service to manage settings saving
-		</flag>
-		<flag name="mime">
-			Pull in shared MIME database that many glib-based
-			applications require at runtime to detect or open files. Warning:
-			do not disable this flag unless installing on a headless server.
-		</flag>
-		<flag name="systemtap">
-			Build support for profiling and tracing using
-			<pkg>dev-util/systemtap</pkg>
-		</flag>
-		<flag name="utils">
-			Install gtester-report utility to generate test
-			report files for your software; build gresource utility with
-			ELF support.
-		</flag>
-	</use>
-	<upstream>
-		<remote-id type="cpe">cpe:/a:gnome:glib</remote-id>
-	</upstream>
-</pkgmetadata>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2019-08-21 12:55 Anthony G. Basile
  0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2019-08-21 12:55 UTC (permalink / raw
  To: gentoo-commits

commit:     1cff7d041fe6e0054c7d0cd5dadede5fd62271f8
Author:     stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Thu Jul 25 15:26:42 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Aug 21 12:55:11 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=1cff7d04

dev-libs/glib: add 2.58.3-r1 from tree

Bug: https://bugs.gentoo.org/690498
Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 dev-libs/glib/files/2.58.3-CVE-2019-12450.patch    |  53 ++++
 .../glib/files/2.58.3-gdbusmessage-limit-fix.patch | 120 ++++++++
 dev-libs/glib/glib-2.58.3-r1.ebuild                | 320 +++++++++++++++++++++
 3 files changed, 493 insertions(+)

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
new file mode 100644
index 0000000..949ac56
--- /dev/null
+++ b/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch
@@ -0,0 +1,53 @@
+From e6b769819d63d2b24b251dbc9f902fe6fd614da3 Mon Sep 17 00:00:00 2001
+From: Ondrej Holy <oholy@redhat.com>
+Date: Thu, 23 May 2019 10:41:53 +0200
+Subject: [PATCH] gfile: Limit access to files when copying
+
+file_copy_fallback creates new files with default permissions and
+set the correct permissions after the operation is finished. This
+might cause that the files can be accessible by more users during
+the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
+files to limit access to those files.
+---
+ gio/gfile.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/gio/gfile.c b/gio/gfile.c
+index 1cc69166a..13b435480 100644
+--- a/gio/gfile.c
++++ b/gio/gfile.c
+@@ -3284,12 +3284,12 @@ file_copy_fallback (GFile                  *source,
+         out = (GOutputStream*)_g_local_file_output_stream_replace (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
+                                                                    FALSE, NULL,
+                                                                    flags & G_FILE_COPY_BACKUP,
+-                                                                   G_FILE_CREATE_REPLACE_DESTINATION,
+-                                                                   info,
++                                                                   G_FILE_CREATE_REPLACE_DESTINATION |
++                                                                   G_FILE_CREATE_PRIVATE, info,
+                                                                    cancellable, error);
+       else
+         out = (GOutputStream*)_g_local_file_output_stream_create (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
+-                                                                  FALSE, 0, info,
++                                                                  FALSE, G_FILE_CREATE_PRIVATE, info,
+                                                                   cancellable, error);
+     }
+   else if (flags & G_FILE_COPY_OVERWRITE)
+@@ -3297,12 +3297,13 @@ file_copy_fallback (GFile                  *source,
+       out = (GOutputStream *)g_file_replace (destination,
+                                              NULL,
+                                              flags & G_FILE_COPY_BACKUP,
+-                                             G_FILE_CREATE_REPLACE_DESTINATION,
++                                             G_FILE_CREATE_REPLACE_DESTINATION |
++                                             G_FILE_CREATE_PRIVATE,
+                                              cancellable, error);
+     }
+   else
+     {
+-      out = (GOutputStream *)g_file_create (destination, 0, cancellable, error);
++      out = (GOutputStream *)g_file_create (destination, G_FILE_CREATE_PRIVATE, cancellable, error);
+     }
+ 
+   if (!out)
+-- 
+2.20.1
+

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
new file mode 100644
index 0000000..0828132
--- /dev/null
+++ b/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch
@@ -0,0 +1,120 @@
+From 2d655ef8954695cabf9e99cc61411de2bb4cb847 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <withnall@endlessm.com>
+Date: Mon, 28 Jan 2019 14:36:42 +0000
+Subject: [PATCH] gdbusmessage: Fix check on upper limit of message size
+
+There was a typo in the figure checked against. Add a unit test.
+
+Signed-off-by: Philip Withnall <withnall@endlessm.com>
+
+https://gitlab.gnome.org/GNOME/glib/issues/1642
+---
+ gio/gdbusmessage.c        |  2 +-
+ gio/tests/gdbus-message.c | 72 ++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 72 insertions(+), 2 deletions(-)
+
+diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
+index 169e6fd15..2ad51f888 100644
+--- a/gio/gdbusmessage.c
++++ b/gio/gdbusmessage.c
+@@ -1984,7 +1984,7 @@ g_dbus_message_bytes_needed (guchar  *blob,
+                    "Unable to determine message blob length - given blob is malformed");
+     }
+ 
+-  if (ret > (2<<27))
++  if (ret > (1<<27))
+     {
+       g_set_error (error,
+                    G_IO_ERROR,
+diff --git a/gio/tests/gdbus-message.c b/gio/tests/gdbus-message.c
+index 88a9c5d86..74e0f712e 100644
+--- a/gio/tests/gdbus-message.c
++++ b/gio/tests/gdbus-message.c
+@@ -141,6 +141,74 @@ message_copy (void)
+ 
+ /* ---------------------------------------------------------------------------------------------------- */
+ 
++/* Test g_dbus_message_bytes_needed() returns correct results for a variety of
++ * arbitrary binary inputs.*/
++static void
++message_bytes_needed (void)
++{
++  const struct
++    {
++      const guint8 blob[16];
++      gssize expected_bytes_needed;
++    }
++  vectors[] =
++    {
++      /* Little endian with header rounding */
++      { { 'l', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          50, 0, 0, 0,  /* body length */
++          1, 0, 0, 0,  /* message serial */
++          7, 0, 0, 0  /* header length */}, 74 },
++      /* Little endian without header rounding */
++      { { 'l', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          50, 0, 0, 0,  /* body length */
++          1, 0, 0, 0,  /* message serial */
++          8, 0, 0, 0  /* header length */}, 74 },
++      /* Big endian with header rounding */
++      { { 'B', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 50,  /* body length */
++          0, 0, 0, 1,  /* message serial */
++          0, 0, 0, 7  /* header length */}, 74 },
++      /* Big endian without header rounding */
++      { { 'B', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 50,  /* body length */
++          0, 0, 0, 1,  /* message serial */
++          0, 0, 0, 8  /* header length */}, 74 },
++      /* Invalid endianness */
++      { { '!', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 50,  /* body length */
++          0, 0, 0, 1,  /* message serial */
++          0, 0, 0, 8  /* header length */}, -1 },
++      /* Oversized */
++      { { 'l', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 0x08,  /* body length (128MiB) */
++          1, 0, 0, 0,  /* message serial */
++          7, 0, 0, 0  /* header length */}, -1 },
++    };
++  gsize i;
++
++  for (i = 0; i < G_N_ELEMENTS (vectors); i++)
++    {
++      gssize bytes_needed;
++      GError *local_error = NULL;
++
++      g_test_message ("Vector: %" G_GSIZE_FORMAT, i);
++
++      bytes_needed = g_dbus_message_bytes_needed ((guchar *) vectors[i].blob,
++                                                  G_N_ELEMENTS (vectors[i].blob),
++                                                  &local_error);
++
++      if (vectors[i].expected_bytes_needed < 0)
++        g_assert_error (local_error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
++      else
++        g_assert_no_error (local_error);
++      g_assert_cmpint (bytes_needed, ==, vectors[i].expected_bytes_needed);
++
++      g_clear_error (&local_error);
++    }
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
+ int
+ main (int   argc,
+       char *argv[])
+@@ -151,6 +219,8 @@ main (int   argc,
+ 
+   g_test_add_func ("/gdbus/message/lock", message_lock);
+   g_test_add_func ("/gdbus/message/copy", message_copy);
+-  return g_test_run();
++  g_test_add_func ("/gdbus/message/bytes-needed", message_bytes_needed);
++
++  return g_test_run ();
+ }
+ 
+-- 
+2.20.1
+

diff --git a/dev-libs/glib/glib-2.58.3-r1.ebuild b/dev-libs/glib/glib-2.58.3-r1.ebuild
new file mode 100644
index 0000000..cb0cf13
--- /dev/null
+++ b/dev-libs/glib/glib-2.58.3-r1.ebuild
@@ -0,0 +1,320 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
+GNOME2_EAUTORECONF=yes
+
+inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
+	multilib multilib-minimal pax-utils python-any-r1 toolchain-funcs virtualx
+
+# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
+# adding new dependencies end up making stage3 to grow. Every addition needs
+# then to be think very closely.
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="https://www.gtk.org/"
+SRC_URI="${SRC_URI}
+	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+IUSE="dbus debug fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
+
+KEYWORDS="amd64 ~arm arm64 ~mips ~ppc x86"
+
+# Added util-linux multilib dependency to have libmount support (which
+# is always turned on on linux systems, unless explicitly disabled, but
+# this ebuild does not do that anyway) (bug #599586)
+
+RDEPEND="
+	!<dev-util/gdbus-codegen-${PV}
+	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
+	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
+	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
+	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
+	utils? (
+		>=dev-util/gdbus-codegen-${PV}
+		virtual/libelf:0=
+	)
+"
+DEPEND="${RDEPEND}
+	app-text/docbook-xml-dtd:4.1.2
+	app-text/docbook-xsl-stylesheets
+	>=dev-libs/libxslt-1.0
+	>=sys-devel/gettext-0.11
+	gtk-doc? ( >=dev-util/gtk-doc-1.20 )
+	systemtap? ( >=dev-util/systemtap-1.3 )
+	${PYTHON_DEPS}
+	test? (
+		sys-devel/gdb
+		>=dev-util/gdbus-codegen-${PV}
+		>=sys-apps/dbus-1.2.14 )
+"
+# configure.ac has gtk-doc-am stuff behind m4_ifdef, so we don't need a gtk-doc-am build dep
+
+# Migration of glib-genmarshal, glib-mkenums and gtester-report to a separate
+# python depending package, which can be buildtime depended in packages that
+# need these tools, without pulling in python at runtime.
+RDEPEND="${RDEPEND}
+	>=dev-util/glib-utils-${PV}"
+PDEPEND="
+	dbus? ( gnome-base/dconf )
+	mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/gio-querymodules$(get_exeext)
+)
+
+pkg_setup() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~INOTIFY_USER"
+		if use test ; then
+			CONFIG_CHECK="~IPV6"
+			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+		fi
+		linux-info_pkg_setup
+	fi
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+
+	# Musl fix
+	eapply "${FILESDIR}/2.56.2-quark_init_on_demand.patch"
+	eapply "${FILESDIR}/2.56.2-gobject_init_on_demand.patch"
+
+	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
+	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
+
+	if use test; then
+		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+		if ! has_version dev-util/desktop-file-utils ; then
+			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+			ewarn "think on installing it to get these tests run."
+			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+		fi
+
+		# gdesktopappinfo requires existing terminal (gnome-terminal or any
+		# other), falling back to xterm if one doesn't exist
+		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+		#	ewarn "Some tests will be skipped due to missing terminal program"
+		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
+		# 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
+		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+		# desktop-app-info/launch* might fail similarly
+		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
+		#fi
+
+		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
+		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+
+		ewarn "Tests for search-utils have been skipped"
+		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
+	else
+		# Don't build tests, also prevents extra deps, bug #512022
+		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
+	fi
+
+	# gdbus-codegen is a separate package
+	eapply "${FILESDIR}"/${PN}-2.58.2-external-gdbus-codegen.patch
+
+	# gdbus message upper limit check fix from glib-2-58
+	eapply "${FILESDIR}"/${PV}-gdbusmessage-limit-fix.patch
+	# gfile copy fallback security fix (wrong permissions at start)
+	eapply "${FILESDIR}"/${PV}-CVE-2019-12450.patch
+
+	# Tarball doesn't come with gtk-doc.make and we can't unconditionally depend on dev-util/gtk-doc due
+	# to circular deps during bootstramp. If actually not building gtk-doc, an almost empty file will do
+	# fine as well - this is also what upstream autogen.sh does if gtkdocize is not found. If gtk-doc is
+	# installed, eautoreconf will call gtkdocize, which overwrites the empty gtk-doc.make with a full copy.
+	cat > gtk-doc.make << EOF
+EXTRA_DIST =
+CLEANFILES =
+EOF
+
+	gnome2_src_prepare
+	epunt_cxx
+}
+
+multilib_src_configure() {
+	# Avoid circular depend with dev-util/pkgconfig and
+	# native builds (cross-compiles won't need pkg-config
+	# in the target ROOT to work here)
+	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
+		if has_version sys-apps/dbus; then
+			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
+			export DBUS1_LIBS="-ldbus-1"
+		fi
+		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
+		export LIBFFI_LIBS="-lffi"
+		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
+		export PCRE_LIBS="-lpcre"
+	fi
+
+	# These configure tests don't work when cross-compiling.
+	if tc-is-cross-compiler ; then
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
+		case ${CHOST} in
+		hppa*|metag*) export glib_cv_stack_grows=yes ;;
+		*)            export glib_cv_stack_grows=no ;;
+		esac
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
+		export glib_cv_uscore=no
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
+		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
+	fi
+
+	local myconf
+
+	case "${CHOST}" in
+		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
+		*)        myconf="${myconf} --with-threads=posix" ;;
+	esac
+
+	# libelf used only by the gresource bin
+	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
+		$(usex debug --enable-debug=yes ' ') \
+		$(use_enable xattr) \
+		$(use_enable fam) \
+		$(multilib_native_use_enable gtk-doc) \
+		$(use_enable kernel_linux libmount) \
+		$(use_enable selinux) \
+		$(use_enable static-libs static) \
+		$(use_enable systemtap dtrace) \
+		$(use_enable systemtap systemtap) \
+		$(multilib_native_use_enable utils libelf) \
+		--with-python=${EPYTHON} \
+		--disable-compile-warnings \
+		--enable-man \
+		--with-pcre=system \
+		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
+
+	if multilib_is_native_abi; then
+		local d
+		for d in glib gio gobject; do
+			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
+		done
+	fi
+}
+
+multilib_src_test() {
+	export XDG_CONFIG_DIRS=/etc/xdg
+	export XDG_DATA_DIRS=/usr/local/share:/usr/share
+	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+	export LC_TIME=C # bug #411967
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# Related test is a bit nitpicking
+	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+
+	# Hardened: gdb needs this, bug #338891
+	if host-is-pax ; then
+		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
+			|| die "Hardened adjustment failed"
+	fi
+
+	# Need X for dbus-launch session X11 initialization
+	virtx emake check
+}
+
+multilib_src_install() {
+	emake DESTDIR="${D}" completiondir="$(get_bashcompdir)" install
+	keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	# These are installed by dev-util/glib-utils
+	# 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
+	rm "${ED}usr/bin/glib-genmarshal" || die
+	rm "${ED}usr/share/man/man1/glib-genmarshal.1" || die
+	rm "${ED}usr/bin/glib-mkenums" || die
+	rm "${ED}usr/share/man/man1/glib-mkenums.1" || die
+	rm "${ED}usr/bin/gtester-report" || die
+	rm "${ED}usr/share/man/man1/gtester-report.1" || die
+
+	# Do not install charset.alias even if generated, leave it to libiconv
+	rm -f "${ED}/usr/$(get_libdir)/charset.alias"
+
+	# Don't install gdb python macros, bug 291328
+	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
+
+	# Completely useless with or without USE static-libs, people need to use pkg-config
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+	gnome2_pkg_preinst
+
+	# Make gschemas.compiled belong to glib alone
+	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
+
+	if [[ -e ${EROOT}${cache} ]]; then
+		cp "${EROOT}"${cache} "${ED}"/${cache} || die
+	else
+		touch "${ED}"/${cache} || die
+	fi
+
+	multilib_pkg_preinst() {
+		# Make giomodule.cache belong to glib alone
+		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
+
+		if [[ -e ${EROOT}${cache} ]]; then
+			cp "${EROOT}"${cache} "${ED}"/${cache} || die
+		else
+			touch "${ED}"/${cache} || die
+		fi
+	}
+
+	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
+	# file due to inability to create it and GIO might not look at any of the modules there
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_preinst
+	fi
+}
+
+pkg_postinst() {
+	# force (re)generation of gschemas.compiled
+	GNOME2_ECLASS_GLIB_SCHEMAS="force"
+
+	gnome2_pkg_postinst
+
+	multilib_pkg_postinst() {
+		gnome2_giomodule_cache_update \
+			|| die "Update GIO modules cache failed (for ${ABI})"
+	}
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_postinst
+	else
+		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+		ewarn "You might want to run gio-querymodules manually on the target for"
+		ewarn "your final image for performance reasons and re-run it when packages"
+		ewarn "installing GIO modules get upgraded or added to the image."
+	fi
+}
+
+pkg_postrm() {
+	gnome2_pkg_postrm
+
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+		multilib_pkg_postrm() {
+			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
+		}
+		multilib_foreach_abi multilib_pkg_postrm
+		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
+	fi
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2021-03-13 21:02 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-03-13 21:02 UTC (permalink / raw
  To: gentoo-commits

commit:     1157136b1e02d4128610345f65d4e82776ae4677
Author:     Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
AuthorDate: Sat Mar 13 13:36:29 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 13 21:02:39 2021 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=1157136b

dev-libs/glib: remove from overlay

Package-Manager: Portage-3.0.17, Repoman-3.0.2
RepoMan-Options: --force
Manifest-Sign-Key: 0xA1919C830E9498E0
Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   2 -
 .../glib/files/2.56.2-gobject_init_on_demand.patch |  91 -------
 .../glib/files/2.56.2-quark_init_on_demand.patch   |  50 ----
 ...-2.64.1-mark-gdbus-server-auth-test-flaky.patch |  32 ---
 dev-libs/glib/glib-2.62.6.ebuild                   | 278 --------------------
 dev-libs/glib/glib-2.64.5.ebuild                   | 290 ---------------------
 dev-libs/glib/metadata.xml                         |  31 ---
 7 files changed, 774 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
deleted file mode 100644
index ea11016..0000000
--- a/dev-libs/glib/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST glib-2.62.6.tar.xz 4703424 BLAKE2B 0a27245be2575c574dcc730dd051a8c284f421dbc46579aadc5fbbacb8f934af4374b61bb26085e5c9ab78a868c567818f3fb9d67adddce37f5c4fec00e0d276 SHA512 8e3972a371f3c1a50b7d245b30e4f740583ad72ba4ab325e0e15e0732be44dfb69b603fb39dcf4989255a23a181e9ea5dd25982dd94c386cd9f21952243ad6f5
-DIST glib-2.64.5.tar.xz 4778456 BLAKE2B 7fdee0e16a7ac820f4c4f7dc66d37add464d3005e89e6013302d3ef103319331811d68e9b42db072b82242c3d7badfbd085b69333e770012def89dc8aae7a2eb SHA512 a87537274619b6de88a0e68555059036ac18c748b5005c8d84728646b0db342fde0b8c5b303b9ad79f64d71ea4ed990d52a4fbd68cda3ca74aed5fe4d497e060

diff --git a/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch b/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch
deleted file mode 100644
index d8be8e2..0000000
--- a/dev-libs/glib/files/2.56.2-gobject_init_on_demand.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- a/gobject/gtype.c
-+++ b/gobject/gtype.c
-@@ -200,6 +200,9 @@
- static gboolean				type_node_is_a_L		(TypeNode		*node,
- 									 TypeNode		*iface_node);
- 
-+#if !defined(__GLIBC__)
-+static void gobject_init (void);
-+#endif
- 
- /* --- enumeration --- */
- 
-@@ -2623,6 +2626,10 @@
- {
-   TypeNode *node;
-   
-+ #if !defined(__GLIBC__)
-+  gobject_init();
-+ #endif
-+
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (type_id > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -2740,6 +2747,10 @@
-   TypeNode *pnode, *node;
-   GType type = 0;
-   
-+ #if !defined(__GLIBC__)
-+  gobject_init();
-+ #endif
-+
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (parent_type > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -2795,6 +2806,10 @@
-   TypeNode *pnode, *node;
-   GType type;
-   
-+ #if !defined(__GLIBC__)
-+   gobject_init();
-+ #endif
-+
-   g_assert_type_system_initialized ();
-   g_return_val_if_fail (parent_type > 0, 0);
-   g_return_val_if_fail (type_name != NULL, 0);
-@@ -3309,7 +3324,11 @@
- g_type_name (GType type)
- {
-   TypeNode *node;
--  
-+
-+  #if !defined(__GLIBC__)
-+   gobject_init();
-+ #endif 
-+
-   g_assert_type_system_initialized ();
-   
-   node = lookup_type_node_I (type);
-@@ -4335,6 +4354,9 @@
- void
- g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
- {
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif
-   g_assert_type_system_initialized ();
- 
-   if (debug_flags)
-@@ -4353,6 +4375,9 @@
- void
- g_type_init (void)
- {
-+#if !defined(__GLIBC__)
-+  gobject_init();
-+#endif 
-   g_assert_type_system_initialized ();
- }
- 
-@@ -4364,6 +4389,12 @@
-   TypeNode *node;
-   GType type;
- 
-+#if !defined(__GLIBC__)
-+  static int gobject_initialized = 0;
-+  if (gobject_initialized)
-+    return;
-+  gobject_initialized = 1;
-+#endif
-   /* Ensure GLib is initialized first, see
-    * https://bugzilla.gnome.org/show_bug.cgi?id=756139
-    */

diff --git a/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch b/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch
deleted file mode 100644
index d93f85c..0000000
--- a/dev-libs/glib/files/2.56.2-quark_init_on_demand.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/glib/gquark.c
-+++ b/glib/gquark.c
-@@ -57,6 +57,9 @@
- void
- g_quark_init (void)
- {
-+  if (quark_ht)
-+    return;
-+
-   g_assert (quark_seq_id == 0);
-   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
-   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
-@@ -138,6 +141,9 @@
-     return 0;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
-   G_UNLOCK (quark_global);
- 
-@@ -200,6 +206,9 @@
-     return 0;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+  g_quark_init ();
-+#endif
-   quark = quark_from_string (string, duplicate);
-   G_UNLOCK (quark_global);
- 
-@@ -278,6 +287,7 @@
-   GQuark quark;
-   gchar **quarks_new;
- 
-+  g_quark_init ();
-   if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
-     {
-       quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
-@@ -310,6 +320,9 @@
-     return NULL;
- 
-   G_LOCK (quark_global);
-+#if !defined(__GLIBC__)
-+ g_quark_init ();
-+#endif
-   quark = quark_from_string (string, duplicate);
-   result = quarks[quark];
-   G_UNLOCK (quark_global);

diff --git a/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch b/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch
deleted file mode 100644
index d1a41ec..0000000
--- a/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 95b22035f6151ab465c37fe5e3e340713cb74e23 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Tue, 24 Mar 2020 18:44:54 -0700
-Subject: [PATCH] Mark gdbus-server-auth test flaky
-
-See https://gitlab.gnome.org/GNOME/glib/-/issues/1954
----
- gio/tests/meson.build | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/gio/tests/meson.build b/gio/tests/meson.build
-index 788cf978b..7f45d0191 100644
---- a/gio/tests/meson.build
-+++ b/gio/tests/meson.build
-@@ -122,12 +122,13 @@ if dbus1_dep.found()
-     },
-     'gdbus-server-auth' : {
-       'dependencies' : [dbus1_dep],
-+      'suite' : ['flaky'],
-     },
-   }
- else
-   # We can build a cut-down version of this test without libdbus
-   gio_tests += {
--    'gdbus-server-auth' : {},
-+    'gdbus-server-auth' : {'suite' : ['flaky']},
-   }
- endif
- 
--- 
-2.24.1
-

diff --git a/dev-libs/glib/glib-2.62.6.ebuild b/dev-libs/glib/glib-2.62.6.ebuild
deleted file mode 100644
index e6e1689..0000000
--- a/dev-libs/glib/glib-2.62.6.ebuild
+++ /dev/null
@@ -1,278 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_7 )
-
-inherit flag-o-matic gnome.org gnome2-utils linux-info meson multilib multilib-minimal python-any-r1 toolchain-funcs xdg
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
-RESTRICT="!test? ( test )"
-
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
-
-# * libelf isn't strictly necessary, but makes gresource tool more useful, and
-# the check is automagic in gio/meson.build. gresource is not a multilib tool
-# right now, thus it doesn't matter if non-native ABI libelf exists or not
-# (non-native binary is overwritten, it doesn't matter if libelf was linked to).
-# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
-# these are used by GIO, which glib[static-libs] consumers don't really seem
-# to need at all, thus not imposing the deps for now and once some consumers
-# are actually found to static link libgio-2.0.a, we can revisit and either add
-# them or just put the (build) deps in that rare consumer instead of recursive
-# RDEPEND here (due to lack of recursive DEPEND).
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
-	>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
-	virtual/libelf:0=
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-# libxml2 used for optional tests that get automatically skipped
-BDEPEND="
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	>=sys-devel/gettext-0.19.8
-	gtk-doc? ( >=dev-util/gtk-doc-1.20
-		app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5 )
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	${PYTHON_DEPS}
-	test? ( >=sys-apps/dbus-1.2.14 )
-	virtual/pkgconfig
-"
-# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
-
-PDEPEND="
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	# Musl fix
-	eapply "${FILESDIR}/2.56.2-quark_init_on_demand.patch"
-	eapply "${FILESDIR}/2.56.2-gobject_init_on_demand.patch"
-
-	if use test; then
-		# TODO: Review the test exclusions, especially now with meson
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-		#	ewarn "Some tests will be skipped due to missing terminal program"
-		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
-		# 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
-		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		# desktop-app-info/launch* might fail similarly
-		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
-		#fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/meson.build || die
-
-		# Play nice with network-sandbox, but this approach would defeat the purpose of the test
-		#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
-	fi
-
-	# Don't build fuzzing binaries - not used
-	sed -i -e '/subdir.*fuzzing/d' meson.build || die
-
-	# gdbus-codegen is a separate package
-	sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
-
-	# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
-	sed -i -e '/install_dir/d' gio/tests/meson.build || die
-
-	cat > "${T}/glib-test-ld-wrapper" <<-EOF
-		#!/usr/bin/env sh
-		exec \${LD:-ld} "\$@"
-	EOF
-	chmod a+x "${T}/glib-test-ld-wrapper" || die
-	sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
-
-	xdg_src_prepare
-	gnome2_environment_reset
-	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
-}
-
-multilib_src_configure() {
-	if use debug; then
-		append-cflags -DG_ENABLE_DEBUG
-	else
-		append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
-	fi
-
-	# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
-	#if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
-		#case ${CHOST} in
-		#hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		#*)            export glib_cv_stack_grows=no ;;
-		#esac
-	#fi
-
-	local emesonargs=(
-		-Ddefault_library=$(usex static-libs both shared)
-		$(meson_feature selinux)
-		$(meson_use xattr)
-		-Dlibmount=true # only used if host_system == 'linux'
-		-Dinternal_pcre=false
-		-Dman=true
-		$(meson_use systemtap dtrace)
-		$(meson_use systemtap)
-		-Dgtk_doc=$(multilib_native_usex gtk-doc true false)
-		$(meson_use fam)
-		-Dinstalled_tests=false
-		-Dnls=enabled
-		-Doss_fuzz=disabled
-	)
-	meson_src_configure
-}
-
-multilib_src_compile() {
-	meson_src_compile
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	meson_src_test --timeout-multiplier 2 --no-suite flaky
-}
-
-multilib_src_install() {
-	meson_src_install
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	# These are installed by dev-util/glib-utils
-	# 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
-	rm "${ED}/usr/bin/glib-genmarshal" || die
-	rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
-	rm "${ED}/usr/bin/glib-mkenums" || die
-	rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
-	rm "${ED}/usr/bin/gtester-report" || die
-	rm "${ED}/usr/share/man/man1/gtester-report.1" || die
-	# gdbus-codegen manpage installed by dev-util/gdbus-codegen
-	rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"${cache} || die
-		else
-			touch "${ED}"${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	# glib installs no schemas itself, but we force update for fresh install in case
-	# something has dropped in a schemas file without direct glib dep; and for upgrades
-	# in case the compiled schema format could have changed
-	gnome2_schemas_update
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	gnome2_schemas_update
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}

diff --git a/dev-libs/glib/glib-2.64.5.ebuild b/dev-libs/glib/glib-2.64.5.ebuild
deleted file mode 100644
index dfe8612..0000000
--- a/dev-libs/glib/glib-2.64.5.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
-
-inherit flag-o-matic gnome.org gnome2-utils linux-info meson multilib multilib-minimal python-any-r1 toolchain-funcs xdg
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
-RESTRICT="!test? ( test )"
-
-KEYWORDS="amd64 arm arm64 ~mips ~ppc ~ppc64 x86"
-
-# * libelf isn't strictly necessary, but makes gresource tool more useful, and
-# the check is automagic in gio/meson.build. gresource is not a multilib tool
-# right now, thus it doesn't matter if non-native ABI libelf exists or not
-# (non-native binary is overwritten, it doesn't matter if libelf was linked to).
-# * elfutils (via libelf) does not build on Windows. gresources are not embedded
-# within ELF binaries on that platform anyway and inspecting ELF binaries from
-# other platforms is not that useful so exclude the dependency in this case.
-# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
-# these are used by GIO, which glib[static-libs] consumers don't really seem
-# to need at all, thus not imposing the deps for now and once some consumers
-# are actually found to static link libgio-2.0.a, we can revisit and either add
-# them or just put the (build) deps in that rare consumer instead of recursive
-# RDEPEND here (due to lack of recursive DEPEND).
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
-	>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
-	!kernel_Winnt? ( virtual/libelf:0= )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-# libxml2 used for optional tests that get automatically skipped
-BDEPEND="
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	>=sys-devel/gettext-0.19.8
-	gtk-doc? ( >=dev-util/gtk-doc-1.32-r2
-		app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5 )
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	${PYTHON_DEPS}
-	test? ( >=sys-apps/dbus-1.2.14 )
-	virtual/pkgconfig
-"
-# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
-
-PDEPEND="
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-PATCHES=(
-	"${FILESDIR}"/2.56.2-quark_init_on_demand.patch
-	"${FILESDIR}"/2.56.2-gobject_init_on_demand.patch
-	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	if use test; then
-		# TODO: Review the test exclusions, especially now with meson
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-		#	ewarn "Some tests will be skipped due to missing terminal program"
-		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
-		# 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
-		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		# desktop-app-info/launch* might fail similarly
-		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
-		#fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/meson.build || die
-
-		# Play nice with network-sandbox, but this approach would defeat the purpose of the test
-		#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
-	fi
-
-	# Don't build fuzzing binaries - not used
-	sed -i -e '/subdir.*fuzzing/d' meson.build || die
-
-	# gdbus-codegen is a separate package
-	sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
-
-	# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
-	sed -i -e '/install_dir/d' gio/tests/meson.build || die
-
-	cat > "${T}/glib-test-ld-wrapper" <<-EOF
-		#!/usr/bin/env sh
-		exec \${LD:-ld} "\$@"
-	EOF
-	chmod a+x "${T}/glib-test-ld-wrapper" || die
-	sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
-
-	xdg_src_prepare
-	gnome2_environment_reset
-	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
-}
-
-multilib_src_configure() {
-	if use debug; then
-		append-cflags -DG_ENABLE_DEBUG
-	else
-		append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
-	fi
-
-	# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
-	#if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
-		#case ${CHOST} in
-		#hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		#*)            export glib_cv_stack_grows=no ;;
-		#esac
-	#fi
-
-	local emesonargs=(
-		-Ddefault_library=$(usex static-libs both shared)
-		$(meson_feature selinux)
-		$(meson_use xattr)
-		-Dlibmount=enabled # only used if host_system == 'linux'
-		-Dinternal_pcre=false
-		-Dman=true
-		$(meson_use systemtap dtrace)
-		$(meson_use systemtap)
-		-Dgtk_doc=$(multilib_native_usex gtk-doc true false)
-		$(meson_use fam)
-		-Dinstalled_tests=false
-		-Dnls=enabled
-		-Doss_fuzz=disabled
-	)
-	meson_src_configure
-}
-
-multilib_src_compile() {
-	meson_src_compile
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	meson_src_test --timeout-multiplier 2 --no-suite flaky
-}
-
-multilib_src_install() {
-	meson_src_install
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	# These are installed by dev-util/glib-utils
-	# 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
-	rm "${ED}/usr/bin/glib-genmarshal" || die
-	rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
-	rm "${ED}/usr/bin/glib-mkenums" || die
-	rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
-	rm "${ED}/usr/bin/gtester-report" || die
-	rm "${ED}/usr/share/man/man1/gtester-report.1" || die
-	# gdbus-codegen manpage installed by dev-util/gdbus-codegen
-	rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"${cache} || die
-		else
-			touch "${ED}"${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	# glib installs no schemas itself, but we force update for fresh install in case
-	# something has dropped in a schemas file without direct glib dep; and for upgrades
-	# in case the compiled schema format could have changed
-	gnome2_schemas_update
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ver_test "$v" "-lt" "2.63.6"; then
-			ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
-			ewarn "to restart your session for \"Open With\" dialogs to work."
-		fi
-	done
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	gnome2_schemas_update
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}

diff --git a/dev-libs/glib/metadata.xml b/dev-libs/glib/metadata.xml
deleted file mode 100644
index b88cceb..0000000
--- a/dev-libs/glib/metadata.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="project">
-		<email>gnome@gentoo.org</email>
-		<name>Gentoo GNOME Desktop</name>
-	</maintainer>
-	<use>
-		<flag name="dbus">
-			Enable dependencies required by glib libraries
-			using dbus service to manage settings saving
-		</flag>
-		<flag name="mime">
-			Pull in shared MIME database that many glib-based
-			applications require at runtime to detect or open files. Warning:
-			do not disable this flag unless installing on a headless server.
-		</flag>
-		<flag name="systemtap">
-			Build support for profiling and tracing using
-			<pkg>dev-util/systemtap</pkg>
-		</flag>
-		<flag name="utils">
-			Install gtester-report utility to generate test
-			report files for your software; build gresource utility with
-			ELF support.
-		</flag>
-	</use>
-	<upstream>
-		<remote-id type="cpe">cpe:/a:gnome:glib</remote-id>
-	</upstream>
-</pkgmetadata>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2021-03-13 21:02 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-03-13 21:02 UTC (permalink / raw
  To: gentoo-commits

commit:     6f5d2a3b45758430f482a0d9346f24b1b8615fd3
Author:     Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
AuthorDate: Sat Mar 13 13:43:15 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 13 21:02:39 2021 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=6f5d2a3b

dev-libs/glib: sync with ::gentoo

Package-Manager: Portage-3.0.17, Repoman-3.0.2
RepoMan-Options: --force
Manifest-Sign-Key: 0xA1919C830E9498E0
Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>
Closes: https://github.com/gentoo/musl/pull/411
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/glib/Manifest                             |  22 ++
 ...rk-fix-initialization-with-c-constructors.patch |  47 ++++
 ...-2.64.1-mark-gdbus-server-auth-test-flaky.patch |  32 +++
 dev-libs/glib/glib-2.66.7.ebuild                   | 291 +++++++++++++++++++++
 dev-libs/glib/metadata.xml                         |  35 +++
 5 files changed, 427 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
new file mode 100644
index 0000000..0664249
--- /dev/null
+++ b/dev-libs/glib/Manifest
@@ -0,0 +1,22 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST glib-2.66.7.tar.xz 4844892 BLAKE2B 2d128e8c933a8c5bd27734e96e50244f27c29199823e2185e8cfa5b4bbc0ca23f761c9de275c9941672eb945e302178b3cb4b5bd577f375ad953a97dddc70e34 SHA512 f6e6cc0fe2ab4a31a623bf9a1e63f833783e044e7ed55b66a84fc0cbf1410eec233fe0e226abb20aac0e40167a9624bf5e65197f9eed879da1293af44408d530
+-----BEGIN PGP SIGNATURE-----
+
+iQKTBAEBCAB9FiEEZdLCSnfk9z83VSkfsaMsEcx8U7oFAmBMwW5fFIAAAAAALgAo
+aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY1
+RDJDMjRBNzdFNEY3M0YzNzU1MjkxRkIxQTMyQzExQ0M3QzUzQkEACgkQsaMsEcx8
+U7pEjw/+L645KnrLqEuLlzul0VSZ1rpsjPhZLYXIGHCDc1VwLvsv7cOnZtuRdVOX
+hoivQOP9S59vqtBv9rGSs3BpY1CnlDmiWgBhMShDRvg6wTvecExG+v+2zE70sOsq
+EnPpp21/nn2uM77SHB1jHI/MI3mB1h9EuIdYEJJ+c3hdSivi0+lGM8QHdfhS9GT4
+UZ5TLlnVLFHQ4uZwxbG2DHSpJTfhOIAmtqPX+Lx2i3GZyghZegs7juRwYi4Y24JD
+X5rknPWVrQ/7IKyTMO8LOoCvwlqFZH/xGCT3aCuII1QEu+DjWSd6srelj9rrhaBB
+WmGsFISoH37xk8R1fMcxU1HNGFA/0yNVnfJpzzr6dcE6H9fHmw7+erKbM3hdXTqh
+6Xi0sEaCKxcQOzs51OGF4Uvw3wPs9DOmPc14IjQlRuoToVsv4RG+aECLtB+wndS0
+B+01Af0kF/RQcsxOs4HN9KHh/LJg/ePpE7h0vRWQcR0IeKwn88WvN0Oh9EaF8CxV
+8ZHHvV8CkigSs6mRsDt56oxfKhivAy6jBH9l9j74smRAMD+yGqqJSMMJx5PssI5I
+Nus0Xfnjj/WiCf++/jRj+sAgcnBpcrBSiZ5Nw/81Rc+Pq4jM8PevZMxi+Iw8eH8x
+ESM6myTj32SYaJ47EJ6+W6RfmjenlLpgREb055FQsl2cBKgZdrI=
+=De5Y
+-----END PGP SIGNATURE-----

diff --git a/dev-libs/glib/files/0001-gquark-fix-initialization-with-c-constructors.patch b/dev-libs/glib/files/0001-gquark-fix-initialization-with-c-constructors.patch
new file mode 100644
index 0000000..50a9a8c
--- /dev/null
+++ b/dev-libs/glib/files/0001-gquark-fix-initialization-with-c-constructors.patch
@@ -0,0 +1,47 @@
+From e4216dee57f5156e192b2910f13eb855a104cb18 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 6 Jul 2016 12:38:40 +0200
+Subject: [PATCH] gquark: fix initialization with c++ constructors
+
+C++ constructors may want create new quarks, but we can not guarantee
+that the glib library ctor is executed first. Therefore we make sure
+that quarks are always initialized from g_quark_from_string and
+g_quark_from_static_string
+
+This fixes crashes in glibmm with musl which likely happens on AIX too.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=768215
+https://bugzilla.gnome.org/show_bug.cgi?id=756139#c14
+---
+ glib/gquark.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/glib/gquark.c b/glib/gquark.c
+index 9e51a92..17ecd7f 100644
+--- a/glib/gquark.c
++++ b/glib/gquark.c
+@@ -57,6 +57,11 @@ static gint           quark_block_offset = 0;
+ void
+ g_quark_init (void)
+ {
++  /* we may be initialized from c++ constructor or the glib ctor, but we
++  cannot guarantee in what order. So we check if we have been initialized */
++  if (quark_ht != NULL)
++    return;
++
+   g_assert (quark_seq_id == 0);
+   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
+   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
+@@ -179,6 +184,9 @@ quark_from_string (const gchar *string,
+ {
+   GQuark quark = 0;
+ 
++  if (G_UNLIKELY (quark_ht == NULL))
++    g_quark_init();
++
+   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+ 
+   if (!quark)
+-- 
+2.9.0
+

diff --git a/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch b/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch
new file mode 100644
index 0000000..d1a41ec
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch
@@ -0,0 +1,32 @@
+From 95b22035f6151ab465c37fe5e3e340713cb74e23 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 24 Mar 2020 18:44:54 -0700
+Subject: [PATCH] Mark gdbus-server-auth test flaky
+
+See https://gitlab.gnome.org/GNOME/glib/-/issues/1954
+---
+ gio/tests/meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index 788cf978b..7f45d0191 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -122,12 +122,13 @@ if dbus1_dep.found()
+     },
+     'gdbus-server-auth' : {
+       'dependencies' : [dbus1_dep],
++      'suite' : ['flaky'],
+     },
+   }
+ else
+   # We can build a cut-down version of this test without libdbus
+   gio_tests += {
+-    'gdbus-server-auth' : {},
++    'gdbus-server-auth' : {'suite' : ['flaky']},
+   }
+ endif
+ 
+-- 
+2.24.1
+

diff --git a/dev-libs/glib/glib-2.66.7.ebuild b/dev-libs/glib/glib-2.66.7.ebuild
new file mode 100644
index 0000000..20a8f7f
--- /dev/null
+++ b/dev-libs/glib/glib-2.66.7.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic gnome.org gnome2-utils linux-info meson multilib multilib-minimal python-any-r1 toolchain-funcs xdg
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="https://www.gtk.org/"
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+IUSE="dbus debug elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs sysprof systemtap test utils xattr"
+RESTRICT="!test? ( test )"
+
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
+
+# * libelf isn't strictly necessary, but makes gresource tool more useful, and
+# the check is automagic in gio/meson.build. gresource is not a multilib tool
+# right now, thus it doesn't matter if non-native ABI libelf exists or not
+# (non-native binary is overwritten, it doesn't matter if libelf was linked to).
+# * elfutils (via libelf) does not build on Windows. gresources are not embedded
+# within ELF binaries on that platform anyway and inspecting ELF binaries from
+# other platforms is not that useful so exclude the dependency in this case.
+# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
+# these are used by GIO, which glib[static-libs] consumers don't really seem
+# to need at all, thus not imposing the deps for now and once some consumers
+# are actually found to static link libgio-2.0.a, we can revisit and either add
+# them or just put the (build) deps in that rare consumer instead of recursive
+# RDEPEND here (due to lack of recursive DEPEND).
+RDEPEND="
+	!<dev-util/gdbus-codegen-${PV}
+	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
+	>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
+	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+	xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
+	!kernel_Winnt? ( virtual/libelf:0= )
+	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
+	sysprof? ( >=dev-util/sysprof-capture-3.38:4[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+# libxml2 used for optional tests that get automatically skipped
+BDEPEND="
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt
+	>=sys-devel/gettext-0.19.8
+	gtk-doc? ( >=dev-util/gtk-doc-1.33
+		app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5 )
+	systemtap? ( >=dev-util/systemtap-1.3 )
+	${PYTHON_DEPS}
+	test? ( >=sys-apps/dbus-1.2.14 )
+	virtual/pkgconfig
+"
+# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
+
+PDEPEND="
+	dbus? ( gnome-base/dconf )
+	mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/gio-querymodules$(get_exeext)
+)
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+	"${FILESDIR}"/0001-gquark-fix-initialization-with-c-constructors.patch
+)
+
+pkg_setup() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~INOTIFY_USER"
+		if use test ; then
+			CONFIG_CHECK="~IPV6"
+			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+		fi
+		linux-info_pkg_setup
+	fi
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	if use test; then
+		# TODO: Review the test exclusions, especially now with meson
+		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+		if ! has_version dev-util/desktop-file-utils ; then
+			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+			ewarn "think on installing it to get these tests run."
+			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+		fi
+
+		# gdesktopappinfo requires existing terminal (gnome-terminal or any
+		# other), falling back to xterm if one doesn't exist
+		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+		#	ewarn "Some tests will be skipped due to missing terminal program"
+		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
+		# 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
+		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+		# desktop-app-info/launch* might fail similarly
+		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
+		#fi
+
+		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
+		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+
+		ewarn "Tests for search-utils have been skipped"
+		sed -i -e "/search-utils/d" glib/tests/meson.build || die
+
+		# Play nice with network-sandbox, but this approach would defeat the purpose of the test
+		#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
+	else
+		# Don't build tests, also prevents extra deps, bug #512022
+		sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
+	fi
+
+	# Don't build fuzzing binaries - not used
+	sed -i -e '/subdir.*fuzzing/d' meson.build || die
+
+	# gdbus-codegen is a separate package
+	sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
+
+	# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
+	sed -i -e '/install_dir/d' gio/tests/meson.build || die
+
+	cat > "${T}/glib-test-ld-wrapper" <<-EOF
+		#!/usr/bin/env sh
+		exec \${LD:-ld} "\$@"
+	EOF
+	chmod a+x "${T}/glib-test-ld-wrapper" || die
+	sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
+
+	xdg_src_prepare
+	gnome2_environment_reset
+	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
+}
+
+multilib_src_configure() {
+	if use debug; then
+		append-cflags -DG_ENABLE_DEBUG
+	else
+		append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
+	fi
+
+	# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
+	#if tc-is-cross-compiler ; then
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
+		# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
+		#case ${CHOST} in
+		#hppa*|metag*) export glib_cv_stack_grows=yes ;;
+		#*)            export glib_cv_stack_grows=no ;;
+		#esac
+	#fi
+
+	local emesonargs=(
+		-Ddefault_library=$(usex static-libs both shared)
+		$(meson_feature selinux)
+		$(meson_use xattr)
+		-Dlibmount=enabled # only used if host_system == 'linux'
+		-Dinternal_pcre=false
+		-Dman=true
+		$(meson_use systemtap dtrace)
+		$(meson_use systemtap)
+		$(meson_feature sysprof)
+		-Dgtk_doc=$(multilib_native_usex gtk-doc true false)
+		$(meson_use fam)
+		-Dinstalled_tests=false
+		-Dnls=enabled
+		-Doss_fuzz=disabled
+	)
+	meson_src_configure
+}
+
+multilib_src_compile() {
+	meson_src_compile
+}
+
+multilib_src_test() {
+	export XDG_CONFIG_DIRS=/etc/xdg
+	export XDG_DATA_DIRS=/usr/local/share:/usr/share
+	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+	export LC_TIME=C # bug #411967
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# Related test is a bit nitpicking
+	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+
+	meson_src_test --timeout-multiplier 2 --no-suite flaky
+}
+
+multilib_src_install() {
+	meson_src_install
+	keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	# These are installed by dev-util/glib-utils
+	# 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
+	rm "${ED}/usr/bin/glib-genmarshal" || die
+	rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
+	rm "${ED}/usr/bin/glib-mkenums" || die
+	rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
+	rm "${ED}/usr/bin/gtester-report" || die
+	rm "${ED}/usr/share/man/man1/gtester-report.1" || die
+	# gdbus-codegen manpage installed by dev-util/gdbus-codegen
+	rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+
+	# Make gschemas.compiled belong to glib alone
+	local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
+
+	if [[ -e ${EROOT}${cache} ]]; then
+		cp "${EROOT}"${cache} "${ED}"/${cache} || die
+	else
+		touch "${ED}"${cache} || die
+	fi
+
+	multilib_pkg_preinst() {
+		# Make giomodule.cache belong to glib alone
+		local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
+
+		if [[ -e ${EROOT}${cache} ]]; then
+			cp "${EROOT}"${cache} "${ED}"${cache} || die
+		else
+			touch "${ED}"${cache} || die
+		fi
+	}
+
+	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
+	# file due to inability to create it and GIO might not look at any of the modules there
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_preinst
+	fi
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	# glib installs no schemas itself, but we force update for fresh install in case
+	# something has dropped in a schemas file without direct glib dep; and for upgrades
+	# in case the compiled schema format could have changed
+	gnome2_schemas_update
+
+	multilib_pkg_postinst() {
+		gnome2_giomodule_cache_update \
+			|| die "Update GIO modules cache failed (for ${ABI})"
+	}
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_postinst
+	else
+		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+		ewarn "You might want to run gio-querymodules manually on the target for"
+		ewarn "your final image for performance reasons and re-run it when packages"
+		ewarn "installing GIO modules get upgraded or added to the image."
+	fi
+
+	for v in ${REPLACING_VERSIONS}; do
+		if ver_test "$v" "-lt" "2.63.6"; then
+			ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
+			ewarn "to restart your session for \"Open With\" dialogs to work."
+		fi
+	done
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+	gnome2_schemas_update
+
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+		multilib_pkg_postrm() {
+			rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
+		}
+		multilib_foreach_abi multilib_pkg_postrm
+		rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
+	fi
+}

diff --git a/dev-libs/glib/metadata.xml b/dev-libs/glib/metadata.xml
new file mode 100644
index 0000000..c1bb61a
--- /dev/null
+++ b/dev-libs/glib/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>gnome@gentoo.org</email>
+		<name>Gentoo GNOME Desktop</name>
+	</maintainer>
+	<use>
+		<flag name="dbus">
+			Enable dependencies required by glib libraries
+			using dbus service to manage settings saving
+		</flag>
+		<flag name="mime">
+			Pull in shared MIME database that many glib-based
+			applications require at runtime to detect or open files. Warning:
+			do not disable this flag unless installing on a headless server.
+		</flag>
+		<flag name="systemtap">
+			Build support for profiling and tracing using
+			<pkg>dev-util/systemtap</pkg>
+		</flag>
+		<flag name="sysprof">
+			Enable profiling data capture support using
+			<pkg>dev-util/sysprof-capture</pkg>
+		</flag>
+		<flag name="utils">
+			Install gtester-report utility to generate test
+			report files for your software; build gresource utility with
+			ELF support.
+		</flag>
+	</use>
+	<upstream>
+		<remote-id type="cpe">cpe:/a:gnome:glib</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-13 21:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-03 12:27 [gentoo-commits] proj/musl:master commit in: dev-libs/glib/, dev-libs/glib/files/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2021-03-13 21:02 Sam James
2021-03-13 21:02 Sam James
2019-08-21 12:55 Anthony G. Basile
2018-12-29 18:15 Anthony G. Basile
2017-03-29 16:47 Aric Belsito
2017-02-23  1:47 Aric Belsito
2016-11-09  4:22 Aric Belsito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox