~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[alpine-aports] [PATCH] main/glib: upgrade to 2.47.6, move bash-completion to subpackage, not bundled but system-wide pcre is now by default.

Details
Message ID
<1456269843-18071-1-git-send-email-valery.kartel@gmail.com>
Sender timestamp
1456269843
DKIM signature
missing
Download raw message
Patch: +32 -150
---
 ...ove-quark-initialization-to-a-constructor.patch | 110 ---------------------
 main/glib/APKBUILD                                 |  72 ++++++--------
 2 files changed, 32 insertions(+), 150 deletions(-)
 delete mode 100644 main/glib/0001-Revert-Move-quark-initialization-to-a-constructor.patch

diff --git a/main/glib/0001-Revert-Move-quark-initialization-to-a-constructor.patch b/main/glib/0001-Revert-Move-quark-initialization-to-a-constructor.patch
deleted file mode 100644
index 70ccc35..0000000
--- a/main/glib/0001-Revert-Move-quark-initialization-to-a-constructor.patch
@@ -1,110 +0,0 @@
From ca32c60a815f91a28e63993e9b53a2cfa0764240 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 2 Oct 2015 08:11:53 +0200
Subject: [PATCH] Revert "Move quark initialization to a constructor"

musl's does not run ctors in the assumed order that glib-2.46 expects:

- glib_init() should be called before gobject_init_ctor().

This reverts commit 2fe992b099bfd3fb121a71b7af43e116b2142b5d.
---
 glib/glib-init.c |  1 -
 glib/glib-init.h |  2 --
 glib/gquark.c    | 26 ++++++++++++--------------
 3 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/glib/glib-init.c b/glib/glib-init.c
index e7002e6..24efe9d 100644
--- a/glib/glib-init.c
+++ b/glib/glib-init.c
@@ -233,7 +233,6 @@ glib_init (void)
 {
   g_messages_prefixed_init ();
   g_debug_init ();
-  g_quark_init ();
 }
 
 #if defined (G_OS_WIN32)
diff --git a/glib/glib-init.h b/glib/glib-init.h
index b56f7e2..de6be78 100644
--- a/glib/glib-init.h
+++ b/glib/glib-init.h
@@ -25,8 +25,6 @@
 extern GLogLevelFlags g_log_always_fatal;
 extern GLogLevelFlags g_log_msg_prefix;
 
-void g_quark_init (void);
--
 #ifdef G_OS_WIN32
 #include <windows.h>
 
diff --git a/glib/gquark.c b/glib/gquark.c
index 9e51a92..d620533 100644
--- a/glib/gquark.c
+++ b/glib/gquark.c
@@ -40,7 +40,6 @@
 #include "gthread.h"
 #include "gtestutils.h"
 #include "glib_trace.h"
-#include "glib-init.h"
 
 #define QUARK_BLOCK_SIZE         2048
 #define QUARK_STRING_BLOCK_SIZE (4096 - sizeof (gsize))
@@ -54,16 +53,6 @@ static gint           quark_seq_id = 0;
 static gchar         *quark_block = NULL;
 static gint           quark_block_offset = 0;
 
-void
-g_quark_init (void)
-{
-  g_assert (quark_seq_id == 0);
-  quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
-  quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
-  quarks[0] = NULL;
-  quark_seq_id = 1;
-}
--
 /**
  * SECTION:quarks
  * @title: Quarks
@@ -138,9 +127,10 @@ g_quark_try_string (const gchar *string)
     return 0;
 
   G_LOCK (quark_global);
-  quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+  if (quark_ht)
+    quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
   G_UNLOCK (quark_global);
--
+  
   return quark;
 }
 
@@ -179,7 +169,8 @@ quark_from_string (const gchar *string,
 {
   GQuark quark = 0;
 
-  quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+  if (quark_ht)
+    quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
 
   if (!quark)
     {
@@ -292,6 +283,13 @@ quark_new (gchar *string)
        */
       g_atomic_pointer_set (&quarks, quarks_new);
     }
+  if (!quark_ht)
+    {
+      g_assert (quark_seq_id == 0);
+      quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
+      quarks[quark_seq_id] = NULL;
+      g_atomic_int_inc (&quark_seq_id);
+    }
 
   quark = quark_seq_id;
   g_atomic_pointer_set (&quarks[quark], string);
