* [Buildroot] [PATCH 1/6] libglib2: bump to version 2.42.0
2014-11-01 9:21 [Buildroot] [PATCH 0/6] Bump libgtk3 (and friends) for Gtk+ 3.14 Eric Le Bihan
@ 2014-11-01 9:21 ` Eric Le Bihan
2014-11-01 9:21 ` [Buildroot] [PATCH 2/6] cairo: bump to 1.12.12 Eric Le Bihan
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Eric Le Bihan @ 2014-11-01 9:21 UTC (permalink / raw)
To: buildroot
Bump libglib2 to version 2.42.0 and remove obsolete patches.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
package/libglib2/libglib2-0002-no-gtk-doc.patch | 25 --
...2-0003-implement-GMutex-natively-on-Linux.patch | 279 ---------------------
package/libglib2/libglib2.mk | 3 +-
3 files changed, 1 insertion(+), 306 deletions(-)
delete mode 100644 package/libglib2/libglib2-0002-no-gtk-doc.patch
delete mode 100644 package/libglib2/libglib2-0003-implement-GMutex-natively-on-Linux.patch
diff --git a/package/libglib2/libglib2-0002-no-gtk-doc.patch b/package/libglib2/libglib2-0002-no-gtk-doc.patch
deleted file mode 100644
index 926a263..0000000
--- a/package/libglib2/libglib2-0002-no-gtk-doc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Same patch as for systemd in commit
-7144f2f04b705538a893e538a6b851f536f433b6:
-
-Fix deactivation of gtk-doc
-
-The tarball contains the Makefile for building documentation with gtk-doc,
-Unfortunately the AM_CONDITIONAL variable is not the correct one, which
-results in an error when running autoreconf.
-
-This patch fixes this issue.
-
-Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
-Signed-off-by: Hadrien Boutteville <hadrien.boutteville@gmail.com>
-
---- a/gtk-doc.make
-+++ b/gtk-doc.make
-@@ -267,7 +267,7 @@
- #
- # Require gtk-doc when making dist
- #
--if HAVE_GTK_DOC
-+if ENABLE_GTK_DOC
- dist-check-gtkdoc: docs
- else
- dist-check-gtkdoc:
diff --git a/package/libglib2/libglib2-0003-implement-GMutex-natively-on-Linux.patch b/package/libglib2/libglib2-0003-implement-GMutex-natively-on-Linux.patch
deleted file mode 100644
index acfebad..0000000
--- a/package/libglib2/libglib2-0003-implement-GMutex-natively-on-Linux.patch
+++ /dev/null
@@ -1,279 +0,0 @@
-From 49b59e5ac4428a6a99a85d699c3662f96efc4e9d Mon Sep 17 00:00:00 2001
-From: Ryan Lortie <desrt@desrt.ca>
-Date: Tue, 10 Jun 2014 08:28:32 -0400
-Subject: [PATCH] GLib: implement GMutex natively on Linux
-
-If we have futex(2) then we can implement GMutex natively and gain a
-substantial performance increase (vs. using pthreads).
-
-This also avoids the need to allocate an extra structure in memory when
-using GMutex or GCond: we can use the structure directly.
-
-The main reason for the increase in performance is that our
-implementation can be made more simple: we don't need to support the
-array of options on pthread_mutex_t (which includes the possibility, for
-example, of being recursive).
-
-The result is a ~30% improvement in uncontended cases and a much larger
-increase (3 to 4 times) in contended cases for a simple testcase.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=731986
----
- glib/gthread-posix.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 207 insertions(+), 1 deletion(-)
-
-diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
-index 6f5a606..f7d5d8a 100644
---- a/glib/gthread-posix.c
-+++ b/glib/gthread-posix.c
-@@ -66,6 +66,11 @@
- #include <windows.h>
- #endif
-
-+/* clang defines __ATOMIC_SEQ_CST but doesn't support the GCC extension */
-+#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
-+#define USE_NATIVE_MUTEX
-+#endif
-+
- static void
- g_thread_abort (gint status,
- const gchar *function)
-@@ -77,6 +82,8 @@ g_thread_abort (gint status,
-
- /* {{{1 GMutex */
-
-+#if !defined(USE_NATIVE_MUTEX)
-+
- static pthread_mutex_t *
- g_mutex_impl_new (void)
- {
-@@ -258,6 +265,8 @@ g_mutex_trylock (GMutex *mutex)
- return FALSE;
- }
-
-+#endif /* !defined(USE_NATIVE_MUTEX) */
-+
- /* {{{1 GRecMutex */
-
- static pthread_mutex_t *
-@@ -631,6 +640,8 @@ g_rw_lock_reader_unlock (GRWLock *rw_lock)
-
- /* {{{1 GCond */
-
-+#if !defined(USE_NATIVE_MUTEX)
-+
- static pthread_cond_t *
- g_cond_impl_new (void)
- {
-@@ -902,6 +913,8 @@ g_cond_wait_until (GCond *cond,
- return FALSE;
- }
-
-+#endif /* defined(USE_NATIVE_MUTEX) */
-+
- /* {{{1 GPrivate */
-
- /**
-@@ -1219,5 +1232,198 @@ g_system_thread_set_name (const gchar *name)
- #endif
- }
-
--/* {{{1 Epilogue */
-+/* {{{1 GMutex and GCond futex implementation */
-+
-+#if defined(USE_NATIVE_MUTEX)
-+
-+#include <linux/futex.h>
-+#include <sys/syscall.h>
-+
-+/* We should expand the set of operations available in gatomic once we
-+ * have better C11 support in GCC in common distributions (ie: 4.9).
-+ *
-+ * Before then, let's define a couple of useful things for our own
-+ * purposes...
-+ */
-+
-+#define exchange_acquire(ptr, new) \
-+ __atomic_exchange_4((ptr), (new), __ATOMIC_ACQUIRE)
-+#define compare_exchange_acquire(ptr, old, new) \
-+ __atomic_compare_exchange_4((ptr), (old), (new), 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)
-+
-+#define exchange_release(ptr, new) \
-+ __atomic_exchange_4((ptr), (new), __ATOMIC_RELEASE)
-+#define store_release(ptr, new) \
-+ __atomic_store_4((ptr), (new), __ATOMIC_RELEASE)
-+
-+/* Our strategy for the mutex is pretty simple:
-+ *
-+ * 0: not in use
-+ *
-+ * 1: acquired by one thread only, no contention
-+ *
-+ * > 1: contended
-+ *
-+ *
-+ * As such, attempting to acquire the lock should involve an increment.
-+ * If we find that the previous value was 0 then we can return
-+ * immediately.
-+ *
-+ * On unlock, we always store 0 to indicate that the lock is available.
-+ * If the value there was 1 before then we didn't have contention and
-+ * can return immediately. If the value was something other than 1 then
-+ * we have the contended case and need to wake a waiter.
-+ *
-+ * If it was not 0 then there is another thread holding it and we must
-+ * wait. We must always ensure that we mark a value >1 while we are
-+ * waiting in order to instruct the holder to do a wake operation on
-+ * unlock.
-+ */
-+
-+void
-+g_mutex_init (GMutex *mutex)
-+{
-+ mutex->i[0] = 0;
-+}
-+
-+void
-+g_mutex_clear (GMutex *mutex)
-+{
-+}
-+
-+static void __attribute__((noinline))
-+g_mutex_lock_slowpath (GMutex *mutex)
-+{
-+ /* Set to 2 to indicate contention. If it was zero before then we
-+ * just acquired the lock.
-+ *
-+ * Otherwise, sleep for as long as the 2 remains...
-+ */
-+ while (exchange_acquire (&mutex->i[0], 2) != 0)
-+ syscall (__NR_futex, &mutex->i[0], (gsize) FUTEX_WAIT, (gsize) 2, NULL);
-+}
-+
-+static void __attribute__((noinline))
-+g_mutex_unlock_slowpath (GMutex *mutex)
-+{
-+ /* We seem to get better code for the uncontended case by splitting
-+ * out this call...
-+ */
-+ syscall (__NR_futex, &mutex->i[0], (gsize) FUTEX_WAKE, (gsize) 1, NULL);
-+}
-+
-+void
-+g_mutex_lock (GMutex *mutex)
-+{
-+ /* 0 -> 1 and we're done. Anything else, and we need to wait... */
-+ if G_UNLIKELY (g_atomic_int_add (&mutex->i[0], 1) != 0)
-+ g_mutex_lock_slowpath (mutex);
-+}
-+
-+void
-+g_mutex_unlock (GMutex *mutex)
-+{
-+ /* 1-> 0 and we're done. Anything else and we need to signal... */
-+ if G_UNLIKELY (exchange_release (&mutex->i[0], 0) != 1)
-+ g_mutex_unlock_slowpath (mutex);
-+}
-+
-+gboolean
-+g_mutex_trylock (GMutex *mutex)
-+{
-+ guint zero = 0;
-+
-+ /* We don't want to touch the value at all unless we can move it from
-+ * exactly 0 to 1.
-+ */
-+ return compare_exchange_acquire (&mutex->i[0], &zero, 1);
-+}
-+
-+/* Condition variables are implemented in a rather simple way as well.
-+ * In many ways, futex() as an abstraction is even more ideally suited
-+ * to condition variables than it is to mutexes.
-+ *
-+ * We store a generation counter. We sample it with the lock held and
-+ * unlock before sleeping on the futex.
-+ *
-+ * Signalling simply involves increasing the counter and making the
-+ * appropriate futex call.
-+ *
-+ * The only thing that is the slightest bit complicated is timed waits
-+ * because we must convert our absolute time to relative.
-+ */
-+
-+void
-+g_cond_init (GCond *cond)
-+{
-+ cond->i[0] = 0;
-+}
-+
-+void
-+g_cond_clear (GCond *cond)
-+{
-+}
-+
-+void
-+g_cond_wait (GCond *cond,
-+ GMutex *mutex)
-+{
-+ guint sampled = g_atomic_int_get (&cond->i[0]);
-+
-+ g_mutex_unlock (mutex);
-+ syscall (__NR_futex, &cond->i[0], (gsize) FUTEX_WAIT, (gsize) sampled, NULL);
-+ g_mutex_lock (mutex);
-+}
-+
-+void
-+g_cond_signal (GCond *cond)
-+{
-+ g_atomic_int_inc (&cond->i[0]);
-+
-+ syscall (__NR_futex, &cond->i[0], (gsize) FUTEX_WAKE, (gsize) 1, NULL);
-+}
-+
-+void
-+g_cond_broadcast (GCond *cond)
-+{
-+ g_atomic_int_inc (&cond->i[0]);
-+
-+ syscall (__NR_futex, &cond->i[0], (gsize) FUTEX_WAKE, (gsize) INT_MAX, NULL);
-+}
-+
-+gboolean
-+g_cond_wait_until (GCond *cond,
-+ GMutex *mutex,
-+ gint64 end_time)
-+{
-+ struct timespec now;
-+ struct timespec span;
-+ guint sampled;
-+
-+ if (end_time < 0)
-+ return FALSE;
-+
-+ clock_gettime (CLOCK_MONOTONIC, &now);
-+ span.tv_sec = (end_time / 1000000) - now.tv_sec;
-+ span.tv_nsec = ((end_time % 1000000) * 1000) - now.tv_nsec;
-+ if (span.tv_nsec < 0)
-+ {
-+ span.tv_nsec += 1000000000;
-+ span.tv_sec--;
-+ }
-+
-+ if (span.tv_sec < 0)
-+ return FALSE;
-+
-+ sampled = cond->i[0];
-+ g_mutex_unlock (mutex);
-+ syscall (__NR_futex, &cond->i[0], (gsize) FUTEX_WAIT, (gsize) sampled, &span);
-+ g_mutex_lock (mutex);
-+
-+ return TRUE;
-+}
-+
-+#endif
-+
-+ /* {{{1 Epilogue */
- /* vim:set foldmethod=marker: */
---
-1.8.1.4
-
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index a64ef39..581c51c 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -4,14 +4,13 @@
#
################################################################################
-LIBGLIB2_VERSION_MAJOR = 2.40
+LIBGLIB2_VERSION_MAJOR = 2.42
LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).0
LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.xz
LIBGLIB2_SITE = http://ftp.gnome.org/pub/gnome/sources/glib/$(LIBGLIB2_VERSION_MAJOR)
LIBGLIB2_LICENSE = LGPLv2+
LIBGLIB2_LICENSE_FILES = COPYING
-LIBGLIB2_AUTORECONF = YES
LIBGLIB2_INSTALL_STAGING = YES
LIBGLIB2_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH 5/6] libgtk3: bump to 3.14.4
2014-11-01 9:21 [Buildroot] [PATCH 0/6] Bump libgtk3 (and friends) for Gtk+ 3.14 Eric Le Bihan
` (3 preceding siblings ...)
2014-11-01 9:21 ` [Buildroot] [PATCH 4/6] gdk-pixbuf: bump to 2.30.8 Eric Le Bihan
@ 2014-11-01 9:21 ` Eric Le Bihan
2014-11-01 9:21 ` [Buildroot] [PATCH 6/6] adwaita-icon-theme: new package Eric Le Bihan
2014-11-01 14:33 ` [Buildroot] [PATCH 0/6] Bump libgtk3 (and friends) for Gtk+ 3.14 Thomas Petazzoni
6 siblings, 0 replies; 10+ messages in thread
From: Eric Le Bihan @ 2014-11-01 9:21 UTC (permalink / raw)
To: buildroot
Bump libgtk3 to version 3.14.4.
Also add a patch to fix compilation of a build tool: extract-strings.
The bug has already been reported [1], but no proper resolution has been
provided yet. This patch only covers the Buildroot issue.
[1] https://bugzilla.gnome.org/show_bug.cgi?id=731013
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
| 47 ++++++++++++++++++++++
package/libgtk3/libgtk3.mk | 13 ++++--
2 files changed, 57 insertions(+), 3 deletions(-)
create mode 100644 package/libgtk3/libgtk3-0005-do-not-build-extract-strings.patch
--git a/package/libgtk3/libgtk3-0005-do-not-build-extract-strings.patch b/package/libgtk3/libgtk3-0005-do-not-build-extract-strings.patch
new file mode 100644
index 0000000..cad010f
--- /dev/null
+++ b/package/libgtk3/libgtk3-0005-do-not-build-extract-strings.patch
@@ -0,0 +1,47 @@
+Do not build util/extract-strings
+
+Do to build util/extract-strings, as it will be built by host-libgtk3 and
+installed in $(HOST_DIR)/usr/bin (thus avoiding the -lint linking issue with
+uClibc).
+
+Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+
+Index: gtk+-3.14.0/Makefile.am
+===================================================================
+--- gtk+-3.14.0.orig/Makefile.am 2014-09-22 05:17:44.000000000 +0200
++++ gtk+-3.14.0/Makefile.am 2014-09-25 16:08:32.000000000 +0200
+@@ -1,7 +1,7 @@
+ ## Makefile.am for GTK+
+ include $(top_srcdir)/Makefile.decl
+
+-SRC_SUBDIRS = util gdk gtk libgail-util modules demos tests testsuite examples
++SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples
+ SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
+
+ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+Index: gtk+-3.14.0/gtk/Makefile.am
+===================================================================
+--- gtk+-3.14.0.orig/gtk/Makefile.am 2014-09-22 05:09:39.000000000 +0200
++++ gtk+-3.14.0/gtk/Makefile.am 2014-09-25 16:09:10.000000000 +0200
+@@ -1330,7 +1330,7 @@
+
+ %.ui.h: %.ui
+ $(AM_V_GEN) mkdir -p $(dir $@) \
+- && $(top_builddir)/util/extract-strings$(EXEEXT) $< > $@
++ && extract-strings$(EXEEXT) $< > $@
+
+ #
+ # rules to generate built sources
+Index: gtk+-3.14.0/gtk/inspector/Makefile.am
+===================================================================
+--- gtk+-3.14.0.orig/gtk/inspector/Makefile.am 2014-09-04 20:11:33.000000000 +0200
++++ gtk+-3.14.0/gtk/inspector/Makefile.am 2014-09-25 16:09:48.000000000 +0200
+@@ -114,7 +114,7 @@
+ template_headers = $(templates:.ui=.ui.h)
+
+ %.ui.h : %.ui
+- $(AM_V_GEN) $(top_builddir)/util/extract-strings$(EXEEXT) $< > $@
++ $(AM_V_GEN) extract-strings$(EXEEXT) $< > $@
+
+ EXTRA_DIST += \
+ inspector.gresource.xml \
diff --git a/package/libgtk3/libgtk3.mk b/package/libgtk3/libgtk3.mk
index 73b3e17..540f08d 100644
--- a/package/libgtk3/libgtk3.mk
+++ b/package/libgtk3/libgtk3.mk
@@ -4,8 +4,8 @@
#
################################################################################
-LIBGTK3_VERSION_MAJOR = 3.12
-LIBGTK3_VERSION = $(LIBGTK3_VERSION_MAJOR).2
+LIBGTK3_VERSION_MAJOR = 3.14
+LIBGTK3_VERSION = $(LIBGTK3_VERSION_MAJOR).4
LIBGTK3_SOURCE = gtk+-$(LIBGTK3_VERSION).tar.xz
LIBGTK3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK3_VERSION_MAJOR)
LIBGTK3_LICENSE = LGPLv2+
@@ -135,7 +135,8 @@ LIBGTK3_POST_INSTALL_TARGET_HOOKS += LIBGTK3_COMPILE_GLIB_SCHEMAS
# for both native and target builds).
#
# But no native version of libintl is available (the functions are
-# provided by glibc). So gtk-update-icon-cache will not build.
+# provided by glibc). So gtk-update-icon-cache will not build, and
+# extract-strings neither.
#
# As a workaround, we build gtk-update-icon-cache on our own, set
# --enable-gtk2-dependency=yes and force './configure' to use our version.
@@ -160,11 +161,17 @@ define HOST_LIBGTK3_BUILD_CMDS
$(@D)/gtk/updateiconcache.c \
$(HOST_LIBGTK3_CFLAGS) \
-o $(@D)/gtk/gtk-update-icon-cache
+ $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
+ $(@D)/util/extract-strings.c \
+ $(HOST_LIBGTK3_CFLAGS) \
+ -o $(@D)/util/extract-strings
endef
define HOST_LIBGTK3_INSTALL_CMDS
$(INSTALL) -D -m 0755 $(@D)/gtk/gtk-update-icon-cache \
$(HOST_DIR)/usr/bin/gtk-update-icon-cache
+ $(INSTALL) -D -m 0755 $(@D)/util/extract-strings \
+ $(HOST_DIR)/usr/bin/extract-strings
endef
$(eval $(autotools-package))
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread