public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2020-01-11 18:13 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2020-01-11 18:13 UTC (permalink / raw
  To: gentoo-commits

commit:     0b605b42363650b0b8dcd49bb1b9787d317eceec
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 18:11:39 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Jan 11 18:12:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b605b42

dev-libs/glib: remove old

Package-Manager: Portage-2.3.79, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   2 -
 dev-libs/glib/files/2.58.3-CVE-2019-12450.patch    |  53 ----
 .../glib/files/2.58.3-gdbusmessage-limit-fix.patch | 120 --------
 .../files/glib-2.58.2-external-gdbus-codegen.patch | 124 --------
 dev-libs/glib/glib-2.58.3-r1.ebuild                | 316 ---------------------
 5 files changed, 615 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index bb414b1e7f6..35f017b7582 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1 @@
-DIST glib-2.58.3.tar.xz 4863648 BLAKE2B 4269bd6e80869f39d567917438f750561debb1b45d40ecea487d2e76e2468e07dc8d80a23678699f7b8f7778c2ed9d29e866ae5e33770f51ed00709dd5fe97eb SHA512 1e1cb5b607367dcbadb95563d463e81702cf396b28f1173f6d933707f4f3d5595a70225423e918807a05994a24f16fa3ac87d2ec67e4b670244ea99836634cce
 DIST glib-2.60.7.tar.xz 4590568 BLAKE2B a3f2a3bd0443a27326e8359c2ad1e6022ca1634f5c7cb4502a8011fbe85df690fff7d67665cf160bf4ed426214b87f6501a69158fb1656bdb86cacdcf076ee15 SHA512 d56d805a5abf6f7aeb8bf5be06b60ad049177ee23f78eacef4ce2ea88a8be49966a95e48fed17c752649f6e80937fd0ebc8f959709f623ec1f2f43ffd42d078a
-DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

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
deleted file mode 100644
index 949ac56431f..00000000000
--- a/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-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
deleted file mode 100644
index 0828132003d..00000000000
--- a/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-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/files/glib-2.58.2-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch
deleted file mode 100644
index 7615dbb248b..00000000000
--- a/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 69da419c33c24a05126d21fb3098139d30ba9093 Mon Sep 17 00:00:00 2001
-From: Mart Raudsepp <leio@gentoo.org>
-Date: Wed, 19 Dec 2018 14:01:43 +0200
-Subject: [PATCH] build: don't build gdbus-codegen and rely on external
- gdbus-codegen for tests
-
----
- configure.ac                                  |  1 -
- docs/reference/gio/Makefile.am                |  1 -
- gio/Makefile.am                               |  2 +-
- gio/tests/Makefile.am                         | 22 ++++++-------------
- .../gdbus-object-manager-example/Makefile.am  |  6 ++---
- 5 files changed, 10 insertions(+), 22 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4b15b69b8..9187a12bb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3481,7 +3481,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 08093e8a0..9ce11f824 100644
---- a/docs/reference/gio/Makefile.am
-+++ b/docs/reference/gio/Makefile.am
-@@ -212,7 +212,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 05b20cdef..ed5d7d4cb 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 c4e7a9257..4b538b1e9 100644
---- a/gio/tests/Makefile.am
-+++ b/gio/tests/Makefile.am
-@@ -253,9 +253,7 @@ gdbus-daemon-impl.c: $(top_srcdir)/gio/gdbusdaemon.c
- # These files are only generated on Windows builds inside GIO,
- # but we want them on non-Windows builds for the tests
- gdbus-daemon-generated.h gdbus-daemon-generated.c: $(top_srcdir)/gio/dbus-daemon.xml $(GDBUS_PYTHON_DEPS)
--	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
--		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
--		$(PYTHON) $(top_srcdir)/gio/gdbus-2.0/codegen/gdbus-codegen.in \
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-prefix org. \
- 		--generate-c-code gdbus-daemon-generated \
- 		--c-namespace _G \
-@@ -494,10 +492,8 @@ gnotification_SOURCES                    = $(gdbus_sessionbus_sources) gnotifica
- 
- BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h gdbus-test-codegen-generated-interface-info.c gdbus-test-codegen-generated-interface-info.h
- gdbus-test-codegen.o: gdbus-test-codegen-generated.h gdbus-test-codegen-generated-interface-info.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 \
-@@ -516,10 +512,8 @@ gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gd
- 		$(NULL)
- gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h
- 	@: # Generated as side-effect of .h
--gdbus-test-codegen-generated-interface-info.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-interface-info.h: test-codegen.xml Makefile
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-info-header \
- 		--annotate "org.project.Bar" Key1 Value1 \
- 		--annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
-@@ -532,10 +526,8 @@ gdbus-test-codegen-generated-interface-info.h: test-codegen.xml Makefile $(top_b
- 		--output $@ \
- 		$(srcdir)/test-codegen.xml \
- 		$(NULL)
--gdbus-test-codegen-generated-interface-info.c: 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-interface-info.c: test-codegen.xml Makefile
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-info-body \
- 		--annotate "org.project.Bar" Key1 Value1 \
- 		--annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
-diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
-index 1d0464c5c..0603d9b0a 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.17.0
-

diff --git a/dev-libs/glib/glib-2.58.3-r1.ebuild b/dev-libs/glib/glib-2.58.3-r1.ebuild
deleted file mode 100644
index bc9c6a10e39..00000000000
--- a/dev-libs/glib/glib-2.58.3-r1.ebuild
+++ /dev/null
@@ -1,316 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,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"
-RESTRICT="!test? ( test )"
-
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
-
-# 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() {
-	# 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] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2024-01-22  5:52 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2024-01-22  5:52 UTC (permalink / raw
  To: gentoo-commits

commit:     11641c3d40b399e3eacef4cecf256b5f2b4b5aa3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 22 05:51:57 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 22 05:51:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11641c3d

dev-libs/glib: fix Python 3.12 build w/o setuptools

Closes: https://bugs.gentoo.org/922654
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/glib/files/glib-2.78.4-distutils.patch    | 36 ++++++++++++++++++++++
 .../{glib-2.78.4.ebuild => glib-2.78.4-r1.ebuild}  |  8 +++++
 2 files changed, 44 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.78.4-distutils.patch b/dev-libs/glib/files/glib-2.78.4-distutils.patch
new file mode 100644
index 000000000000..70ceebcf7095
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.78.4-distutils.patch
@@ -0,0 +1,36 @@
+https://bugs.gentoo.org/922654
+https://gitlab.gnome.org/GNOME/glib/-/issues/3134
+https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291
+
+[sam: Trimmed the CI changes.]
+
+From 6ef967a0f930ce37a8c9b5aff969693b34714291 Mon Sep 17 00:00:00 2001
+From: Jordan Williams <jordan@jwillikers.com>
+Date: Fri, 1 Dec 2023 09:53:50 -0600
+Subject: [PATCH] Switch from the deprecated distutils module to the packaging
+ module
+
+The distutils module was removed in Python 3.12.
+---
+
+--- a/gio/gdbus-2.0/codegen/utils.py
++++ b/gio/gdbus-2.0/codegen/utils.py
+@@ -19,7 +19,7 @@
+ #
+ # Author: David Zeuthen <davidz@redhat.com>
+ 
+-import distutils.version
++import packaging.version
+ import os
+ import sys
+ 
+@@ -166,4 +166,4 @@ def version_cmp_key(key):
+         v = str(key[0])
+     else:
+         v = "0"
+-    return (distutils.version.LooseVersion(v), key[1])
++    return (packaging.version.Version(v), key[1])
+-- 
+GitLab
+
+

diff --git a/dev-libs/glib/glib-2.78.4.ebuild b/dev-libs/glib/glib-2.78.4-r1.ebuild
similarity index 98%
rename from dev-libs/glib/glib-2.78.4.ebuild
rename to dev-libs/glib/glib-2.78.4-r1.ebuild
index 6fdf95422485..ec81f416256d 100644
--- a/dev-libs/glib/glib-2.78.4.ebuild
+++ b/dev-libs/glib/glib-2.78.4-r1.ebuild
@@ -51,6 +51,9 @@ BDEPEND="
 		app-text/docbook-xml-dtd:4.5 )
 	systemtap? ( >=dev-debug/systemtap-1.3 )
 	${PYTHON_DEPS}
+	$(python_gen_any_dep '
+		dev-python/packaging[${PYTHON_USEDEP}]
+	')
 	test? ( >=sys-apps/dbus-1.2.14 )
 	virtual/pkgconfig
 "
@@ -69,8 +72,13 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+	"${FILESDIR}"/${PN}-2.78.4-distutils.patch
 )
 
+python_check_deps() {
+	python_has_version "dev-python/packaging[${PYTHON_USEDEP}]"
+}
+
 pkg_setup() {
 	if use kernel_linux ; then
 		CONFIG_CHECK="~INOTIFY_USER"


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2023-03-16 23:51 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2023-03-16 23:51 UTC (permalink / raw
  To: gentoo-commits

commit:     494fdf6d476ec4dfa6b6c801b66709765bdce45a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 16 23:47:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 16 23:50:33 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=494fdf6d

dev-libs/glib: backport fix for building C++ applications

Closes: https://bugs.gentoo.org/901211
Closes: https://bugs.gentoo.org/901035
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch | 132 ++++++++++
 dev-libs/glib/glib-2.76.0-r1.ebuild                | 284 +++++++++++++++++++++
 2 files changed, 416 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch b/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch
new file mode 100644
index 000000000000..23b0a1b641c1
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch
@@ -0,0 +1,132 @@
+https://bugs.gentoo.org/901035
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3322
+https://gitlab.gnome.org/GNOME/glib/-/commit/cc7f2f81cc59751fcc689731dcd60af5da5723ba
+
+From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Mon, 13 Mar 2023 16:23:37 +0800
+Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid
+ breaking C++ code
+
+Wrap the logic into a G_ALWAYS_INLINE function, instead of using a
+complex statement-expression which is not allowed in braced initializer
+lists and expanded into some bad thing when it's used as
+`::g_strdup(...)`.
+
+We cannot use `__builtin_constant_p (str)` because GCC documentation
+clearly states that it always produces 0 when str is a const char *
+argument of an inline function.  But `__builtin_constant_p (!str)`,
+`__builtin_constant_p (!!str)`, and
+`__builtin_constant_p (strlen (str))` functions properly with `-O1` or
+above enabled.
+
+Fixes #2936.
+--- a/glib/gstrfuncs.h
++++ b/glib/gstrfuncs.h
+@@ -204,23 +204,6 @@ gboolean             (g_str_has_prefix) (const gchar *str,
+     (g_str_has_suffix) (STR, SUFFIX)                                          \
+   )
+ 
+-#define g_strdup(STR)                                                         \
+-  (__builtin_constant_p ((STR)) ?                                             \
+-    (G_LIKELY ((STR) != NULL) ?                                               \
+-      G_GNUC_EXTENSION ({                                                     \
+-        const char *const ___str = ((STR));                                   \
+-        const char *const __str = _G_STR_NONNULL (___str);                    \
+-        const size_t __str_len = strlen (__str) + 1;                          \
+-        char *__dup_str = (char *) g_malloc (__str_len);                      \
+-        (char *) memcpy (__dup_str, __str, __str_len);                        \
+-      })                                                                      \
+-      :                                                                       \
+-      (char *) (NULL)                                                         \
+-    )                                                                         \
+-    :                                                                         \
+-    (g_strdup) ((STR))                                                        \
+-  )
+-
+ #endif /* !defined (__GI_SCANNER__) */
+ #endif /* !defined (__GTK_DOC_IGNORE__) */
+ #endif /* G_GNUC_CHECK_VERSION (2, 0) */
+@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL
+ gchar*                g_strjoin	       (const gchar  *separator,
+ 					...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+ 
++#if G_GNUC_CHECK_VERSION(2, 0)
++#ifndef __GTK_DOC_IGNORE__
++#ifndef __GI_SCANNER__
++
++G_ALWAYS_INLINE static inline char *
++g_strdup_inline (const char *str)
++{
++  if (__builtin_constant_p (!str) && !str)
++    return NULL;
++
++  if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str)))
++    {
++      const size_t len = strlen (str) + 1;
++      char *dup_str = (char *) g_malloc (len);
++      return (char *) memcpy (dup_str, str, len);
++    }
++
++  return g_strdup (str);
++}
++
++#define g_strdup(x) g_strdup_inline (x)
++
++#endif /* !defined (__GI_SCANNER__) */
++#endif /* !defined (__GTK_DOC_IGNORE__) */
++#endif /* G_GNUC_CHECK_VERSION (2, 0) */
++
+ /* Make a copy of a string interpreting C string -style escape
+  * sequences. Inverse of g_strescape. The recognized sequences are \b
+  * \f \n \r \t \\ \" and the octal format.
+--- a/glib/tests/cxx.cpp
++++ b/glib/tests/cxx.cpp
+@@ -349,6 +349,36 @@ test_strdup_macro (void)
+   g_free (str);
+ }
+ 
++static void
++test_strdup_macro_qualified (void)
++{
++  gchar *str;
++
++  g_assert_null (::g_strdup (NULL));
++
++  str = ::g_strdup ("C++ is cool too!");
++  g_assert_nonnull (str);
++  g_assert_cmpstr (str, ==, "C++ is cool too!");
++  g_free (str);
++}
++
++static void
++test_strdup_macro_nested_initializer (void)
++{
++  struct
++  {
++    char *p, *q;
++  } strings = {
++    g_strdup (NULL),
++    g_strdup ("C++ is cool too!"),
++  };
++
++  g_assert_null (strings.p);
++  g_assert_nonnull (strings.q);
++  g_assert_cmpstr (strings.q, ==, "C++ is cool too!");
++  g_free (strings.q);
++}
++
+ static void
+ test_str_has_prefix (void)
+ {
+@@ -527,6 +557,8 @@ main (int argc, char *argv[])
+   g_test_add_func ("/C++/str-equal", test_str_equal);
+   g_test_add_func ("/C++/strdup", test_strdup);
+   g_test_add_func ("/C++/strdup/macro", test_strdup_macro);
++  g_test_add_func ("/C++/strdup/macro/qualified", test_strdup_macro_qualified);
++  g_test_add_func ("/C++/strdup/macro/nested-initializer", test_strdup_macro_nested_initializer);
+   g_test_add_func ("/C++/str-has-prefix", test_str_has_prefix);
+   g_test_add_func ("/C++/str-has-prefix/macro", test_str_has_prefix_macro);
+   g_test_add_func ("/C++/str-has-suffix", test_str_has_suffix);
+-- 
+GitLab

diff --git a/dev-libs/glib/glib-2.76.0-r1.ebuild b/dev-libs/glib/glib-2.76.0-r1.ebuild
new file mode 100644
index 000000000000..56112f34dd89
--- /dev/null
+++ b/dev-libs/glib/glib-2.76.0-r1.ebuild
@@ -0,0 +1,284 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_REQ_USE="xml(+)"
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit gnome.org gnome2-utils linux-info meson-multilib multilib 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 +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# * 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/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),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}] ) )
+	elf? ( virtual/libelf:0= )
+	sysprof? ( >=dev-util/sysprof-capture-3.40.1: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}"/${PN}-2.76.0-g_strdup-c++.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
+
+	default
+	gnome2_environment_reset
+	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
+}
+
+multilib_src_configure() {
+	# 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=(
+		--buildtype $(usex debug debug plain)
+		-Ddefault_library=$(usex static-libs both shared)
+		-Druntime_dir="${EPREFIX}"/run
+		$(meson_feature selinux)
+		$(meson_use xattr)
+		-Dlibmount=enabled # only used if host_system == 'linux'
+		-Dman=true
+		$(meson_use systemtap dtrace)
+		$(meson_use systemtap)
+		$(meson_feature sysprof)
+		$(meson_native_use_bool gtk-doc gtk_doc)
+		$(meson_use test tests)
+		-Dinstalled_tests=false
+		-Dnls=enabled
+		-Doss_fuzz=disabled
+		$(meson_native_use_feature elf libelf)
+		-Dmultiarch=false
+	)
+	meson_src_configure
+}
+
+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
+	export TZ=UTC
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# https://bugs.gentoo.org/839807
+	local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
+	addpredict /usr/b
+
+	# 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() {
+	# 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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2023-03-04  0:48 Matt Turner
  0 siblings, 0 replies; 19+ messages in thread
From: Matt Turner @ 2023-03-04  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     c759e1314a540cc5d08ca4b5b7b7ccbfce7fa277
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  4 00:47:55 2023 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Mar  4 00:48:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c759e131

dev-libs/glib: Add patch to skip test

The assert-msg-test.py test doesn't work under sandbox.

Closes: https://bugs.gentoo.org/871330
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 ...ests-Skip-assert-msg-test.py-if-gdb-fails.patch | 33 ++++++++++++++++++++++
 dev-libs/glib/glib-2.74.5.ebuild                   |  2 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
new file mode 100644
index 000000000000..ed8fc97b3992
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
@@ -0,0 +1,33 @@
+From 19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 2 Mar 2023 00:13:22 -0500
+Subject: [PATCH] tests: Skip assert-msg-test.py if gdb fails
+
+Similar to commit 6e44151bf74d, skip the test if gdb is unable to read
+/proc/PID/mem, which gdb does as a fallback if ptrace is unavailable.
+
+This allows the test to skip when run under Gentoo's sandbox.
+---
+ glib/tests/assert-msg-test.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/glib/tests/assert-msg-test.py b/glib/tests/assert-msg-test.py
+index 4936fa083..33aa2249e 100755
+--- a/glib/tests/assert-msg-test.py
++++ b/glib/tests/assert-msg-test.py
+@@ -158,9 +158,9 @@ class TestAssertMessage(unittest.TestCase):
+ 
+             # Some CI environments disable ptrace (as they’re running in a
+             # container). If so, skip the test as there’s nothing we can do.
+-            if (
+-                result.info.returncode != 0
+-                and "ptrace: Operation not permitted" in result.err
++            if result.info.returncode != 0 and (
++                "ptrace: Operation not permitted" in result.err
++                or "warning: opening /proc/PID/mem file for lwp" in result.err
+             ):
+                 self.skipTest("GDB is not functional due to ptrace being disabled")
+ 
+-- 
+2.39.2
+

diff --git a/dev-libs/glib/glib-2.74.5.ebuild b/dev-libs/glib/glib-2.74.5.ebuild
index 678d48cb72dd..f0c142206738 100644
--- a/dev-libs/glib/glib-2.74.5.ebuild
+++ b/dev-libs/glib/glib-2.74.5.ebuild
@@ -69,6 +69,8 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+
+	"${FILESDIR}"/${P}-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2022-12-21 23:28 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-12-21 23:28 UTC (permalink / raw
  To: gentoo-commits

commit:     d017b0631b6bf1acbafc9480a6ea07d1a1870a91
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 21 23:27:42 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 21 23:27:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d017b063

dev-libs/glib: add 2.74.4

Bug: https://bugs.gentoo.org/887807
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   1 +
 .../files/glib-2.74.4-implicit-func-decl.patch     |  24 ++
 dev-libs/glib/glib-2.74.4.ebuild                   | 288 +++++++++++++++++++++
 3 files changed, 313 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 26c04fce0287..12c33f3713be 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,4 @@
 DIST glib-2.74.1.tar.xz 5189452 BLAKE2B 58d977a5d2a100aa9125f2009ae66c6f27232dff70159433076552bdb64f9a6a93d7cb705feba890ee43d6f16d4766f6f1d5502c2e01eeb7e88d5ed0dd205d5c SHA512 21176cb95fcab49a781d02789bf21191a96a34a6391f066699b3c20b414b3169c958bd86623deb34ca55912083862885f7a7d12b67cc041467da2ba94d9e83c3
 DIST glib-2.74.3-patches-2.tar.xz 23576 BLAKE2B f3746bdf961890d9f4e7ad20b107b83b7ceb8dcc36e288c1d526bac31a0e1dd9d1f13323f512355085c77d186ad66c3f52c1154f34c1d6fd6a5e64a074b2920c SHA512 945c131c27f02044db6154f0a63f458d6317c8a4e841fb392947b16756e25d92adeb2b34d793c9e19441b825d1aee71ae9b08fdcbefa1bc9de1d5af9e903e82c
 DIST glib-2.74.3.tar.xz 5181732 BLAKE2B 46c37be9519866af040b2aaf35129a9cfae6e2c74636c01755b901002fa77f4e2305025691d7a8279acfbae1298a4b5b1e095b333bed3b067e9820547b6eca97 SHA512 a9aa7e84187abb57aeeff9c7f4c4125be742a510ae5d39b6b62696ad1a715c36b353c6c14222caeb1e87bed930fb54184dba77118b991c42f1857a292c6aa77b
+DIST glib-2.74.4.tar.xz 5208484 BLAKE2B 01a2818e63469019abcd1215fa85521b9a2e55644040e8fe2797f68cabe897a191ae2c1cc2ab75d5ba9980d63adbfc00636b295ee942d70579e7eba1e1f49502 SHA512 912f6b0559fcb5ad55fa36837a348228b8e2498c490271204ced9f2e4a9eab804de4745f3ec439a198eb275d7263f18bc670f45460e2be55a2cbe45466b02fc6

diff --git a/dev-libs/glib/files/glib-2.74.4-implicit-func-decl.patch b/dev-libs/glib/files/glib-2.74.4-implicit-func-decl.patch
new file mode 100644
index 000000000000..9cd48a26453e
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.4-implicit-func-decl.patch
@@ -0,0 +1,24 @@
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3165
+
+From 6626765a79f125cf0ec9cdaefa51ceef718d41e7 Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@redhat.com>
+Date: Tue, 20 Dec 2022 17:10:41 -0600
+Subject: [PATCH] gthread-posix: need to #include <errno.h>
+
+a79c6af23eff5ee978db62e048828c9a992a1261 uses errno without the required
+header.
+
+
+(cherry picked from commit 03cb4261e00cf505790f4fd4e69f97b2ef4fcccd)
+--- a/glib/gthreadprivate.h
++++ b/glib/gthreadprivate.h
+@@ -41,6 +41,7 @@ struct  _GRealThread
+ /* system thread implementation (gthread-posix.c, gthread-win32.c) */
+ 
+ #if defined(HAVE_FUTEX) || defined(HAVE_FUTEX_TIME64)
++#include <errno.h>
+ #include <linux/futex.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+-- 
+GitLab

diff --git a/dev-libs/glib/glib-2.74.4.ebuild b/dev-libs/glib/glib-2.74.4.ebuild
new file mode 100644
index 000000000000..4da035ddf9e3
--- /dev/null
+++ b/dev-libs/glib/glib-2.74.4.ebuild
@@ -0,0 +1,288 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_REQ_USE="xml(+)"
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib 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 +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
+RESTRICT="!test? ( test )"
+#REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# * 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/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),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}] ) )
+	elf? ( virtual/libelf:0= )
+	sysprof? ( >=dev-util/sysprof-capture-3.40.1: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}"/${P}-implicit-func-decl.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
+
+	default
+	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'
+		-Dman=true
+		$(meson_use systemtap dtrace)
+		$(meson_use systemtap)
+		$(meson_feature sysprof)
+		$(meson_native_use_bool gtk-doc gtk_doc)
+		$(meson_use test tests)
+		-Dinstalled_tests=false
+		-Dnls=enabled
+		-Doss_fuzz=disabled
+		$(meson_native_use_feature elf libelf)
+		-Dmultiarch=false
+	)
+	meson_src_configure
+}
+
+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
+	export TZ=UTC
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# https://bugs.gentoo.org/839807
+	local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
+	addpredict /usr/b
+
+	# 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() {
+	# 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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2022-11-26 17:19 Matt Turner
  0 siblings, 0 replies; 19+ messages in thread