--- 
2.6.0

diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
index 930e54f..88a2ca9 100644
--- a/main/glib/APKBUILD
+++ b/main/glib/APKBUILD
@@ -1,23 +1,20 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glib
pkgver=2.46.2
pkgver=2.47.6
pkgrel=0
pkgdesc="Common C routines used by Gtk+ and other libs"
url="http://www.gtk.org"
arch="all"
license='GPL'
license="GPL"
depends=
triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules"
depends_dev="perl python gettext-dev zlib-dev bzip2-dev libffi-dev"
makedepends="$depends_dev"
source="http://ftp.gnome.org/pub/gnome/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
	0001-Revert-Move-quark-initialization-to-a-constructor.patch
	"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang"


_builddir="$srcdir/$pkgname-$pkgver"
makedepends="$depends_dev pcre-dev"
source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang $pkgname-bash-completion:bashcomp"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
@@ -30,7 +27,6 @@ prepare() {
	touch -r docs/reference/glib/Makefile.am gtk-doc.make
}


build() {
	cd "$_builddir"
	./configure \
@@ -50,36 +46,32 @@ package() {
	rm -rf "$pkgdir"/usr/lib/charset.alias
}

# move the stuff in /usr/bin to the glib-dev package
dev() {
	default_dev
	replaces="glib"
	mkdir -p "$subpkgdir"/usr/bin/ \
		"$subpkgdir"/usr/share/bash-completion/completions \
		|| return 1
	cd "$pkgdir"/usr/bin
	mv \
		gdbus-codegen \
		glib-compile-resources \
		glib-genmarshal \
		glib-gettextize \
		glib-mkenums \
		gobject-query \
		gresource \
		gtester \
		gtester-report \
		"$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/gdb \
		"$pkgdir"/usr/share/glib-2.0 \
		"$subpkgdir"/usr/share/ || return 1
	mv "$pkgdir"/usr/share/bash-completion/completions/gresource \
		"$subpkgdir"/usr/share/bash-completion/completions \
		|| return 1
	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/glib-2.0
	find "$pkgdir"/usr/bin ! -name "glib-compile-schemas" -a \( \
		-name "gdbus-codegen" -o \
		-name "gobject-query" -o \
		-name "gresource" -o \
		-name "gtester*" -o \
		-name "glib-*" \) \
		-exec mv {} "$subpkgdir"/usr/bin \;
	for dir in codegen gdb gettext; do
		mv "$pkgdir"/usr/share/glib-2.0/$dir \
			"$subpkgdir"/usr/share/glib-2.0
	done
	mv "$pkgdir"/usr/share/gdb "$subpkgdir"/usr/share
}

bashcomp() {
	pkgdesc="Bash completion for $pkgname"
	arch="noarch"
	depends=
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
}

md5sums="7f815d6e46df68e070cb421ed7f1139e  glib-2.46.2.tar.xz
1d9c4fbfadc2e358e3bb9fbec1646711  0001-Revert-Move-quark-initialization-to-a-constructor.patch"
sha256sums="5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db  glib-2.46.2.tar.xz
c3dfaf69a627033d28552342e79ccbcfb7cae8dfbe8e3a2272ce2c25f76b9844  0001-Revert-Move-quark-initialization-to-a-constructor.patch"
sha512sums="8b5298712710d77b4a47367071f782d2bb3042b149ec8fde8c065f80bf3c5375c94318d19665c0092572e4895e590231a47324d25f371310f02b43feb3009588  glib-2.46.2.tar.xz
c034c60e87b6fea82d1eddd6ccd849425dd9be10af552491d82398f04ec1691d6d386dc99333a917b1b5fa905526a4553cef37ab0967ff857864f95fe7a52edf  0001-Revert-Move-quark-initialization-to-a-constructor.patch"
md5sums="5e996acd780c7be856dbbd3f95e8b201  glib-2.47.6.tar.xz"
sha256sums="fa40ebbbc3fc8883e1d73c4f9430e44bf3d6469a68f56d37e8f292e5671bcfae  glib-2.47.6.tar.xz"
sha512sums="53406194e02e21af503b7f0fa53d1b5847080cb47683b6d038de60f8dcdcc80c5905fb9df316ad87f084639d8de7874e6402c1b63674164737d3fca5595caf77  glib-2.47.6.tar.xz"
-- 
2.7.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)