[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
78/140: gnu: gtk+-2: Fix ‘builder’ test.
From: |
guix-commits |
Subject: |
78/140: gnu: gtk+-2: Fix ‘builder’ test. |
Date: |
Sun, 17 Oct 2021 23:10:58 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit b90f5b3fc5865843a57abaccbd1e8406624e21c0
Author: Thiago Jung Bauermann <bauermann@kolabnow.com>
AuthorDate: Tue Oct 12 14:10:18 2021 -0400
gnu: gtk+-2: Fix ‘builder’ test.
The signal callbacks in the ‘builder’ testcase have wrong prototypes.
This causes it to fail the “/Builder/Signal Autoconnect” test on
powerpc64le-linux.
Solve the problem by backporting the upstream fix that was applied to
GTK+ 3.0.
* gnu/packages/patches/gtk2-fix-builder-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gtk.scm (gtk+-2): Use it.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
gnu/local.mk | 1 +
gnu/packages/gtk.scm | 3 +-
gnu/packages/patches/gtk2-fix-builder-test.patch | 94 ++++++++++++++++++++++++
3 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index ffaf4e9..cdf2caa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1218,6 +1218,7 @@ dist_patch_DATA =
\
%D%/packages/patches/guile-email-fix-tests.patch \
%D%/packages/patches/guile-ssh-fix-test-suite.patch \
%D%/packages/patches/guile-ssh-read-error.patch \
+ %D%/packages/patches/gtk2-fix-builder-test.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
%D%/packages/patches/gtk2-theme-paths.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index c05a296..f1bd4e2 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -916,7 +916,8 @@ is part of the GNOME accessibility project.")
"1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
(patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
"gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
- "gtk2-theme-paths.patch"))))
+ "gtk2-theme-paths.patch"
+ "gtk2-fix-builder-test.patch"))))
(build-system gnu-build-system)
(outputs '("out" "bin" "doc" "debug"))
(propagated-inputs
diff --git a/gnu/packages/patches/gtk2-fix-builder-test.patch
b/gnu/packages/patches/gtk2-fix-builder-test.patch
new file mode 100644
index 0000000..8c41e59
--- /dev/null
+++ b/gnu/packages/patches/gtk2-fix-builder-test.patch
@@ -0,0 +1,94 @@
+From e45e11238036e06c8fe78bea1691b256ca41837b Mon Sep 17 00:00:00 2001
+From: Steve Langasek <steve.langasek@ubuntu.com>
+Date: Tue, 7 Jan 2014 13:55:28 +0100
+Subject: [PATCH] fix prototypes of signal callbacks in the test suite
+
+The signal callbacks are defined to take pointers as their arguments, but the
+callbacks found in testsuite/gtk/builder.c are passing a GParamSpec by value
+as the second argument. This confuses and angers the compiler on ppc64el,
+resulting in segfaults after return from the function due to stack-smashing
+by the (completely-unused) argument.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=721700
+---
+
+This is a backport to v2.24.33 of upstream commit:
+
+https://gitlab.gnome.org/GNOME/gtk/-/commit/256561db2f0b34e01047f8882b3e0cb8c6d9dbab
+
+ gtk/tests/builder.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
+index 8529dacc2f6e..23d5096062fa 100644
+--- a/gtk/tests/builder.c
++++ b/gtk/tests/builder.c
+@@ -132,7 +132,7 @@ static int object = 0;
+ static int object_after = 0;
+
+ void /* exported for GtkBuilder */
+-signal_normal (GtkWindow *window, GParamSpec spec)
++signal_normal (GtkWindow *window, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_WINDOW (window));
+ g_assert (normal == 0);
+@@ -142,7 +142,7 @@ signal_normal (GtkWindow *window, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_after (GtkWindow *window, GParamSpec spec)
++signal_after (GtkWindow *window, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_WINDOW (window));
+ g_assert (normal == 1);
+@@ -152,7 +152,7 @@ signal_after (GtkWindow *window, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_object (GtkButton *button, GParamSpec spec)
++signal_object (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_BUTTON (button));
+ g_assert (object == 0);
+@@ -162,7 +162,7 @@ signal_object (GtkButton *button, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_object_after (GtkButton *button, GParamSpec spec)
++signal_object_after (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_BUTTON (button));
+ g_assert (object == 1);
+@@ -172,28 +172,28 @@ signal_object_after (GtkButton *button, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_first (GtkButton *button, GParamSpec spec)
++signal_first (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 0);
+ normal = 10;
+ }
+
+ void /* exported for GtkBuilder */
+-signal_second (GtkButton *button, GParamSpec spec)
++signal_second (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 10);
+ normal = 20;
+ }
+
+ void /* exported for GtkBuilder */
+-signal_extra (GtkButton *button, GParamSpec spec)
++signal_extra (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 20);
+ normal = 30;
+ }
+
+ void /* exported for GtkBuilder */
+-signal_extra2 (GtkButton *button, GParamSpec spec)
++signal_extra2 (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 30);
+ normal = 40;
- 59/140: Revert gstreamer update to 1.19.2., (continued)
- 59/140: Revert gstreamer update to 1.19.2., guix-commits, 2021/10/17
- 50/140: gnu: lib2geom: Update to 1.1., guix-commits, 2021/10/17
- 54/140: gnu: abseil-cpp: Remove googletest patch., guix-commits, 2021/10/17
- 63/140: gnu: gst-plugins-bad: Update to 1.18.5., guix-commits, 2021/10/17
- 42/140: gnu: gst-plugins-good: Update to 1.19.2., guix-commits, 2021/10/17
- 70/140: gnu: python-keras: Enable parallel tests., guix-commits, 2021/10/17
- 73/140: bluez: Update to 5.61., guix-commits, 2021/10/17
- 68/140: gnu: gstreamer-docs: Update to 1.18.5., guix-commits, 2021/10/17
- 75/140: gnu: glibc: Remove unneeded nscd patching., guix-commits, 2021/10/17
- 80/140: gnu: diffutils: Update to 3.8., guix-commits, 2021/10/17
- 78/140: gnu: gtk+-2: Fix ‘builder’ test.,
guix-commits <=
- 85/140: gnu: Add ld-gold-wrapper., guix-commits, 2021/10/17
- 86/140: gnu: gdb: Patch references to /bin/sh and add debug output., guix-commits, 2021/10/17
- 96/140: gnu: python-pypa-build: Update to 0.7.0., guix-commits, 2021/10/17
- 94/140: gnu: fontconfig: Add a search path for XDG_DATA_DIRS., guix-commits, 2021/10/17
- 91/140: gnu: rust: Bootstrap rust from 1.39.0 and optimize build time., guix-commits, 2021/10/17
- 99/140: gnu: python-setuptools-scm: Update to 6.3.2, guix-commits, 2021/10/17
- 101/140: gnu: python-pathlib2: Update to 2.3.6., guix-commits, 2021/10/17
- 103/140: build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase., guix-commits, 2021/10/17
- 106/140: gnu: at-spi2-atk: Break a dependency cycle between GTK+ and Inkscape., guix-commits, 2021/10/17
- 109/140: gnu: json-glib-minimal: Introduce minimal variant., guix-commits, 2021/10/17