From: Matt Turner @ 2022-11-26 17:19 UTC (permalink / raw
  To: gentoo-commits

commit:     90faffceb3b073b8f24d7dfebe489abecf2f8535
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 26 16:31:26 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Nov 26 17:19:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90faffce

dev-libs/glib: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   1 -
 dev-libs/glib/files/glib-2.74.0-clang-build.patch  |  26 --
 .../glib/files/glib-2.74.0-crash-gparamspec.patch  |  27 --
 dev-libs/glib/glib-2.74.0-r1.ebuild                | 289 ---------------------
 dev-libs/glib/glib-2.74.1.ebuild                   | 283 --------------------
 5 files changed, 626 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 878c1cbe294d..e298847984d8 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,4 +1,3 @@
 DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6 SHA512 8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638
-DIST glib-2.74.0.tar.xz 5183072 BLAKE2B b21e5a72e2ce3390cbf13601aa902104f1ac1cfbd75181d30cd340f24b5875753f898b229f99c71d47d499be86cddb0191a0072c0c2decc82956a46c16255905 SHA512 5cdadd2f4568c0c3d45083b4d39699abf651e42e020f7bc880cce3ff33d28943118388d17a0632777e843f48009c1f97d5634fde3cb8c69c7c7f35b278ac8225
 DIST glib-2.74.1.tar.xz 5189452 BLAKE2B 58d977a5d2a100aa9125f2009ae66c6f27232dff70159433076552bdb64f9a6a93d7cb705feba890ee43d6f16d4766f6f1d5502c2e01eeb7e88d5ed0dd205d5c SHA512 21176cb95fcab49a781d02789bf21191a96a34a6391f066699b3c20b414b3169c958bd86623deb34ca55912083862885f7a7d12b67cc041467da2ba94d9e83c3
 DIST glib-2.74.2.tar.xz 5182312 BLAKE2B 319a8fb793adb7343b77119d7b7839efad6f91b9c7af079f53d54b435067ab12162c4791ca6b8e9b7fd6d269975e9559951cbf80a065072541f407a0d8e2ce74 SHA512 90bb2410f038e47401fc985ff7fe6d1abecec9417254e039ac18e6b0d77e0b8539b975bef84d5f933be8e43c8ceca236bd466622504491e08e71d079d8804895

diff --git a/dev-libs/glib/files/glib-2.74.0-clang-build.patch b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
deleted file mode 100644
index 23bb0630d028..000000000000
--- a/dev-libs/glib/files/glib-2.74.0-clang-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://gitlab.gnome.org/GNOME/glib/-/commit/37dba1c425f6c3254e9ce72f1c4b7d0f95c2be3e
-https://bugs.gentoo.org/871174
-
-From: Kjell Ahlstedt <kjellahlstedt@gmail.com>
-Date: Thu, 15 Sep 2022 12:55:18 +0200
-Subject: [PATCH] gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for
- clang
-
-The clang compiler requires the static_assert expression to be an integral
-constant expression. `"text"` is not, but `sizeof "text"` is.
-
-Fixes #2740
---- a/gio/gio-launch-desktop.c
-+++ b/gio/gio-launch-desktop.c
-@@ -121,8 +121,8 @@ journal_stream_fd (const char *identifier,
-   /* Arbitrary large size for the sending buffer, from systemd */
-   int large_buffer_size = 8 * 1024 * 1024;
- 
--  G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
--  G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
-+  G_STATIC_ASSERT (LOG_EMERG == 0 && sizeof "Linux ABI defines LOG_EMERG");
-+  G_STATIC_ASSERT (LOG_DEBUG == 7 && sizeof "Linux ABI defines LOG_DEBUG");
- 
-   fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
- 
-GitLab

diff --git a/dev-libs/glib/files/glib-2.74.0-crash-gparamspec.patch b/dev-libs/glib/files/glib-2.74.0-crash-gparamspec.patch
deleted file mode 100644
index 84edcde4189d..000000000000
--- a/dev-libs/glib/files/glib-2.74.0-crash-gparamspec.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://gitlab.gnome.org/GNOME/glib/-/commit/ea3f17d598d550345e94e4571130e429443e91cb
-https://gitlab.gnome.org/GNOME/glib/-/issues/2770
-
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
-GitLab

diff --git a/dev-libs/glib/glib-2.74.0-r1.ebuild b/dev-libs/glib/glib-2.74.0-r1.ebuild
deleted file mode 100644
index 505345d23969..000000000000
--- a/dev-libs/glib/glib-2.74.0-r1.ebuild
+++ /dev/null
@@ -1,289 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_REQ_USE="xml(+)"
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib 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 +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
-RESTRICT="!test? ( test )"
-#REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-
-# * 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/libpcre2-10.32:0=[${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}] ) )
-	elf? ( virtual/libelf:0= )
-	sysprof? ( >=dev-util/sysprof-capture-3.40.1: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}"/${P}-clang-build.patch
-	"${FILESDIR}"/${P}-crash-gparamspec.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
-
-	default
-	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'
-		-Dman=true
-		$(meson_use systemtap dtrace)
-		$(meson_use systemtap)
-		$(meson_feature sysprof)
-		$(meson_native_use_bool gtk-doc gtk_doc)
-		$(meson_use test tests)
-		-Dinstalled_tests=false
-		-Dnls=enabled
-		-Doss_fuzz=disabled
-		$(meson_native_use_feature elf libelf)
-		-Dmultiarch=false
-	)
-	meson_src_configure
-}
-
-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
-	export TZ=UTC
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# https://bugs.gentoo.org/839807
-	local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
-	addpredict /usr/b
-
-	# 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() {
-	# 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/glib-2.74.1.ebuild b/dev-libs/glib/glib-2.74.1.ebuild
deleted file mode 100644
index c4d2906460ab..000000000000
--- a/dev-libs/glib/glib-2.74.1.ebuild
+++ /dev/null
@@ -1,283 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_REQ_USE="xml(+)"
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib 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 +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
-RESTRICT="!test? ( test )"
-#REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-
-# * 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/libpcre2-10.32:0=[${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}] ) )
-	elf? ( virtual/libelf:0= )
-	sysprof? ( >=dev-util/sysprof-capture-3.40.1: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)
-)
-
-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
-
-	default
-	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'
-		-Dman=true
-		$(meson_use systemtap dtrace)
-		$(meson_use systemtap)
-		$(meson_feature sysprof)
-		$(meson_native_use_bool gtk-doc gtk_doc)
-		$(meson_use test tests)
-		-Dinstalled_tests=false
-		-Dnls=enabled
-		-Doss_fuzz=disabled
-		$(meson_native_use_feature elf libelf)
-		-Dmultiarch=false
-	)
-	meson_src_configure
-}
-
-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
-	export TZ=UTC
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# https://bugs.gentoo.org/839807
-	local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
-	addpredict /usr/b
-
-	# 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() {
-	# 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
-}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2022-11-01 22:10 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-11-01 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     92e1c534401aa14856d4f4e0887934bd24882d8c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  1 22:10:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  1 22:10:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92e1c534

dev-libs/glib: backport gnome-keyring CPU peg fix

Bug: https://bugs.gentoo.org/878995
Bug: https://bugs.gentoo.org/878351
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../glib/files/glib-2.74.1-gnome-keyring-cpu.patch | 131 ++++++++++
 dev-libs/glib/glib-2.74.1-r1.ebuild                | 288 +++++++++++++++++++++
 2 files changed, 419 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.74.1-gnome-keyring-cpu.patch b/dev-libs/glib/files/glib-2.74.1-gnome-keyring-cpu.patch
new file mode 100644
index 000000000000..8cb07a2803f3
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.1-gnome-keyring-cpu.patch
@@ -0,0 +1,131 @@
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3029
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3039 (backport PR we've used)
+https://bugs.gentoo.org/878995
+https://bugs.gentoo.org/878351
+
+From e2f283d7c8c5ab3aeb2f281a27ec7c0f24b86868 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode@redhat.com>
+Date: Fri, 28 Oct 2022 11:21:04 -0400
+Subject: [PATCH 1/2] Revert "Handling collision between standard i/o file
+ descriptors and newly created ones"
+
+g_unix_open_pipe tries to avoid the standard io fd range
+when getting pipe fds. This turns out to be a bad idea because
+certain buggy programs rely on it using that range.
+
+This reverts commit d9ba6150909818beb05573f54f26232063492c5b
+--- a/glib/glib-unix.c
++++ b/glib/glib-unix.c
+@@ -108,17 +108,6 @@ g_unix_open_pipe (int     *fds,
+     ecode = pipe2 (fds, pipe2_flags);
+     if (ecode == -1 && errno != ENOSYS)
+       return g_unix_set_error_from_errno (error, errno);
+-    /* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
+-    else if (fds[0] < 3 || fds[1] < 3)
+-      {
+-        int old_fds[2] = { fds[0], fds[1] };
+-        gboolean result = g_unix_open_pipe (fds, flags, error);
+-        close (old_fds[0]);
+-        close (old_fds[1]);
+-
+-        if (!result)
+-          g_unix_set_error_from_errno (error, errno);
+-      }
+     else if (ecode == 0)
+       return TRUE;
+     /* Fall through on -ENOSYS, we must be running on an old kernel */
+@@ -127,19 +116,6 @@ g_unix_open_pipe (int     *fds,
+   ecode = pipe (fds);
+   if (ecode == -1)
+     return g_unix_set_error_from_errno (error, errno);
+-  /* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
+-  else if (fds[0] < 3 || fds[1] < 3)
+-    {
+-      int old_fds[2] = { fds[0], fds[1] };
+-      gboolean result = g_unix_open_pipe (fds, flags, error);
+-      close (old_fds[0]);
+-      close (old_fds[1]);
+-
+-      if (!result)
+-        g_unix_set_error_from_errno (error, errno);
+-
+-      return result;
+-    }
+ 
+   if (flags == 0)
+     return TRUE;
+GitLab
+From 4526620d8c485f5dfba6ddca33f91670982f82eb Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode@redhat.com>
+Date: Mon, 31 Oct 2022 09:17:55 -0400
+Subject: [PATCH 2/2] glib-unix: Add test to make sure g_unix_open_pipe will
+ intrude standard range
+
+Now that we know it's a bad idea to avoid the standard io fd range
+when getting pipe fds for g_unix_open_pipe, we should test to make sure
+we don't inadvertently try to do it again.
+
+This commit adds that test.
+--- a/glib/tests/unix.c
++++ b/glib/tests/unix.c
+@@ -24,8 +24,11 @@
+ #include "config.h"
+ 
+ #include "glib-unix.h"
++#include "gstdio.h"
++
+ #include <string.h>
+ #include <pwd.h>
++#include <unistd.h>
+ 
+ static void
+ test_pipe (void)
+@@ -52,6 +55,39 @@ test_pipe (void)
+   g_assert (g_str_has_prefix (buf, "hello"));
+ }
+ 
++static void
++test_pipe_stdio_overwrite (void)
++{
++  GError *error = NULL;
++  int pipefd[2], ret;
++  gboolean res;
++  int stdin_fd;
++
++  stdin_fd = dup (STDIN_FILENO);
++  g_assert_cmpint (stdin_fd, >, 0);
++
++  g_close (STDIN_FILENO, &error);
++  g_assert_no_error (error);
++
++  res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
++  g_assert_no_error (error);
++  g_assert_true (res);
++
++  g_assert_cmpint (pipefd[0], ==, STDIN_FILENO);
++
++  g_close (pipefd[0], &error);
++  g_assert_no_error (error);
++
++  g_close (pipefd[1], &error);
++  g_assert_no_error (error);
++
++  ret = dup2 (stdin_fd, STDIN_FILENO);
++  g_assert_cmpint (ret, >=, 0);
++
++  g_close (stdin_fd, &error);
++  g_assert_no_error (error);
++}
++
+ static void
+ test_error (void)
+ {
+@@ -337,6 +373,7 @@ main (int   argc,
+   g_test_init (&argc, &argv, NULL);
+ 
+   g_test_add_func ("/glib-unix/pipe", test_pipe);
++  g_test_add_func ("/glib-unix/pipe-stdio-overwrite", test_pipe_stdio_overwrite);
+   g_test_add_func ("/glib-unix/error", test_error);
+   g_test_add_func ("/glib-unix/nonblocking", test_nonblocking);
+   g_test_add_func ("/glib-unix/sighup", test_sighup);
+GitLab

diff --git a/dev-libs/glib/glib-2.74.1-r1.ebuild b/dev-libs/glib/glib-2.74.1-r1.ebuild
new file mode 100644
index 000000000000..11e0a8149c3b
--- /dev/null
+++ b/dev-libs/glib/glib-2.74.1-r1.ebuild
@@ -0,0 +1,288 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_REQ_USE="xml(+)"
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib 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 +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
+RESTRICT="!test? ( test )"
+#REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# * 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/libpcre2-10.32:0=[${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}] ) )
+	elf? ( virtual/libelf:0= )
+	sysprof? ( >=dev-util/sysprof-capture-3.40.1: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.74.0-crash-gparamspec.patch
+	"${FILESDIR}"/${P}-gnome-keyring-cpu.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
+
+	default
+	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'
+		-Dman=true
+		$(meson_use systemtap dtrace)
+		$(meson_use systemtap)
+		$(meson_feature sysprof)
+		$(meson_native_use_bool gtk-doc gtk_doc)
+		$(meson_use test tests)
+		-Dinstalled_tests=false
+		-Dnls=enabled
+		-Doss_fuzz=disabled
+		$(meson_native_use_feature elf libelf)
+		-Dmultiarch=false
+	)
+	meson_src_configure
+}
+
+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
+	export TZ=UTC
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# https://bugs.gentoo.org/839807
+	local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
+	addpredict /usr/b
+
+	# 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() {
+	# 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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2022-09-22  4:13 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-09-22  4:13 UTC (permalink / raw
  To: gentoo-commits

commit:     bab72b72ddea0be05aa764df10093086e01cbc13
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 22 04:13:25 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 04:13:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bab72b72

dev-libs/glib: fix build w/ Clang

Closes: https://bugs.gentoo.org/871174
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/glib/files/glib-2.74.0-clang-build.patch | 26 +++++++++++++++++++++++
 dev-libs/glib/glib-2.74.0.ebuild                  |  1 +
 2 files changed, 27 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.74.0-clang-build.patch b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
new file mode 100644
index 000000000000..23bb0630d028
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
@@ -0,0 +1,26 @@
+https://gitlab.gnome.org/GNOME/glib/-/commit/37dba1c425f6c3254e9ce72f1c4b7d0f95c2be3e
+https://bugs.gentoo.org/871174
+
+From: Kjell Ahlstedt <kjellahlstedt@gmail.com>
+Date: Thu, 15 Sep 2022 12:55:18 +0200
+Subject: [PATCH] gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for
+ clang
+
+The clang compiler requires the static_assert expression to be an integral
+constant expression. `"text"` is not, but `sizeof "text"` is.
+
+Fixes #2740
+--- a/gio/gio-launch-desktop.c
++++ b/gio/gio-launch-desktop.c
+@@ -121,8 +121,8 @@ journal_stream_fd (const char *identifier,
+   /* Arbitrary large size for the sending buffer, from systemd */
+   int large_buffer_size = 8 * 1024 * 1024;
+ 
+-  G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
+-  G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
++  G_STATIC_ASSERT (LOG_EMERG == 0 && sizeof "Linux ABI defines LOG_EMERG");
++  G_STATIC_ASSERT (LOG_DEBUG == 7 && sizeof "Linux ABI defines LOG_DEBUG");
+ 
+   fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
+ 
+GitLab

diff --git a/dev-libs/glib/glib-2.74.0.ebuild b/dev-libs/glib/glib-2.74.0.ebuild
index db17ff43554c..2afacc7da2a4 100644
--- a/dev-libs/glib/glib-2.74.0.ebuild
+++ b/dev-libs/glib/glib-2.74.0.ebuild
@@ -69,6 +69,7 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+	"${FILESDIR}"/${P}-clang-build.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2020-03-25  2:20 Matt Turner
  0 siblings, 0 replies; 19+ messages in thread
From: Matt Turner @ 2020-03-25  2:20 UTC (permalink / raw
  To: gentoo-commits

commit:     596b0ccea3bd58cff19d13a80a7529a7798bb38f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 24 05:24:10 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Mar 25 02:20:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=596b0cce

dev-libs/glib: Version bump to 2.64.1

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   1 +
 ...-2.64.1-mark-gdbus-server-auth-test-flaky.patch |  32 +++
 dev-libs/glib/glib-2.64.1.ebuild                   | 278 +++++++++++++++++++++
 3 files changed, 311 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index c484d0b783f..115723e3d8e 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,4 @@
 DIST glib-2.60.7.tar.xz 4590568 BLAKE2B a3f2a3bd0443a27326e8359c2ad1e6022ca1634f5c7cb4502a8011fbe85df690fff7d67665cf160bf4ed426214b87f6501a69158fb1656bdb86cacdcf076ee15 SHA512 d56d805a5abf6f7aeb8bf5be06b60ad049177ee23f78eacef4ce2ea88a8be49966a95e48fed17c752649f6e80937fd0ebc8f959709f623ec1f2f43ffd42d078a
 DIST glib-2.62.5.tar.xz 4702492 BLAKE2B 03e04cb149b3301959013c5db20b1f3606951ed80105e0580d40177586a5834afb975ace0d25d5311fd63d29a48129128bdddf29a808e371f1400c00033be1a3 SHA512 2f99422ff8245524aabdb52f5d388ef4bde0fc075eab24499b4023f6ca143b80a74e265117b9e7a9de68a347b0c7eaa8655c836d7bbb63d54cad5c6dda630371
 DIST glib-2.62.6.tar.xz 4703424 BLAKE2B 0a27245be2575c574dcc730dd051a8c284f421dbc46579aadc5fbbacb8f934af4374b61bb26085e5c9ab78a868c567818f3fb9d67adddce37f5c4fec00e0d276 SHA512 8e3972a371f3c1a50b7d245b30e4f740583ad72ba4ab325e0e15e0732be44dfb69b603fb39dcf4989255a23a181e9ea5dd25982dd94c386cd9f21952243ad6f5
+DIST glib-2.64.1.tar.xz 4758548 BLAKE2B 5585d23fee28d7c32b1bb9e1defbc31ba469aa259e3c328760d1e702d98706cf251bfb50b5e2aed37b2cdfa6ab4319372ddcd0a9937c97a2614741b504af17a5 SHA512 1cefe49a42233f24ac6bd09c134ceea7119f4f74f42204a731be56100a180eec69c8224674f0b08d1538ad0859896ed08260a6af0fed469c7d10b4508116a6bc

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 00000000000..d1a41ecb793
--- /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.64.1.ebuild b/dev-libs/glib/glib-2.64.1.ebuild
new file mode 100644
index 00000000000..33ba76e4199
--- /dev/null
+++ b/dev-libs/glib/glib-2.64.1.ebuild
@@ -0,0 +1,278 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_6,3_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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~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).
+# * 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[${MULTILIB_USEDEP}]
+"
+# 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}"/${P}-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
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2020-02-22 18:30 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2020-02-22 18:30 UTC (permalink / raw
  To: gentoo-commits

commit:     cc0b8aab3c139570fb2459c9c08905ba2963068b
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 22 18:28:15 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Feb 22 18:30:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc0b8aab

dev-libs/glib: fix CVE-2020-6750 (proxy settings sometimes ignored)

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/files/CVE-2020-6750.patch | 763 ++++++++++++++++++++++++++++++++
 dev-libs/glib/glib-2.60.7-r2.ebuild     | 280 ++++++++++++
 2 files changed, 1043 insertions(+)

diff --git a/dev-libs/glib/files/CVE-2020-6750.patch b/dev-libs/glib/files/CVE-2020-6750.patch
new file mode 100644
index 00000000000..fe39914f920
--- /dev/null
+++ b/dev-libs/glib/files/CVE-2020-6750.patch
@@ -0,0 +1,763 @@
+From cc3cf6b8b2ad12d54f3474113f0ccfa7dcf66b7b Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@gnome.org>
+Date: Sat, 4 Jan 2020 20:46:25 -0600
+Subject: [PATCH] gsocketclient: run timeout source on the task's main context
+
+This shouldn't make any difference, because this code should only ever
+be running in the main context that was thread-default at the time the
+task was created, so it should already match the task's context. But
+let's make sure, just in case.
+---
+ gio/gsocketclient.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c
+index 6adeee299..81721795b 100644
+--- a/gio/gsocketclient.c
++++ b/gio/gsocketclient.c
+@@ -1794,7 +1794,7 @@ g_socket_client_enumerator_callback (GObject      *object,
+   attempt->connection = (GIOStream *)g_socket_connection_factory_create_connection (socket);
+   attempt->timeout_source = g_timeout_source_new (HAPPY_EYEBALLS_CONNECTION_ATTEMPT_TIMEOUT_MS);
+   g_source_set_callback (attempt->timeout_source, on_connection_attempt_timeout, attempt, NULL);
+-  g_source_attach (attempt->timeout_source, g_main_context_get_thread_default ());
++  g_source_attach (attempt->timeout_source, g_task_get_context (data->task));
+   data->connection_attempts = g_slist_append (data->connection_attempts, attempt);
+ 
+   if (g_task_get_cancellable (data->task))
+-- 
+2.24.1
+
+From d4fcf91460696b09bb2b55c352a023f6dd71c7fe Mon Sep 17 00:00:00 2001
+From: Patrick Griffis <tingping@tingping.se>
+Date: Thu, 23 Jan 2020 19:58:41 -0800
+Subject: [PATCH] Refactor g_socket_client_connect_async()
+
+This is a fairly large refactoring. The highlights are:
+
+- Removing in-progress connections/addresses from GSocketClientAsyncConnectData:
+
+  This caused issues where multiple ConnectionAttempt's would step over eachother
+  and modify shared state causing bugs like accidentally bypassing a set proxy.
+
+  Fixes #1871
+  Fixes #1989
+  Fixes #1902
+
+- Cancelling address enumeration on error/completion
+
+- Queuing successful TCP connections and doing application layer work serially:
+
+  This is more in the spirit of Happy Eyeballs but it also greatly simplifies
+  the flow of connection handling so fewer tasks are happening in parallel
+  when they don't need to be.
+
+  The behavior also should more closely match that of g_socket_client_connect().
+
+- Better track the state of address enumeration:
+
+  Previously we were over eager to treat enumeration finishing as an error.
+
+  Fixes #1872
+  See also #1982
+
+- Add more detailed documentation and logging.
+
+Closes #1995
+---
+ gio/gsocketclient.c | 459 ++++++++++++++++++++++++++++----------------
+ 1 file changed, 296 insertions(+), 163 deletions(-)
+
+diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c
+index 81721795b..c9943309c 100644
+--- a/gio/gsocketclient.c
++++ b/gio/gsocketclient.c
+@@ -1337,13 +1337,15 @@ typedef struct
+ 
+   GSocketConnectable *connectable;
+   GSocketAddressEnumerator *enumerator;
+-  GProxyAddress *proxy_addr;
+-  GSocket *socket;
+-  GIOStream *connection;
++  GCancellable *enumeration_cancellable;
+ 
+   GSList *connection_attempts;
++  GSList *successful_connections;
+   GError *last_error;
+ 
++  gboolean enumerated_at_least_once;
++  gboolean enumeration_completed;
++  gboolean connection_in_progress;
+   gboolean completed;
+ } GSocketClientAsyncConnectData;
+ 
+@@ -1355,10 +1357,9 @@ g_socket_client_async_connect_data_free (GSocketClientAsyncConnectData *data)
+   data->task = NULL;
+   g_clear_object (&data->connectable);
+   g_clear_object (&data->enumerator);
+-  g_clear_object (&data->proxy_addr);
+-  g_clear_object (&data->socket);
+-  g_clear_object (&data->connection);
++  g_clear_object (&data->enumeration_cancellable);
+   g_slist_free_full (data->connection_attempts, connection_attempt_unref);
++  g_slist_free_full (data->successful_connections, connection_attempt_unref);
+ 
+   g_clear_error (&data->last_error);
+ 
+@@ -1370,6 +1371,7 @@ typedef struct
+   GSocketAddress *address;
+   GSocket *socket;
+   GIOStream *connection;
++  GProxyAddress *proxy_addr;
+   GSocketClientAsyncConnectData *data; /* unowned */
+   GSource *timeout_source;
+   GCancellable *cancellable;
+@@ -1401,6 +1403,7 @@ connection_attempt_unref (gpointer pointer)
+       g_clear_object (&attempt->socket);
+       g_clear_object (&attempt->connection);
+       g_clear_object (&attempt->cancellable);
++      g_clear_object (&attempt->proxy_addr);
+       if (attempt->timeout_source)
+         {
+           g_source_destroy (attempt->timeout_source);
+@@ -1418,37 +1421,59 @@ connection_attempt_remove (ConnectionAttempt *attempt)
+ }
+ 
+ static void
+-g_socket_client_async_connect_complete (GSocketClientAsyncConnectData *data)
++cancel_all_attempts (GSocketClientAsyncConnectData *data)
+ {
+-  g_assert (data->connection);
++  GSList *l;
+ 
+-  if (!G_IS_SOCKET_CONNECTION (data->connection))
++  for (l = data->connection_attempts; l; l = g_slist_next (l))
+     {
+-      GSocketConnection *wrapper_connection;
+-
+-      wrapper_connection = g_tcp_wrapper_connection_new (data->connection, data->socket);
+-      g_object_unref (data->connection);
+-      data->connection = (GIOStream *)wrapper_connection;
++      ConnectionAttempt *attempt_entry = l->data;
++      g_cancellable_cancel (attempt_entry->cancellable);
++      connection_attempt_unref (attempt_entry);
+     }
++  g_slist_free (data->connection_attempts);
++  data->connection_attempts = NULL;
+ 
+-  if (!data->completed)
++  g_slist_free_full (data->successful_connections, connection_attempt_unref);
++  data->successful_connections = NULL;
++
++  g_cancellable_cancel (data->enumeration_cancellable);
++}
++
++static void
++g_socket_client_async_connect_complete (ConnectionAttempt *attempt)
++{
++  GSocketClientAsyncConnectData *data = attempt->data;
++  GError *error = NULL;
++  g_assert (attempt->connection);
++  g_assert (!data->completed);
++
++  if (!G_IS_SOCKET_CONNECTION (attempt->connection))
+     {
+-      GError *error = NULL;
++      GSocketConnection *wrapper_connection;
+ 
+-      if (g_cancellable_set_error_if_cancelled (g_task_get_cancellable (data->task), &error))
+-        {
+-          g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
+-          g_task_return_error (data->task, g_steal_pointer (&error));
+-        }
+-      else
+-        {
+-          g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, data->connection);
+-          g_task_return_pointer (data->task, g_steal_pointer (&data->connection), g_object_unref);
+-        }
++      wrapper_connection = g_tcp_wrapper_connection_new (attempt->connection, attempt->socket);
++      g_object_unref (attempt->connection);
++      attempt->connection = (GIOStream *)wrapper_connection;
++    }
+ 
+-      data->completed = TRUE;
++  data->completed = TRUE;
++  cancel_all_attempts (data);
++
++  if (g_cancellable_set_error_if_cancelled (g_task_get_cancellable (data->task), &error))
++    {
++      g_debug ("GSocketClient: Connection cancelled!");
++      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
++      g_task_return_error (data->task, g_steal_pointer (&error));
++    }
++  else
++    {
++      g_debug ("GSocketClient: Connection successful!");
++      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, attempt->connection);
++      g_task_return_pointer (data->task, g_steal_pointer (&attempt->connection), g_object_unref);
+     }
+ 
++  connection_attempt_unref (attempt);
+   g_object_unref (data->task);
+ }
+ 
+@@ -1470,59 +1495,63 @@ static void
+ enumerator_next_async (GSocketClientAsyncConnectData *data,
+                        gboolean                       add_task_ref)
+ {
+-  /* We need to cleanup the state */
+-  g_clear_object (&data->socket);
+-  g_clear_object (&data->proxy_addr);
+-  g_clear_object (&data->connection);
+-
+   /* Each enumeration takes a ref. This arg just avoids repeated unrefs when
+      an enumeration starts another enumeration */
+   if (add_task_ref)
+     g_object_ref (data->task);
+ 
+   g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_RESOLVING, data->connectable, NULL);
++  g_debug ("GSocketClient: Starting new address enumeration");
+   g_socket_address_enumerator_next_async (data->enumerator,
+-					  g_task_get_cancellable (data->task),
++					  data->enumeration_cancellable,
+ 					  g_socket_client_enumerator_callback,
+ 					  data);
+ }
+ 
++static void try_next_connection_or_finish (GSocketClientAsyncConnectData *, gboolean);
++
+ static void
+ g_socket_client_tls_handshake_callback (GObject      *object,
+ 					GAsyncResult *result,
+ 					gpointer      user_data)
+ {
+-  GSocketClientAsyncConnectData *data = user_data;
++  ConnectionAttempt *attempt = user_data;
++  GSocketClientAsyncConnectData *data = attempt->data;
+ 
+   if (g_tls_connection_handshake_finish (G_TLS_CONNECTION (object),
+ 					 result,
+ 					 &data->last_error))
+     {
+-      g_object_unref (data->connection);
+-      data->connection = G_IO_STREAM (object);
++      g_object_unref (attempt->connection);
++      attempt->connection = G_IO_STREAM (object);
+ 
+-      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_TLS_HANDSHAKED, data->connectable, data->connection);
+-      g_socket_client_async_connect_complete (data);
++      g_debug ("GSocketClient: TLS handshake succeeded");
++      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_TLS_HANDSHAKED, data->connectable, attempt->connection);
++      g_socket_client_async_connect_complete (attempt);
+     }
+   else
+     {
+       g_object_unref (object);
+-      enumerator_next_async (data, FALSE);
++      connection_attempt_unref (attempt);
++      g_debug ("GSocketClient: TLS handshake failed: %s", data->last_error->message);
++      try_next_connection_or_finish (data, TRUE);
+     }
+ }
+ 
+ static void
+-g_socket_client_tls_handshake (GSocketClientAsyncConnectData *data)
++g_socket_client_tls_handshake (ConnectionAttempt *attempt)
+ {
++  GSocketClientAsyncConnectData *data = attempt->data;
+   GIOStream *tlsconn;
+ 
+   if (!data->client->priv->tls)
+     {
+-      g_socket_client_async_connect_complete (data);
++      g_socket_client_async_connect_complete (attempt);
+       return;
+     }
+ 
+-  tlsconn = g_tls_client_connection_new (data->connection,
++  g_debug ("GSocketClient: Starting TLS handshake");
++  tlsconn = g_tls_client_connection_new (attempt->connection,
+ 					 data->connectable,
+ 					 &data->last_error);
+   if (tlsconn)
+@@ -1534,11 +1563,12 @@ g_socket_client_tls_handshake (GSocketClientAsyncConnectData *data)
+ 					G_PRIORITY_DEFAULT,
+ 					g_task_get_cancellable (data->task),
+ 					g_socket_client_tls_handshake_callback,
+-					data);
++					attempt);
+     }
+   else
+     {
+-      enumerator_next_async (data, FALSE);
++      connection_attempt_unref (attempt);
++      try_next_connection_or_finish (data, TRUE);
+     }
+ }
+ 
+@@ -1547,23 +1577,38 @@ g_socket_client_proxy_connect_callback (GObject      *object,
+ 					GAsyncResult *result,
+ 					gpointer      user_data)
+ {
+-  GSocketClientAsyncConnectData *data = user_data;
++  ConnectionAttempt *attempt = user_data;
++  GSocketClientAsyncConnectData *data = attempt->data;
+ 
+-  g_object_unref (data->connection);
+-  data->connection = g_proxy_connect_finish (G_PROXY (object),
+-					     result,
+-					     &data->last_error);
+-  if (data->connection)
++  g_object_unref (attempt->connection);
++  attempt->connection = g_proxy_connect_finish (G_PROXY (object),
++                                                result,
++                                                &data->last_error);
++  if (attempt->connection)
+     {
+-      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATED, data->connectable, data->connection);
++      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATED, data->connectable, attempt->connection);
+     }
+   else
+     {
+-      enumerator_next_async (data, FALSE);
++      connection_attempt_unref (attempt);
++      try_next_connection_or_finish (data, TRUE);
+       return;
+     }
+ 
+-  g_socket_client_tls_handshake (data);
++  g_socket_client_tls_handshake (attempt);
++}
++
++static void
++complete_connection_with_error (GSocketClientAsyncConnectData *data,
++                                GError                        *error)
++{
++  g_debug ("GSocketClient: Connection failed: %s", error->message);
++  g_assert (!data->completed);
++
++  g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
++  data->completed = TRUE;
++  cancel_all_attempts (data);
++  g_task_return_error (data->task, error);
+ }
+ 
+ static gboolean
+@@ -1577,15 +1622,114 @@ task_completed_or_cancelled (GSocketClientAsyncConnectData *data)
+     return TRUE;
+   else if (g_cancellable_set_error_if_cancelled (cancellable, &error))
+     {
+-      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
+-      g_task_return_error (task, g_steal_pointer (&error));
+-      data->completed = TRUE;
++      complete_connection_with_error (data, g_steal_pointer (&error));
+       return TRUE;
+     }
+   else
+     return FALSE;
+ }
+ 
++static gboolean
++try_next_successful_connection (GSocketClientAsyncConnectData *data)
++{
++  ConnectionAttempt *attempt;
++  const gchar *protocol;
++  GProxy *proxy;
++
++  if (data->connection_in_progress)
++    return FALSE;
++
++  g_assert (data->successful_connections != NULL);
++  attempt = data->successful_connections->data;
++  g_assert (attempt != NULL);
++  data->successful_connections = g_slist_remove (data->successful_connections, attempt);
++  data->connection_in_progress = TRUE;
++
++  g_debug ("GSocketClient: Starting application layer connection");
++
++  if (!attempt->proxy_addr)
++    {
++      g_socket_client_tls_handshake (g_steal_pointer (&attempt));
++      return TRUE;
++    }
++
++  protocol = g_proxy_address_get_protocol (attempt->proxy_addr);
++
++  /* The connection should not be anything other than TCP,
++   * but let's put a safety guard in case
++   */
++  if (!G_IS_TCP_CONNECTION (attempt->connection))
++    {
++      g_critical ("Trying to proxy over non-TCP connection, this is "
++          "most likely a bug in GLib IO library.");
++
++      g_set_error_literal (&data->last_error,
++          G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
++          _("Proxying over a non-TCP connection is not supported."));
++    }
++  else if (g_hash_table_contains (data->client->priv->app_proxies, protocol))
++    {
++      /* Simply complete the connection, we don't want to do TLS handshake
++       * as the application proxy handling may need proxy handshake first */
++      g_socket_client_async_connect_complete (g_steal_pointer (&attempt));
++      return TRUE;
++    }
++  else if ((proxy = g_proxy_get_default_for_protocol (protocol)))
++    {
++      GIOStream *connection = attempt->connection;
++      GProxyAddress *proxy_addr = attempt->proxy_addr;
++
++      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATING, data->connectable, attempt->connection);
++      g_debug ("GSocketClient: Starting proxy connection");
++      g_proxy_connect_async (proxy,
++                             connection,
++                             proxy_addr,
++                             g_task_get_cancellable (data->task),
++                             g_socket_client_proxy_connect_callback,
++                             g_steal_pointer (&attempt));
++      g_object_unref (proxy);
++      return TRUE;
++    }
++  else
++    {
++      g_clear_error (&data->last_error);
++
++      g_set_error (&data->last_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
++          _("Proxy protocol “%s” is not supported."),
++          protocol);
++    }
++
++  data->connection_in_progress = FALSE;
++  g_clear_pointer (&attempt, connection_attempt_unref);
++  return FALSE; /* All non-return paths are failures */
++}
++
++static void
++try_next_connection_or_finish (GSocketClientAsyncConnectData *data,
++                               gboolean                       end_current_connection)
++{
++  if (end_current_connection)
++    data->connection_in_progress = FALSE;
++
++  if (data->connection_in_progress)
++    return;
++
++  /* Keep trying successful connections until one works, each iteration pops one */
++  while (data->successful_connections)
++    {
++      if (try_next_successful_connection (data))
++        return;
++    }
++
++  if (!data->enumeration_completed)
++    {
++      enumerator_next_async (data, FALSE);
++      return;
++    }
++
++  complete_connection_with_error (data, data->last_error);
++}
++
+ static void
+ g_socket_client_connected_callback (GObject      *source,
+ 				    GAsyncResult *result,
+@@ -1593,10 +1737,7 @@ g_socket_client_connected_callback (GObject      *source,
+ {
+   ConnectionAttempt *attempt = user_data;
+   GSocketClientAsyncConnectData *data = attempt->data;
+-  GSList *l;
+   GError *error = NULL;
+-  GProxy *proxy;
+-  const gchar *protocol;
+ 
+   if (task_completed_or_cancelled (data) || g_cancellable_is_cancelled (attempt->cancellable))
+     {
+@@ -1618,11 +1759,12 @@ g_socket_client_connected_callback (GObject      *source,
+         {
+           clarify_connect_error (error, data->connectable, attempt->address);
+           set_last_error (data, error);
++          g_debug ("GSocketClient: Connection attempt failed: %s", error->message);
+           connection_attempt_remove (attempt);
+-          enumerator_next_async (data, FALSE);
+           connection_attempt_unref (attempt);
++          try_next_connection_or_finish (data, FALSE);
+         }
+-      else
++      else /* Silently ignore cancelled attempts */
+         {
+           g_clear_error (&error);
+           g_object_unref (data->task);
+@@ -1632,74 +1774,21 @@ g_socket_client_connected_callback (GObject      *source,
+       return;
+     }
+ 
+-  data->socket = g_steal_pointer (&attempt->socket);
+-  data->connection = g_steal_pointer (&attempt->connection);
+-
+-  for (l = data->connection_attempts; l; l = g_slist_next (l))
+-    {
+-      ConnectionAttempt *attempt_entry = l->data;
+-      g_cancellable_cancel (attempt_entry->cancellable);
+-      connection_attempt_unref (attempt_entry);
+-    }
+-  g_slist_free (data->connection_attempts);
+-  data->connection_attempts = NULL;
+-  connection_attempt_unref (attempt);
+-
+-  g_socket_connection_set_cached_remote_address ((GSocketConnection*)data->connection, NULL);
+-  g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_CONNECTED, data->connectable, data->connection);
++  g_socket_connection_set_cached_remote_address ((GSocketConnection*)attempt->connection, NULL);
++  g_debug ("GSocketClient: TCP connection successful");
++  g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_CONNECTED, data->connectable, attempt->connection);
+ 
+   /* wrong, but backward compatible */
+-  g_socket_set_blocking (data->socket, TRUE);
++  g_socket_set_blocking (attempt->socket, TRUE);
+ 
+-  if (!data->proxy_addr)
+-    {
+-      g_socket_client_tls_handshake (data);
+-      return;
+-    }
+-
+-  protocol = g_proxy_address_get_protocol (data->proxy_addr);
+-
+-  /* The connection should not be anything other than TCP,
+-   * but let's put a safety guard in case
++  /* This ends the parallel "happy eyeballs" portion of connecting.
++     Now that we have a successful tcp connection we will attempt to connect
++     at the TLS/Proxy layer. If those layers fail we will move on to the next
++     connection.
+    */
+-  if (!G_IS_TCP_CONNECTION (data->connection))
+-    {
+-      g_critical ("Trying to proxy over non-TCP connection, this is "
+-          "most likely a bug in GLib IO library.");
+-
+-      g_set_error_literal (&data->last_error,
+-          G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+-          _("Proxying over a non-TCP connection is not supported."));
+-
+-      enumerator_next_async (data, FALSE);
+-    }
+-  else if (g_hash_table_contains (data->client->priv->app_proxies, protocol))
+-    {
+-      /* Simply complete the connection, we don't want to do TLS handshake
+-       * as the application proxy handling may need proxy handshake first */
+-      g_socket_client_async_connect_complete (data);
+-    }
+-  else if ((proxy = g_proxy_get_default_for_protocol (protocol)))
+-    {
+-      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATING, data->connectable, data->connection);
+-      g_proxy_connect_async (proxy,
+-                             data->connection,
+-                             data->proxy_addr,
+-                             g_task_get_cancellable (data->task),
+-                             g_socket_client_proxy_connect_callback,
+-                             data);
+-      g_object_unref (proxy);
+-    }
+-  else
+-    {
+-      g_clear_error (&data->last_error);
+-
+-      g_set_error (&data->last_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+-          _("Proxy protocol “%s” is not supported."),
+-          protocol);
+-
+-      enumerator_next_async (data, FALSE);
+-    }
++  connection_attempt_remove (attempt);
++  data->successful_connections = g_slist_append (data->successful_connections, g_steal_pointer (&attempt));
++  try_next_connection_or_finish (data, FALSE);
+ }
+ 
+ static gboolean
+@@ -1707,7 +1796,11 @@ on_connection_attempt_timeout (gpointer data)
+ {
+   ConnectionAttempt *attempt = data;
+ 
+-  enumerator_next_async (attempt->data, TRUE);
++  if (!attempt->data->enumeration_completed)
++    {
++      g_debug ("GSocketClient: Timeout reached, trying another enumeration");
++      enumerator_next_async (attempt->data, TRUE);
++    }
+ 
+   g_clear_pointer (&attempt->timeout_source, g_source_unref);
+   return G_SOURCE_REMOVE;
+@@ -1717,9 +1810,9 @@ static void
+ on_connection_cancelled (GCancellable *cancellable,
+                          gpointer      data)
+ {
+-  GCancellable *attempt_cancellable = data;
++  GCancellable *linked_cancellable = G_CANCELLABLE (data);
+ 
+-  g_cancellable_cancel (attempt_cancellable);
++  g_cancellable_cancel (linked_cancellable);
+ }
+ 
+ static void
+@@ -1743,39 +1836,49 @@ g_socket_client_enumerator_callback (GObject      *object,
+ 						     result, &error);
+   if (address == NULL)
+     {
+-      if (data->connection_attempts)
++      if (G_UNLIKELY (data->enumeration_completed))
++        return;
++
++      data->enumeration_completed = TRUE;
++      g_debug ("GSocketClient: Address enumeration completed (out of addresses)");
++
++      /* As per API docs: We only care about error if its the first call,
++         after that the enumerator is done.
++
++         Note that we don't care about cancellation errors because
++         task_completed_or_cancelled() above should handle that.
++
++         If this fails and nothing is in progress then we will complete task here.
++       */
++      if ((data->enumerated_at_least_once && !data->connection_attempts && !data->connection_in_progress) ||
++          !data->enumerated_at_least_once)
+         {
+-          g_object_unref (data->task);
+-          return;
++          g_debug ("GSocketClient: Address enumeration failed: %s", error ? error->message : NULL);
++          if (data->last_error)
++            {
++              g_clear_error (&error);
++              error = data->last_error;
++              data->last_error = NULL;
++            }
++          else if (!error)
++            {
++              g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
++                _("Unknown error on connect"));
++            }
++
++          complete_connection_with_error (data, error);
+         }
+ 
+-      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
+-      data->completed = TRUE;
+-      if (!error)
+-	{
+-	  if (data->last_error)
+-	    {
+-	      error = data->last_error;
+-	      data->last_error = NULL;
+-	    }
+-	  else
+-	    {
+-	      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
+-				   _("Unknown error on connect"));
+-	    }
+-	}
+-      g_task_return_error (data->task, error);
++      /* Enumeration should never trigger again, drop our ref */
+       g_object_unref (data->task);
+       return;
+     }
+ 
++  data->enumerated_at_least_once = TRUE;
++  g_debug ("GSocketClient: Address enumeration succeeded");
+   g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_RESOLVED,
+ 			      data->connectable, NULL);
+ 
+-  if (G_IS_PROXY_ADDRESS (address) &&
+-      data->client->priv->enable_proxy)
+-    data->proxy_addr = g_object_ref (G_PROXY_ADDRESS (address));
+-
+   g_clear_error (&data->last_error);
+ 
+   socket = create_socket (data->client, address, &data->last_error);
+@@ -1793,6 +1896,10 @@ g_socket_client_enumerator_callback (GObject      *object,
+   attempt->cancellable = g_cancellable_new ();
+   attempt->connection = (GIOStream *)g_socket_connection_factory_create_connection (socket);
+   attempt->timeout_source = g_timeout_source_new (HAPPY_EYEBALLS_CONNECTION_ATTEMPT_TIMEOUT_MS);
++
++  if (G_IS_PROXY_ADDRESS (address) && data->client->priv->enable_proxy)
++    attempt->proxy_addr = g_object_ref (G_PROXY_ADDRESS (address));
++
+   g_source_set_callback (attempt->timeout_source, on_connection_attempt_timeout, attempt, NULL);
+   g_source_attach (attempt->timeout_source, g_task_get_context (data->task));
+   data->connection_attempts = g_slist_append (data->connection_attempts, attempt);
+@@ -1802,6 +1909,7 @@ g_socket_client_enumerator_callback (GObject      *object,
+                            g_object_ref (attempt->cancellable), g_object_unref);
+ 
+   g_socket_connection_set_cached_remote_address ((GSocketConnection *)attempt->connection, address);
++  g_debug ("GSocketClient: Starting TCP connection attempt");
+   g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_CONNECTING, data->connectable, attempt->connection);
+   g_socket_connection_connect_async (G_SOCKET_CONNECTION (attempt->connection),
+ 				     address,
+@@ -1854,24 +1962,48 @@ g_socket_client_connect_async (GSocketClient       *client,
+   else
+     data->enumerator = g_socket_connectable_enumerate (connectable);
+ 
+-  /* The flow and ownership here isn't quite obvious:
+-    - The task starts an async attempt to connect.
+-      - Each attempt holds a single ref on task.
+-      - Each attempt may create new attempts by timing out (not a failure) so
+-        there are multiple attempts happening in parallel.
+-      - Upon failure an attempt will start a new attempt that steals its ref
+-        until there are no more attempts left and it drops its ref.
+-      - Upon success it will cancel all other attempts and continue on
+-        to the rest of the connection (tls, proxies, etc) which do not
+-        happen in parallel and at the very end drop its ref.
+-      - Upon cancellation an attempt drops its ref.
+-   */
++  /* This function tries to match the behavior of g_socket_client_connect ()
++     which is simple enough but much of it is done in parallel to be as responsive
++     as possible as per Happy Eyeballs (RFC 8305). This complicates flow quite a
++     bit but we can describe it in 3 sections:
++
++     Firstly we have address enumeration (DNS):
++       - This may be triggered multiple times by enumerator_next_async().
++       - It also has its own cancellable (data->enumeration_cancellable).
++       - Enumeration is done lazily because GNetworkAddressAddressEnumerator
++         also does work in parallel and may lazily add new addresses.
++       - If the first enumeration errors then the task errors. Otherwise all enumerations
++         will potentially be used (until task or enumeration is cancelled).
++
++      Then we start attempting connections (TCP):
++        - Each connection is independent and kept in a ConnectionAttempt object.
++          - They each hold a ref on the main task and have their own cancellable.
++        - Multiple attempts may happen in parallel as per Happy Eyeballs.
++        - Upon failure or timeouts more connection attempts are made.
++          - If no connections succeed the task errors.
++        - Upon success they are kept in a list of successful connections.
++
++      Lastly we connect at the application layer (TLS, Proxies):
++        - These are done in serial.
++          - The reasoning here is that Happy Eyeballs is about making bad connections responsive
++            at the IP/TCP layers. Issues at the application layer are generally not due to
++            connectivity issues but rather misconfiguration.
++        - Upon failure it will try the next TCP connection until it runs out and
++          the task errors.
++        - Upon success it cancels everything remaining (enumeration and connections)
++          and returns the connection.
++  */
+ 
+   data->task = g_task_new (client, cancellable, callback, user_data);
+   g_task_set_check_cancellable (data->task, FALSE); /* We handle this manually */
+   g_task_set_source_tag (data->task, g_socket_client_connect_async);
+   g_task_set_task_data (data->task, data, (GDestroyNotify)g_socket_client_async_connect_data_free);
+ 
++  data->enumeration_cancellable = g_cancellable_new ();
++  if (cancellable)
++    g_cancellable_connect (cancellable, G_CALLBACK (on_connection_cancelled),
++                           g_object_ref (data->enumeration_cancellable), g_object_unref);
++
+   enumerator_next_async (data, FALSE);
+ }
+ 
+@@ -1990,6 +2122,7 @@ g_socket_client_connect_to_uri_async (GSocketClient        *client,
+     }
+   else
+     {
++      g_debug("g_socket_client_connect_to_uri_async");
+       g_socket_client_connect_async (client,
+ 				     connectable, cancellable,
+ 				     callback, user_data);
+-- 
+2.24.1
+

diff --git a/dev-libs/glib/glib-2.60.7-r2.ebuild b/dev-libs/glib/glib-2.60.7-r2.ebuild
new file mode 100644
index 00000000000..92bf0e10c67
--- /dev/null
+++ b/dev-libs/glib/glib-2.60.7-r2.ebuild
@@ -0,0 +1,280 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_6,3_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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~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).
+# * 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?]
+	>=virtual/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[${MULTILIB_USEDEP}]
+"
+# 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() {
+	eapply "${FILESDIR}"/${PV}-gdbus-fixes.patch #700538, included in 2.62.3+
+	eapply "${FILESDIR}"/CVE-2020-6750.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 's/install.*true/install : false/g' gio/gdbus-2.0/codegen/meson.build || die
+	# Older than meson-0.50 doesn't know about install kwarg for configure_file; for that we need to remove the install_dir kwarg.
+	# Upstream will remove the install kwarg in a future version to require only meson-0.49.2 or newer, at which point the
+	# install_dir removal only should be kept.
+	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
+	)
+	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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2020-01-01 15:41 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2020-01-01 15:41 UTC (permalink / raw
  To: gentoo-commits

commit:     1ed2ea2d465969fba6a72c270d712287d2e3e116
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  1 15:40:23 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Wed Jan  1 15:40:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ed2ea2d

dev-libs/glib: backport GDBus fixes necessary for ibus security fixes

Closes: https://bugs.gentoo.org/700538
Package-Manager: Portage-2.3.79, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/files/2.60.7-gdbus-fixes.patch | 301 +++++++++++++++++++++++++++
 dev-libs/glib/glib-2.60.7-r1.ebuild          | 279 +++++++++++++++++++++++++
 2 files changed, 580 insertions(+)

diff --git a/dev-libs/glib/files/2.60.7-gdbus-fixes.patch b/dev-libs/glib/files/2.60.7-gdbus-fixes.patch
new file mode 100644
index 00000000000..e2a066beec7
--- /dev/null
+++ b/dev-libs/glib/files/2.60.7-gdbus-fixes.patch
@@ -0,0 +1,301 @@
+From 1cfab12a28d97716ad581c30fbbf3e94e4d7f303 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@collabora.com>
+Date: Mon, 14 Oct 2019 08:22:24 +0100
+Subject: [PATCH 1/3] gcredentialsprivate: Document the various private macros
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ gio/gcredentialsprivate.h | 59 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 59 insertions(+)
+
+diff --git a/gio/gcredentialsprivate.h b/gio/gcredentialsprivate.h
+index 4d1c420a8..06f0aed19 100644
+--- a/gio/gcredentialsprivate.h
++++ b/gio/gcredentialsprivate.h
+@@ -22,6 +22,65 @@
+ #include "gio/gcredentials.h"
+ #include "gio/gnetworking.h"
+ 
++/*
++ * G_CREDENTIALS_SUPPORTED:
++ *
++ * Defined to 1 if GCredentials works.
++ */
++#undef G_CREDENTIALS_SUPPORTED
++
++/*
++ * G_CREDENTIALS_USE_LINUX_UCRED, etc.:
++ *
++ * Defined to 1 if GCredentials uses Linux `struct ucred`, etc.
++ */
++#undef G_CREDENTIALS_USE_LINUX_UCRED
++#undef G_CREDENTIALS_USE_FREEBSD_CMSGCRED
++#undef G_CREDENTIALS_USE_NETBSD_UNPCBID
++#undef G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED
++#undef G_CREDENTIALS_USE_SOLARIS_UCRED
++
++/*
++ * G_CREDENTIALS_NATIVE_TYPE:
++ *
++ * Defined to one of G_CREDENTIALS_TYPE_LINUX_UCRED, etc.
++ */
++#undef G_CREDENTIALS_NATIVE_TYPE
++
++/*
++ * G_CREDENTIALS_NATIVE_SIZE:
++ *
++ * Defined to the size of the %G_CREDENTIALS_NATIVE_TYPE
++ */
++#undef G_CREDENTIALS_NATIVE_SIZE
++
++/*
++ * G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED:
++ *
++ * Defined to 1 if we have a message-passing API in which credentials
++ * are attached to a particular message, such as `SCM_CREDENTIALS` on Linux
++ * or `SCM_CREDS` on FreeBSD.
++ */
++#undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED
++
++/*
++ * G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED:
++ *
++ * Defined to 1 if we have a `getsockopt()`-style API in which one end of
++ * a socket connection can directly query the credentials of the process
++ * that initiated the other end, such as `getsockopt SO_PEERCRED` on Linux
++ * or `getpeereid()` on multiple operating systems.
++ */
++#undef G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED
++
++/*
++ * G_CREDENTIALS_SPOOFING_SUPPORTED:
++ *
++ * Defined to 1 if privileged processes can spoof their credentials when
++ * using the message-passing API.
++ */
++#undef G_CREDENTIALS_SPOOFING_SUPPORTED
++
+ #ifdef __linux__
+ #define G_CREDENTIALS_SUPPORTED 1
+ #define G_CREDENTIALS_USE_LINUX_UCRED 1
+-- 
+2.20.1
+
+
+From 5f9318af8f19756685c1b79cf8b76f3e66614d84 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@collabora.com>
+Date: Fri, 18 Oct 2019 10:55:09 +0100
+Subject: [PATCH 2/3] credentials: Invalid Linux struct ucred means "no
+ information"
+
+On Linux, if getsockopt SO_PEERCRED is used on a TCP socket, one
+might expect it to fail with an appropriate error like ENOTSUP or
+EPROTONOSUPPORT. However, it appears that in fact it succeeds, but
+yields a credentials structure with pid 0, uid -1 and gid -1. These
+are not real process, user and group IDs that can be allocated to a
+real process (pid 0 needs to be reserved to give kill(0) its documented
+special semantics, and similarly uid and gid -1 need to be reserved for
+setresuid() and setresgid()) so it is not meaningful to signal them to
+high-level API users.
+
+An API user with Linux-specific knowledge can still inspect these fields
+via g_credentials_get_native() if desired.
+
+Similarly, if SO_PASSCRED is used to receive a SCM_CREDENTIALS message
+on a receiving Unix socket, but the sending socket had not enabled
+SO_PASSCRED at the time that the message was sent, it is possible
+for it to succeed but yield a credentials structure with pid 0, uid
+/proc/sys/kernel/overflowuid and gid /proc/sys/kernel/overflowgid. Even
+if we were to read those pseudo-files, we cannot distinguish between
+the overflow IDs and a real process that legitimately has the same IDs
+(typically they are set to 'nobody' and 'nogroup', which can be used
+by a real process), so we detect this situation by noticing that
+pid == 0, and to save syscalls we do not read the overflow IDs from
+/proc at all.
+
+This results in a small API change: g_credentials_is_same_user() now
+returns FALSE if we compare two credentials structures that are both
+invalid. This seems like reasonable, conservative behaviour: if we cannot
+prove that they are the same user, we should assume they are not.
+
+(Dropped new translatable string when backporting to `glib-2-62`.)
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ gio/gcredentials.c | 42 +++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 39 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gcredentials.c b/gio/gcredentials.c
+index 57a39f2a2..ff9b7e0b8 100644
+--- a/gio/gcredentials.c
++++ b/gio/gcredentials.c
+@@ -265,6 +265,35 @@ g_credentials_to_string (GCredentials *credentials)
+ 
+ /* ---------------------------------------------------------------------------------------------------- */
+ 
++#if G_CREDENTIALS_USE_LINUX_UCRED
++/*
++ * Check whether @native contains invalid data. If getsockopt SO_PEERCRED
++ * is used on a TCP socket, it succeeds but yields a credentials structure
++ * with pid 0, uid -1 and gid -1. Similarly, if SO_PASSCRED is used on a
++ * receiving Unix socket when the sending socket did not also enable
++ * SO_PASSCRED, it can succeed but yield a credentials structure with
++ * pid 0, uid /proc/sys/kernel/overflowuid and gid
++ * /proc/sys/kernel/overflowgid.
++ */
++static gboolean
++linux_ucred_check_valid (struct ucred  *native,
++                         GError       **error)
++{
++  if (native->pid == 0
++      || native->uid == -1
++      || native->gid == -1)
++    {
++      g_set_error_literal (error,
++                           G_IO_ERROR,
++                           G_IO_ERROR_INVALID_DATA,
++                           "GCredentials contains invalid data");
++      return FALSE;
++    }
++
++  return TRUE;
++}
++#endif
++
+ /**
+  * g_credentials_is_same_user:
+  * @credentials: A #GCredentials.
+@@ -294,7 +323,8 @@ g_credentials_is_same_user (GCredentials  *credentials,
+ 
+   ret = FALSE;
+ #if G_CREDENTIALS_USE_LINUX_UCRED
+-  if (credentials->native.uid == other_credentials->native.uid)
++  if (linux_ucred_check_valid (&credentials->native, NULL)
++      && credentials->native.uid == other_credentials->native.uid)
+     ret = TRUE;
+ #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
+   if (credentials->native.cmcred_euid == other_credentials->native.cmcred_euid)
+@@ -453,7 +483,10 @@ g_credentials_get_unix_user (GCredentials    *credentials,
+   g_return_val_if_fail (error == NULL || *error == NULL, -1);
+ 
+ #if G_CREDENTIALS_USE_LINUX_UCRED
+-  ret = credentials->native.uid;
++  if (linux_ucred_check_valid (&credentials->native, error))
++    ret = credentials->native.uid;
++  else
++    ret = -1;
+ #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
+   ret = credentials->native.cmcred_euid;
+ #elif G_CREDENTIALS_USE_NETBSD_UNPCBID
+@@ -499,7 +532,10 @@ g_credentials_get_unix_pid (GCredentials    *credentials,
+   g_return_val_if_fail (error == NULL || *error == NULL, -1);
+ 
+ #if G_CREDENTIALS_USE_LINUX_UCRED
+-  ret = credentials->native.pid;
++  if (linux_ucred_check_valid (&credentials->native, error))
++    ret = credentials->native.pid;
++  else
++    ret = -1;
+ #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
+   ret = credentials->native.cmcred_pid;
+ #elif G_CREDENTIALS_USE_NETBSD_UNPCBID
+-- 
+2.20.1
+
+
+From c7618cce3752e1f3681f75d0a26c7e07c15bd6a2 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@collabora.com>
+Date: Mon, 14 Oct 2019 08:47:39 +0100
+Subject: [PATCH 3/3] GDBus: prefer getsockopt()-style credentials-passing APIs
+
+Closes: https://gitlab.gnome.org/GNOME/glib/issues/1831
+---
+ gio/gcredentialsprivate.h | 18 ++++++++++++++++++
+ gio/gdbusauth.c           | 27 +++++++++++++++++++++++++--
+ 2 files changed, 43 insertions(+), 2 deletions(-)
+
+diff --git a/gio/gcredentialsprivate.h b/gio/gcredentialsprivate.h
+index 06f0aed19..e9ec09b9f 100644
+--- a/gio/gcredentialsprivate.h
++++ b/gio/gcredentialsprivate.h
+@@ -81,6 +81,18 @@
+  */
+ #undef G_CREDENTIALS_SPOOFING_SUPPORTED
+ 
++/*
++ * G_CREDENTIALS_PREFER_MESSAGE_PASSING:
++ *
++ * Defined to 1 if the data structure transferred by the message-passing
++ * API is strictly more informative than the one transferred by the
++ * `getsockopt()`-style API, and hence should be preferred, even for
++ * protocols like D-Bus that are defined in terms of the credentials of
++ * the (process that opened the) socket, as opposed to the credentials
++ * of an individual message.
++ */
++#undef G_CREDENTIALS_PREFER_MESSAGE_PASSING
++
+ #ifdef __linux__
+ #define G_CREDENTIALS_SUPPORTED 1
+ #define G_CREDENTIALS_USE_LINUX_UCRED 1
+@@ -100,6 +112,12 @@
+ #define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct cmsgcred))
+ #define G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED 1
+ #define G_CREDENTIALS_SPOOFING_SUPPORTED 1
++/* GLib doesn't implement it yet, but FreeBSD's getsockopt()-style API
++ * is getpeereid(), which is not as informative as struct cmsgcred -
++ * it does not tell us the PID. As a result, libdbus prefers to use
++ * SCM_CREDS, and if we implement getpeereid() in future, we should
++ * do the same. */
++#define G_CREDENTIALS_PREFER_MESSAGE_PASSING 1
+ 
+ #elif defined(__NetBSD__)
+ #define G_CREDENTIALS_SUPPORTED 1
+diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
+index 752ec23fc..14cc5d70e 100644
+--- a/gio/gdbusauth.c
++++ b/gio/gdbusauth.c
+@@ -31,6 +31,7 @@
+ #include "gdbusutils.h"
+ #include "gioenumtypes.h"
+ #include "gcredentials.h"
++#include "gcredentialsprivate.h"
+ #include "gdbusprivate.h"
+ #include "giostream.h"
+ #include "gdatainputstream.h"
+@@ -969,9 +970,31 @@ _g_dbus_auth_run_server (GDBusAuth              *auth,
+ 
+   g_data_input_stream_set_newline_type (dis, G_DATA_STREAM_NEWLINE_TYPE_CR_LF);
+ 
+-  /* first read the NUL-byte */
++  /* read the NUL-byte, possibly with credentials attached */
+ #ifdef G_OS_UNIX
+-  if (G_IS_UNIX_CONNECTION (auth->priv->stream))
++#ifndef G_CREDENTIALS_PREFER_MESSAGE_PASSING
++  if (G_IS_SOCKET_CONNECTION (auth->priv->stream))
++    {
++      GSocket *sock = g_socket_connection_get_socket (G_SOCKET_CONNECTION (auth->priv->stream));
++
++      local_error = NULL;
++      credentials = g_socket_get_credentials (sock, &local_error);
++
++      if (credentials == NULL && !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
++        {
++          g_propagate_error (error, local_error);
++          goto out;
++        }
++      else
++        {
++          /* Clear the error indicator, so we can retry with
++           * g_unix_connection_receive_credentials() if necessary */
++          g_clear_error (&local_error);
++        }
++    }
++#endif
++
++  if (credentials == NULL && G_IS_UNIX_CONNECTION (auth->priv->stream))
+     {
+       local_error = NULL;
+       credentials = g_unix_connection_receive_credentials (G_UNIX_CONNECTION (auth->priv->stream),
+-- 
+2.20.1
+

diff --git a/dev-libs/glib/glib-2.60.7-r1.ebuild b/dev-libs/glib/glib-2.60.7-r1.ebuild
new file mode 100644
index 00000000000..7f37b1775ab
--- /dev/null
+++ b/dev-libs/glib/glib-2.60.7-r1.ebuild
@@ -0,0 +1,279 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_5,3_6,3_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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~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).
+# * 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?]
+	>=virtual/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[${MULTILIB_USEDEP}]
+"
+# 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() {
+	eapply "${FILESDIR}"/${PV}-gdbus-fixes.patch #700538, included in 2.62.3+
+
+	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 's/install.*true/install : false/g' gio/gdbus-2.0/codegen/meson.build || die
+	# Older than meson-0.50 doesn't know about install kwarg for configure_file; for that we need to remove the install_dir kwarg.
+	# Upstream will remove the install kwarg in a future version to require only meson-0.49.2 or newer, at which point the
+	# install_dir removal only should be kept.
+	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
+	)
+	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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2019-04-08  8:39 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2019-04-08  8:39 UTC (permalink / raw
  To: gentoo-commits

commit:     6cae567896078ca6373b8d667af7835030438d12
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 08:38:59 2019 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 08:38:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cae5678

dev-libs/glib: remove old

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   1 -
 ...56.2-network-monitor-race-test-iterations.patch |  36 ---
 .../files/glib-2.54.3-external-gdbus-codegen.patch |  86 ------
 .../glib/files/glib-2.58.2-gvariant-test-fix.patch |  96 -------
 dev-libs/glib/glib-2.56.4.ebuild                   | 300 ---------------------
 5 files changed, 519 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 9f539cd8493..aa0ad833c86 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,2 @@
-DIST glib-2.56.4.tar.xz 7029768 BLAKE2B 21cf840128e468151eeac55f0323f8f643973422b70bb65655e24c0a6b2f7ee72d5ae879bfae73df84fa2281fc425cc98328597910ba8fd99d7a52024e1b3ab6 SHA512 280a46c2af13283a08c15ff0b4f5492659c2884521930600ad45310ed181c44a878ad8f9b36bae68ed6e7d92db6f1630f7bf015148c513dc317d25807f13abb0
 DIST glib-2.58.3.tar.xz 4863648 BLAKE2B 4269bd6e80869f39d567917438f750561debb1b45d40ecea487d2e76e2468e07dc8d80a23678699f7b8f7778c2ed9d29e866ae5e33770f51ed00709dd5fe97eb SHA512 1e1cb5b607367dcbadb95563d463e81702cf396b28f1173f6d933707f4f3d5595a70225423e918807a05994a24f16fa3ac87d2ec67e4b670244ea99836634cce
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

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 1ddec6db946..00000000000
--- 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/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 a27966e0391..00000000000
--- 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/glib-2.58.2-gvariant-test-fix.patch b/dev-libs/glib/files/glib-2.58.2-gvariant-test-fix.patch
deleted file mode 100644
index 0bd3a85b018..00000000000
--- a/dev-libs/glib/files/glib-2.58.2-gvariant-test-fix.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 8a028c250a82b667562efcfdf51d35506383adbb Mon Sep 17 00:00:00 2001
-From: Mart Raudsepp <leio@gentoo.org>
-Date: Wed, 19 Dec 2018 16:22:21 +0200
-Subject: [PATCH] tests: Allocate gvariant data from the heap to guarantee
- alignment
-
-On glib-2-58 branch we don't have !455, thus we need aligned data
-for the gvariant tests to not fail on i686.
-
-Fixes #1626
----
- glib/tests/gvariant.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
-index 8047ef5e8..5ca7b964e 100644
---- a/glib/tests/gvariant.c
-+++ b/glib/tests/gvariant.c
-@@ -4770,6 +4770,7 @@ test_stack_dict_init (void)
- static void
- test_normal_checking_tuples (void)
- {
-+  gpointer aligned_data;
-   const guint8 data[] = {
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
-     'a', '(', 'a', 'o', 'a', 'o', 'a', 'a', 'o', 'a', 'a', 'o', ')'
-@@ -4778,13 +4779,15 @@ test_normal_checking_tuples (void)
-   GVariant *variant = NULL;
-   GVariant *normal_variant = NULL;
- 
--  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, data, size,
-+  aligned_data = g_memdup (data, size); /* guarantee alignment */
-+  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, aligned_data, size,
-                                      FALSE, NULL, NULL);
-   g_assert_nonnull (variant);
- 
-   normal_variant = g_variant_get_normal_form (variant);
-   g_assert_nonnull (normal_variant);
- 
-+  g_free (aligned_data);
-   g_variant_unref (normal_variant);
-   g_variant_unref (variant);
- }
-@@ -4896,6 +4899,7 @@ test_recursion_limits_array_in_variant (void)
- static void
- test_normal_checking_array_offsets (void)
- {
-+  gpointer aligned_data;
-   const guint8 data[] = {
-     0x07, 0xe5, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
-     'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'g',
-@@ -4904,13 +4908,15 @@ test_normal_checking_array_offsets (void)
-   GVariant *variant = NULL;
-   GVariant *normal_variant = NULL;
- 
--  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, data, size,
-+  aligned_data = g_memdup (data, size); /* guarantee alignment */
-+  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, aligned_data, size,
-                                      FALSE, NULL, NULL);
-   g_assert_nonnull (variant);
- 
-   normal_variant = g_variant_get_normal_form (variant);
-   g_assert_nonnull (normal_variant);
- 
-+  g_free (aligned_data);
-   g_variant_unref (normal_variant);
-   g_variant_unref (variant);
- }
-@@ -4944,6 +4950,7 @@ test_normal_checking_tuple_offsets (void)
- static void
- test_normal_checking_empty_object_path (void)
- {
-+  gpointer aligned_data;
-   const guint8 data[] = {
-     0x20, 0x20, 0x00, 0x00, 0x00, 0x00,
-     '(', 'h', '(', 'a', 'i', 'a', 'b', 'i', 'o', ')', ')',
-@@ -4952,13 +4959,15 @@ test_normal_checking_empty_object_path (void)
-   GVariant *variant = NULL;
-   GVariant *normal_variant = NULL;
- 
--  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, data, size,
-+  aligned_data = g_memdup (data, size); /* guarantee alignment */
-+  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, aligned_data, size,
-                                      FALSE, NULL, NULL);
-   g_assert_nonnull (variant);
- 
-   normal_variant = g_variant_get_normal_form (variant);
-   g_assert_nonnull (normal_variant);
- 
-+  g_free (aligned_data);
-   g_variant_unref (normal_variant);
-   g_variant_unref (variant);
- }
--- 
-2.17.0
-

diff --git a/dev-libs/glib/glib-2.56.4.ebuild b/dev-libs/glib/glib-2.56.4.ebuild
deleted file mode 100644
index 9cccbd6aa5b..00000000000
--- a/dev-libs/glib/glib-2.56.4.ebuild
+++ /dev/null
@@ -1,300 +0,0 @@
-# Copyright 1999-2019 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 kernel_linux +mime selinux static-libs systemtap test utils xattr"
-
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-
-# 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() {
-	# 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}"/2.56.2-network-monitor-race-test-iterations.patch # included in 2.57.1
-
-	# https://gitlab.gnome.org/GNOME/glib/issues/1626
-	eapply "${FILESDIR}"/${PN}-2.58.2-gvariant-test-fix.patch
-
-	# 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] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2018-12-30 11:28 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2018-12-30 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     a73230d7a2d94b7417b835d0976208d81e24d167
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 30 11:05:35 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Dec 30 11:11:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a73230d7

dev-libs/glib: remove old

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   5 -
 .../files/glib-2.50.0-external-gdbus-codegen.patch |  93 ------
 dev-libs/glib/glib-2.52.3.ebuild                   | 300 --------------------
 dev-libs/glib/glib-2.54.3-r6.ebuild                | 304 --------------------
 dev-libs/glib/glib-2.58.1.ebuild                   | 315 ---------------------
 5 files changed, 1017 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 5d266bbd874..da752322e9e 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,9 +1,4 @@
-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 glib-2.56.4.tar.xz 7029768 BLAKE2B 21cf840128e468151eeac55f0323f8f643973422b70bb65655e24c0a6b2f7ee72d5ae879bfae73df84fa2281fc425cc98328597910ba8fd99d7a52024e1b3ab6 SHA512 280a46c2af13283a08c15ff0b4f5492659c2884521930600ad45310ed181c44a878ad8f9b36bae68ed6e7d92db6f1630f7bf015148c513dc317d25807f13abb0
-DIST glib-2.58.1-patchset.tar.xz 17292 BLAKE2B c95de62f61f9dac8acbf20f83e95bced99f566c512ec43d46b1ad08356b86c9f5d75a96faa971ed89ae23c9534b03a85058751a40421f2b216612e94493bc9a2 SHA512 08833e58cce26412545e380d5c92448f77651c466b236108d5ee9451e30ad6e6bd796ddd30c3c81ca2d5219ea0f6269f9738f57a7438ed0db18c5c1f04a18e10
-DIST glib-2.58.1.tar.xz 4906444 BLAKE2B 022da8624a8ae2ec7fdc45777556a518d056e7389158d96db36baccdb238ed6fbdb6f224ec8b1c1bfec78001aa0348d3fc1fd43d20908a8c4690a0e03038bf61 SHA512 115b74fcd43241e3c4b4babfb8170453b2a002ff02d5996f3c097876199cadccc1cf67b017c10c14c0d2a1bb4228027b743f4926bda0ef7d74012ed712ccd155
 DIST glib-2.58.2.tar.xz 4862612 BLAKE2B e94d3dfc5d4b6d100c2425fda34c90fdf643fdb71b8bd65df691e34d11bfaf79fdc4c844eb215df24b0f680991fb0d0c08c3bb3dea61f5157ccd8bec200e2059 SHA512 4017ae308f2ef6313abbff2eb9b21ec6f8fa38935007491ca0cb4d1ffac6fedab6f50e911ac088995d6212323ba1767399f18529a2620d60378ecade193b4b1a
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

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 2c942d559f5..00000000000
--- 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/glib-2.52.3.ebuild b/dev-libs/glib/glib-2.52.3.ebuild
deleted file mode 100644
index 931700a301b..00000000000
--- a/dev-libs/glib/glib-2.52.3.ebuild
+++ /dev/null
@@ -1,300 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# 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="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-
-# 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() {
-	# 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 ece8f434c29..00000000000
--- a/dev-libs/glib/glib-2.54.3-r6.ebuild
+++ /dev/null
@@ -1,304 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-
-# 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() {
-	# 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.58.1.ebuild b/dev-libs/glib/glib-2.58.1.ebuild
deleted file mode 100644
index c9d5bdbbe0f..00000000000
--- a/dev-libs/glib/glib-2.58.1.ebuild
+++ /dev/null
@@ -1,315 +0,0 @@
-# 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://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 gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-
-# 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[${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() {
-	# 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
-
-	# Various cherry-picked patches from glib-2-58 branch (will be part of 2.58.2)
-	# Also patch to keep gtimezone working right on non-symlinked /etc/localtime on Gentoo (might get into 2.58.2, might not)
-	eapply "${WORKDIR}"/patches
-
-	# gdbus-codegen is a separate package
-	eapply "${FILESDIR}"/${PN}-2.54.3-external-gdbus-codegen.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] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2018-12-19 16:19 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2018-12-19 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     6a20897df0a747f8772f80cbce679760e72b0834
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 19 14:04:05 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Wed Dec 19 16:18:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a20897d

dev-libs/glib: bump to 2.58.2

Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.11

 dev-libs/glib/Manifest                             |   1 +
 .../files/glib-2.58.2-external-gdbus-codegen.patch | 124 ++++++++
 .../glib/files/glib-2.58.2-gvariant-test-fix.patch |  96 +++++++
 dev-libs/glib/glib-2.58.2.ebuild                   | 313 +++++++++++++++++++++
 4 files changed, 534 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index ab7f23afe98..f933dc66ac4 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -4,4 +4,5 @@ DIST glib-2.54.3.tar.xz 7836536 BLAKE2B 140e7cf09a41b72a5b22e5b87e9674cbfdfe1b82
 DIST glib-2.56.2.tar.xz 8041756 BLAKE2B 1af5bb37378856e959602bcb9299266bba46b990839c923f6b9881624aed306af0779005281b3e3a46b5994c54812edc86aade9cb782c596fd63b6fd91baba51 SHA512 8201ea82d3613d2e879284abe01520b766da30957c5a1a22f3e6019b0cce6bf95d25beae78867b6a133401c4165153c0c92974dd459ab12f9e0e9dd0c95df5d4
 DIST glib-2.58.1-patchset.tar.xz 17292 BLAKE2B c95de62f61f9dac8acbf20f83e95bced99f566c512ec43d46b1ad08356b86c9f5d75a96faa971ed89ae23c9534b03a85058751a40421f2b216612e94493bc9a2 SHA512 08833e58cce26412545e380d5c92448f77651c466b236108d5ee9451e30ad6e6bd796ddd30c3c81ca2d5219ea0f6269f9738f57a7438ed0db18c5c1f04a18e10
 DIST glib-2.58.1.tar.xz 4906444 BLAKE2B 022da8624a8ae2ec7fdc45777556a518d056e7389158d96db36baccdb238ed6fbdb6f224ec8b1c1bfec78001aa0348d3fc1fd43d20908a8c4690a0e03038bf61 SHA512 115b74fcd43241e3c4b4babfb8170453b2a002ff02d5996f3c097876199cadccc1cf67b017c10c14c0d2a1bb4228027b743f4926bda0ef7d74012ed712ccd155
+DIST glib-2.58.2.tar.xz 4862612 BLAKE2B e94d3dfc5d4b6d100c2425fda34c90fdf643fdb71b8bd65df691e34d11bfaf79fdc4c844eb215df24b0f680991fb0d0c08c3bb3dea61f5157ccd8bec200e2059 SHA512 4017ae308f2ef6313abbff2eb9b21ec6f8fa38935007491ca0cb4d1ffac6fedab6f50e911ac088995d6212323ba1767399f18529a2620d60378ecade193b4b1a
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

diff --git a/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch
new file mode 100644
index 00000000000..7615dbb248b
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch
@@ -0,0 +1,124 @@
+From 69da419c33c24a05126d21fb3098139d30ba9093 Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Wed, 19 Dec 2018 14:01:43 +0200
+Subject: [PATCH] build: don't build gdbus-codegen and rely on external
+ gdbus-codegen for tests
+
+---
+ configure.ac                                  |  1 -
+ docs/reference/gio/Makefile.am                |  1 -
+ gio/Makefile.am                               |  2 +-
+ gio/tests/Makefile.am                         | 22 ++++++-------------
+ .../gdbus-object-manager-example/Makefile.am  |  6 ++---
+ 5 files changed, 10 insertions(+), 22 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4b15b69b8..9187a12bb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3481,7 +3481,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 08093e8a0..9ce11f824 100644
+--- a/docs/reference/gio/Makefile.am
++++ b/docs/reference/gio/Makefile.am
+@@ -212,7 +212,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 05b20cdef..ed5d7d4cb 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 c4e7a9257..4b538b1e9 100644
+--- a/gio/tests/Makefile.am
++++ b/gio/tests/Makefile.am
+@@ -253,9 +253,7 @@ gdbus-daemon-impl.c: $(top_srcdir)/gio/gdbusdaemon.c
+ # These files are only generated on Windows builds inside GIO,
+ # but we want them on non-Windows builds for the tests
+ gdbus-daemon-generated.h gdbus-daemon-generated.c: $(top_srcdir)/gio/dbus-daemon.xml $(GDBUS_PYTHON_DEPS)
+-	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
+-		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
+-		$(PYTHON) $(top_srcdir)/gio/gdbus-2.0/codegen/gdbus-codegen.in \
++	$(AM_V_GEN) gdbus-codegen \
+ 		--interface-prefix org. \
+ 		--generate-c-code gdbus-daemon-generated \
+ 		--c-namespace _G \
+@@ -494,10 +492,8 @@ gnotification_SOURCES                    = $(gdbus_sessionbus_sources) gnotifica
+ 
+ BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h gdbus-test-codegen-generated-interface-info.c gdbus-test-codegen-generated-interface-info.h
+ gdbus-test-codegen.o: gdbus-test-codegen-generated.h gdbus-test-codegen-generated-interface-info.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 \
+@@ -516,10 +512,8 @@ gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gd
+ 		$(NULL)
+ gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h
+ 	@: # Generated as side-effect of .h
+-gdbus-test-codegen-generated-interface-info.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-interface-info.h: test-codegen.xml Makefile
++	$(AM_V_GEN) gdbus-codegen \
+ 		--interface-info-header \
+ 		--annotate "org.project.Bar" Key1 Value1 \
+ 		--annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
+@@ -532,10 +526,8 @@ gdbus-test-codegen-generated-interface-info.h: test-codegen.xml Makefile $(top_b
+ 		--output $@ \
+ 		$(srcdir)/test-codegen.xml \
+ 		$(NULL)
+-gdbus-test-codegen-generated-interface-info.c: 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-interface-info.c: test-codegen.xml Makefile
++	$(AM_V_GEN) gdbus-codegen \
+ 		--interface-info-body \
+ 		--annotate "org.project.Bar" Key1 Value1 \
+ 		--annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
+diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
+index 1d0464c5c..0603d9b0a 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.17.0
+

diff --git a/dev-libs/glib/files/glib-2.58.2-gvariant-test-fix.patch b/dev-libs/glib/files/glib-2.58.2-gvariant-test-fix.patch
new file mode 100644
index 00000000000..0bd3a85b018
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.58.2-gvariant-test-fix.patch
@@ -0,0 +1,96 @@
+From 8a028c250a82b667562efcfdf51d35506383adbb Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Wed, 19 Dec 2018 16:22:21 +0200
+Subject: [PATCH] tests: Allocate gvariant data from the heap to guarantee
+ alignment
+
+On glib-2-58 branch we don't have !455, thus we need aligned data
+for the gvariant tests to not fail on i686.
+
+Fixes #1626
+---
+ glib/tests/gvariant.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
+index 8047ef5e8..5ca7b964e 100644
+--- a/glib/tests/gvariant.c
++++ b/glib/tests/gvariant.c
+@@ -4770,6 +4770,7 @@ test_stack_dict_init (void)
+ static void
+ test_normal_checking_tuples (void)
+ {
++  gpointer aligned_data;
+   const guint8 data[] = {
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+     'a', '(', 'a', 'o', 'a', 'o', 'a', 'a', 'o', 'a', 'a', 'o', ')'
+@@ -4778,13 +4779,15 @@ test_normal_checking_tuples (void)
+   GVariant *variant = NULL;
+   GVariant *normal_variant = NULL;
+ 
+-  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, data, size,
++  aligned_data = g_memdup (data, size); /* guarantee alignment */
++  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, aligned_data, size,
+                                      FALSE, NULL, NULL);
+   g_assert_nonnull (variant);
+ 
+   normal_variant = g_variant_get_normal_form (variant);
+   g_assert_nonnull (normal_variant);
+ 
++  g_free (aligned_data);
+   g_variant_unref (normal_variant);
+   g_variant_unref (variant);
+ }
+@@ -4896,6 +4899,7 @@ test_recursion_limits_array_in_variant (void)
+ static void
+ test_normal_checking_array_offsets (void)
+ {
++  gpointer aligned_data;
+   const guint8 data[] = {
+     0x07, 0xe5, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+     'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'g',
+@@ -4904,13 +4908,15 @@ test_normal_checking_array_offsets (void)
+   GVariant *variant = NULL;
+   GVariant *normal_variant = NULL;
+ 
+-  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, data, size,
++  aligned_data = g_memdup (data, size); /* guarantee alignment */
++  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, aligned_data, size,
+                                      FALSE, NULL, NULL);
+   g_assert_nonnull (variant);
+ 
+   normal_variant = g_variant_get_normal_form (variant);
+   g_assert_nonnull (normal_variant);
+ 
++  g_free (aligned_data);
+   g_variant_unref (normal_variant);
+   g_variant_unref (variant);
+ }
+@@ -4944,6 +4950,7 @@ test_normal_checking_tuple_offsets (void)
+ static void
+ test_normal_checking_empty_object_path (void)
+ {
++  gpointer aligned_data;
+   const guint8 data[] = {
+     0x20, 0x20, 0x00, 0x00, 0x00, 0x00,
+     '(', 'h', '(', 'a', 'i', 'a', 'b', 'i', 'o', ')', ')',
+@@ -4952,13 +4959,15 @@ test_normal_checking_empty_object_path (void)
+   GVariant *variant = NULL;
+   GVariant *normal_variant = NULL;
+ 
+-  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, data, size,
++  aligned_data = g_memdup (data, size); /* guarantee alignment */
++  variant = g_variant_new_from_data (G_VARIANT_TYPE_VARIANT, aligned_data, size,
+                                      FALSE, NULL, NULL);
+   g_assert_nonnull (variant);
+ 
+   normal_variant = g_variant_get_normal_form (variant);
+   g_assert_nonnull (normal_variant);
+ 
++  g_free (aligned_data);
+   g_variant_unref (normal_variant);
+   g_variant_unref (variant);
+ }
+-- 
+2.17.0
+

diff --git a/dev-libs/glib/glib-2.58.2.ebuild b/dev-libs/glib/glib-2.58.2.ebuild
new file mode 100644
index 00000000000..e8e80b9e3e4
--- /dev/null
+++ b/dev-libs/glib/glib-2.58.2.ebuild
@@ -0,0 +1,313 @@
+# 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+# 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() {
+	# 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
+
+	# https://gitlab.gnome.org/GNOME/glib/issues/1626
+	eapply "${FILESDIR}"/${P}-gvariant-test-fix.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] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2018-11-29 15:25 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2018-11-29 15:25 UTC (permalink / raw
  To: gentoo-commits

commit:     549542cf21eb81eb75ce4f526f6a0da92b686c26
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 15:24:07 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 15:24:41 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=549542cf

dev-libs/glib: fix potential issues in network-monitor-race test

Closes: https://bugs.gentoo.org/664106
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.11

 ...56.2-network-monitor-race-test-iterations.patch | 36 ++++++++++++++++++++++
 dev-libs/glib/glib-2.56.2.ebuild                   |  3 ++
 2 files changed, 39 insertions(+)

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 00000000000..1ddec6db946
--- /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/glib-2.56.2.ebuild b/dev-libs/glib/glib-2.56.2.ebuild
index d8adde6c4e2..ea796fb9470 100644
--- a/dev-libs/glib/glib-2.56.2.ebuild
+++ b/dev-libs/glib/glib-2.56.2.ebuild
@@ -115,6 +115,9 @@ src_prepare() {
 		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
 


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2018-06-10  8:25 Mart Raudsepp
  0 siblings, 0 replies; 19+ messages in thread
From: Mart Raudsepp @ 2018-06-10  8:25 UTC (permalink / raw
  To: gentoo-commits

commit:     c2b5a3364405a40881ed2ecb776821213d163171
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 10 07:00:38 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Jun 10 08:25:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2b5a336

dev-libs/glib-2.54: port to python-single-r1

Use python-single-r1 instead of python_replicate_script and let
upstream --with-python do its work (don't patch it out anymore in
gdbus-codegen patch). We pass --with-python to end up with proper
/usr/bin/env based shebangs (otherwise it is based on $PYTHON,
which includes absolute path, unlike EPYTHON)

Closes: https://bugs.gentoo.org/651830
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../files/glib-2.54.3-external-gdbus-codegen.patch | 27 ++--------------------
 dev-libs/glib/glib-2.54.3-r5.ebuild                | 14 ++++-------
 2 files changed, 6 insertions(+), 35 deletions(-)

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
index 45025b65551..4f3e1784c88 100644
--- 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
@@ -4,40 +4,17 @@ Date: Fri, 23 Feb 2018 15:27:33 +0330
 Subject: [PATCH] glib-2.54.3-external-gdbus-codegen-for-autotools
 
 ---
- configure.ac                                       | 17 ++++++++---------
+ 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 |  8 +++-----
- 5 files changed, 14 insertions(+), 20 deletions(-)
+ 5 files changed, 6 insertions(+), 12 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
 index 0457c90..07166c9 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -382,14 +382,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.7,,PYTHON="python2.7")
-+#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.7,,PYTHON="python2.7")
- 
- 
- dnl ***********************
 @@ -3469,7 +3469,6 @@ gobject/glib-mkenums
  gobject/tests/Makefile
  gthread/Makefile

diff --git a/dev-libs/glib/glib-2.54.3-r5.ebuild b/dev-libs/glib/glib-2.54.3-r5.ebuild
index 31c751756ab..6f4824c6ad8 100644
--- a/dev-libs/glib/glib-2.54.3-r5.ebuild
+++ b/dev-libs/glib/glib-2.54.3-r5.ebuild
@@ -12,7 +12,7 @@ PYTHON_COMPAT=( python{2_7,3_5,3_6} )
 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
+	multilib multilib-minimal pax-utils python-single-r1 toolchain-funcs versionator virtualx
 
 DESCRIPTION="The GLib library of C routines"
 HOMEPAGE="https://www.gtk.org/"
@@ -84,6 +84,8 @@ pkg_setup() {
 		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() {
@@ -120,11 +122,6 @@ src_prepare() {
 	# gdbus-codegen is a separate package
 	eapply "${FILESDIR}"/${PN}-2.54.3-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 's:@PYTHON@:python:' \
-		-i gobject/glib-{genmarshal.in,mkenums.in} || die
 	# Also needed to prevent cross-compile failures, see bug #267603
 	eautoreconf
 
@@ -179,6 +176,7 @@ multilib_src_configure() {
 		$(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 \
@@ -222,10 +220,6 @@ multilib_src_install() {
 multilib_src_install_all() {
 	einstalldocs
 
-	# FIXME: Move python deps that are only required at build time of other packages to a split package
-	python_replicate_script "${ED}"/usr/bin/glib-mkenums
-	python_replicate_script "${ED}"/usr/bin/glib-genmarshal
-
 	# gtester-report works only with python2 and is heavily deprecated - https://bugzilla.gnome.org/show_bug.cgi?id=668035#c4
 	# Remove it instead of bothering with making it work with python3 in PYTHON_COMPAT
 	rm "${ED}usr/bin/gtester-report"


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2016-05-01 14:37 Alexandre Rostovtsev
  0 siblings, 0 replies; 19+ messages in thread
From: Alexandre Rostovtsev @ 2016-05-01 14:37 UTC (permalink / raw
  To: gentoo-commits

commit:     b5b12009bb9ee5e6ddfcceae47c3d96bd6656023
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Sun May  1 14:34:26 2016 +0000
Commit:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Sun May  1 14:37:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5b12009

dev-libs/glib: fix firefox crash (bug #577686)

Thanks to Franz Fellner.

Package-Manager: portage-2.2.28

 .../files/glib-2.48.0-GContextSpecificGroup.patch  |  44 +++
 dev-libs/glib/glib-2.48.0-r1.ebuild                | 300 +++++++++++++++++++++
 2 files changed, 344 insertions(+)

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.48.0-r1.ebuild b/dev-libs/glib/glib-2.48.0-r1.ebuild
new file mode 100644
index 0000000..2862a56
--- /dev/null
+++ b/dev-libs/glib/glib-2.48.0-r1.ebuild
@@ -0,0 +1,300 @@
+# 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}]
+		|| (
+			>=dev-libs/elfutils-0.142
+			>=dev-libs/libelf-0.8.12
+			>=sys-freebsd/freebsd-lib-9.2_rc1
+		)
+	)
+"
+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
+)
+
+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() {
+	# 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
+	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
+
+	# missing from 2.48.0 tarball, should be fixed in 2.48.1; bug #578238
+	cp "${FILESDIR}"/${P}-gobject.stp.in gobject/gobject.stp.in || die
+
+	# 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
+
+	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_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
+	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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2016-02-28 12:02 Pacho Ramos
  0 siblings, 0 replies; 19+ messages in thread
From: Pacho Ramos @ 2016-02-28 12:02 UTC (permalink / raw
  To: gentoo-commits

commit:     499cf8cf9d63d6b3ae14e721ca9ba07b582bcd25
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 28 11:59:13 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Feb 28 12:02:31 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=499cf8cf

dev-libs/glib: Fix memory leak (#575018 by Rick Harris), skip more broken tests

Package-Manager: portage-2.2.27

 dev-libs/glib/files/glib-2.46.2-memleak.patch |  25 ++
 dev-libs/glib/glib-2.46.2-r2.ebuild           | 318 ++++++++++++++++++++++++++
 2 files changed, 343 insertions(+)

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/glib-2.46.2-r2.ebuild b/dev-libs/glib/glib-2.46.2-r2.ebuild
new file mode 100644
index 0000000..759b811
--- /dev/null
+++ b/dev-libs/glib/glib-2.46.2-r2.ebuild
@@ -0,0 +1,318 @@
+# 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}
+	http://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}]
+		|| (
+			>=dev-libs/elfutils-0.142
+			>=dev-libs/libelf-0.8.12
+			>=sys-freebsd/freebsd-lib-9.2_rc1
+		)
+	)
+"
+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
+)
+
+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
+
+	# 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
+
+	# 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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
@ 2015-10-13  3:28 Mike Frysinger
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2015-10-13  3:28 UTC (permalink / raw
  To: gentoo-commits

commit:     c9a77e1ab93d5af9968d3e449569832aff61c2df
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 13 03:23:40 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 13 03:24:01 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9a77e1a

dev-libs/glib: fix builds w/newer bionic versions

 dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch | 15 +++++++++++++++
 dev-libs/glib/glib-2.44.1-r1.ebuild                  |  2 ++
 2 files changed, 17 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch b/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch
new file mode 100644
index 0000000..259b572
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch
@@ -0,0 +1,15 @@
+https://bugzilla.gnome.org/756477
+
+fix build w/newer releases of bionic (android)
+
+--- a/gio/gthreadedresolver.c
++++ b/gio/gthreadedresolver.c
+@@ -263,7 +263,7 @@ lookup_by_address_finish (GResolver     *resolver,
+ 
+ #if defined(G_OS_UNIX)
+ 
+-#ifdef __BIONIC__
++#if defined __BIONIC__ && !defined BIND_4_COMPAT
+ /* Copy from bionic/libc/private/arpa_nameser_compat.h
+  * and bionic/libc/private/arpa_nameser.h */
+ typedef struct {

diff --git a/dev-libs/glib/glib-2.44.1-r1.ebuild b/dev-libs/glib/glib-2.44.1-r1.ebuild
index d5302bc..25be870 100644
--- a/dev-libs/glib/glib-2.44.1-r1.ebuild
+++ b/dev-libs/glib/glib-2.44.1-r1.ebuild
@@ -151,6 +151,8 @@ src_prepare() {
 	# gdbus-codegen is a separate package
 	epatch "${FILESDIR}/${PN}-2.40.0-external-gdbus-codegen.patch"
 
+	epatch "${FILESDIR}/${PN}-2.44.1-bionic-nameser.patch"
+
 	# leave python shebang alone
 	sed -e '/${PYTHON}/d' \
 		-i glib/Makefile.{am,in} || die


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

end of thread, other threads:[~2024-01-22  5:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-11 18:13 [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/ Mart Raudsepp
  -- strict thread matches above, loose matches on Subject: below --
2024-01-22  5:52 Sam James
2023-03-16 23:51 Sam James
2023-03-04  0:48 Matt Turner
2022-12-21 23:28 Sam James
2022-11-26 17:19 Matt Turner
2022-11-01 22:10 Sam James
2022-09-22  4:13 Sam James
2020-03-25  2:20 Matt Turner
2020-02-22 18:30 Mart Raudsepp
2020-01-01 15:41 Mart Raudsepp
2019-04-08  8:39 Mart Raudsepp
2018-12-30 11:28 Mart Raudsepp
2018-12-19 16:19 Mart Raudsepp
2018-11-29 15:25 Mart Raudsepp
2018-06-10  8:25 Mart Raudsepp
2016-05-01 14:37 Alexandre Rostovtsev
2016-02-28 12:02 Pacho Ramos
2015-10-13  3:28 Mike Frysinger

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