diff mbox series

[meta-gnome] libwnck: update to 43.2 and fix build errors

Message ID 20250525123633.2232417-1-koen@dominion.thruhere.net
State Under Review
Headers show
Series [meta-gnome] libwnck: update to 43.2 and fix build errors | expand

Commit Message

Koen Kooi May 25, 2025, 12:36 p.m. UTC
This fixes the following build issue:

wnck-3.so.0.3.0.p/pager.c.o.d -o libwnck/libwnck-3.so.0.3.0.p/pager.c.o -c ../libwnck-43.2/libwnck/pager.c
| In file included from ../libwnck-43.2/libwnck/pager.c:34:
| ../libwnck-43.2/libwnck/pager-accessible-factory.h:19: warning: header guard '__WNCK_PAGER_ACCESSIBLE_FACTORY_H__' followed by '#define' of a different macro [-Wheader-guard]
|    19 | #ifndef __WNCK_PAGER_ACCESSIBLE_FACTORY_H__
| ../libwnck-43.2/libwnck/pager-accessible-factory.h:20: note: '__WBCK_PAGER_ACCESSIBLE_FACTORY_H__' is defined here; did you mean '__WNCK_PAGER_ACCESSIBLE_FACTORY_H__'?
|    20 | #define __WBCK_PAGER_ACCESSIBLE_FACTORY_H__
| In file included from ../libwnck-43.2/libwnck/pager.c:35:
| ../libwnck-43.2/libwnck/workspace-accessible-factory.h:19: warning: header guard '__WNCK_WORKSPACE_ACCESSIBLE_FACTORY_H__' followed by '#define' of a different macro [-Wheader-guard]
|    19 | #ifndef __WNCK_WORKSPACE_ACCESSIBLE_FACTORY_H__
| ../libwnck-43.2/libwnck/workspace-accessible-factory.h:20: note: '__WBCK_WORKSPACE_ACCESSIBLE_FACTORY_H__' is defined here; did you mean '__WNCK_WORKSPACE_ACCESSIBLE_FACTORY_H__'?
|    20 | #define __WBCK_WORKSPACE_ACCESSIBLE_FACTORY_H__

And the subsequent build error caused by an OE-core patch to
startup-notification.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 ...caused-by-OE-core-changes-to-startup.patch | 43 +++++++++++++++++++
 ...40d59c32d7ebeb94d242436e3144cefc174a.patch | 40 +++++++++++++++++
 .../{libwnck3_43.0.bb => libwnck3_43.2.bb}    |  4 +-
 3 files changed, 86 insertions(+), 1 deletion(-)
 create mode 100644 meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch
 create mode 100644 meta-gnome/recipes-gnome/libwnck/files/ef0e40d59c32d7ebeb94d242436e3144cefc174a.patch
 rename meta-gnome/recipes-gnome/libwnck/{libwnck3_43.0.bb => libwnck3_43.2.bb} (75%)
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch b/meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch
new file mode 100644
index 0000000000..91e23c785b
--- /dev/null
+++ b/meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch
@@ -0,0 +1,43 @@ 
+From 1df0f4ae8fd54bc1ae940dfafa701c84d068674d Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Sun, 25 May 2025 12:24:16 +0000
+Subject: [PATCH] Fix build issue caused by OE-core changes to
+ startup-notification:
+
+../libwnck-43.2/libwnck/tasklist.c: In function 'sequence_timeout_callback':
+../libwnck-43.2/libwnck/tasklist.c:5034:49: error: passing argument 2 of 'sn_startup_sequence_get_last_active_time' from incompatible pointer type [-Wincompatible-pointer-types]
+ 5034 |                                                 &tv_sec, &tv_usec);
+      |                                                 ^~~~~~~
+      |                                                 |
+      |                                                 long int *
+In file included from /build/angstrom/build/tmp/work/armv7at2hf-neon-angstrom-linux-gnueabi/libwnck3/43.2/recipe-sysroot/usr/include/startup-notification-1.0/libsn/sn.h:32,
+                 from ../libwnck-43.2/libwnck/tasklist.c:40:
+/build/angstrom/build/tmp/work/armv7at2hf-neon-angstrom-linux-gnueabi/libwnck3/43.2/recipe-sysroot/usr/include/startup-notification-1.0/libsn/sn-monitor.h:84:79: note: expected 'time_t *' {aka 'long long int *'} but argument is of type 'long int *'
+   84 |                                                            time_t            *tv_sec,
+      |                                                            ~~~~~~~~~~~~~~~~~~~^~~~~~
+
+It is caused by a patch of startup-notification in oe-core which is backported from upstream mailllist and changes the signature of function sn_startup_sequence_get_last_active_time().
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ libwnck/tasklist.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
+index 7418f89..460e11d 100644
+--- a/libwnck/tasklist.c
++++ b/libwnck/tasklist.c
+@@ -5031,7 +5031,7 @@ sequence_timeout_callback (void *user_data)
+       WnckTask *task = WNCK_TASK (tmp->data);
+ 
+       sn_startup_sequence_get_last_active_time (task->startup_sequence,
+-                                                &tv_sec, &tv_usec);
++                                                (time_t *) &tv_sec, &tv_usec);
+ 
+       elapsed = (now - (tv_sec * G_USEC_PER_SEC + tv_usec)) / 1000.0;
+ 
+-- 
+2.33.0
+
diff --git a/meta-gnome/recipes-gnome/libwnck/files/ef0e40d59c32d7ebeb94d242436e3144cefc174a.patch b/meta-gnome/recipes-gnome/libwnck/files/ef0e40d59c32d7ebeb94d242436e3144cefc174a.patch
new file mode 100644
index 0000000000..2d526e7aba
--- /dev/null
+++ b/meta-gnome/recipes-gnome/libwnck/files/ef0e40d59c32d7ebeb94d242436e3144cefc174a.patch
@@ -0,0 +1,40 @@ 
+From ef0e40d59c32d7ebeb94d242436e3144cefc174a Mon Sep 17 00:00:00 2001
+From: correctmost <136447-correctmost@users.noreply.gitlab.gnome.org>
+Date: Thu, 20 Mar 2025 03:03:44 -0400
+Subject: [PATCH] build: fix -Wheader-guard warnings reported by clang
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libwnck/-/commit/ef0e40d59c32d7ebeb94d242436e3144cefc174a]
+---
+ libwnck/pager-accessible-factory.h     | 2 +-
+ libwnck/workspace-accessible-factory.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libwnck/pager-accessible-factory.h b/libwnck/pager-accessible-factory.h
+index 8e2fe30c..25220fc2 100644
+--- a/libwnck/pager-accessible-factory.h
++++ b/libwnck/pager-accessible-factory.h
+@@ -17,7 +17,7 @@
+  */
+ 
+ #ifndef __WNCK_PAGER_ACCESSIBLE_FACTORY_H__
+-#define __WBCK_PAGER_ACCESSIBLE_FACTORY_H__
++#define __WNCK_PAGER_ACCESSIBLE_FACTORY_H__
+ 
+ #include <atk/atk.h>
+ 
+diff --git a/libwnck/workspace-accessible-factory.h b/libwnck/workspace-accessible-factory.h
+index d2d4a84a..335b465b 100644
+--- a/libwnck/workspace-accessible-factory.h
++++ b/libwnck/workspace-accessible-factory.h
+@@ -17,7 +17,7 @@
+  */
+ 
+ #ifndef __WNCK_WORKSPACE_ACCESSIBLE_FACTORY_H__
+-#define __WBCK_WORKSPACE_ACCESSIBLE_FACTORY_H__
++#define __WNCK_WORKSPACE_ACCESSIBLE_FACTORY_H__
+ 
+ #include <atk/atk.h>
+ 
+-- 
+GitLab
+
diff --git a/meta-gnome/recipes-gnome/libwnck/libwnck3_43.0.bb b/meta-gnome/recipes-gnome/libwnck/libwnck3_43.2.bb
similarity index 75%
rename from meta-gnome/recipes-gnome/libwnck/libwnck3_43.0.bb
rename to meta-gnome/recipes-gnome/libwnck/libwnck3_43.2.bb
index c7f7989115..4342325f11 100644
--- a/meta-gnome/recipes-gnome/libwnck/libwnck3_43.0.bb
+++ b/meta-gnome/recipes-gnome/libwnck/libwnck3_43.2.bb
@@ -19,7 +19,9 @@  inherit gnomebase gobject-introspection gtk-doc gettext features_check
 def gnome_verdir(v):
     return oe.utils.trim_version(v, 1)
 
-SRC_URI[archive.sha256sum] = "905bcdb85847d6b8f8861e56b30cd6dc61eae67ecef4cd994a9f925a26a2c1fe"
+SRC_URI += "file://ef0e40d59c32d7ebeb94d242436e3144cefc174a.patch;patch=1 \
+            file://0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch;patch=1"
+SRC_URI[archive.sha256sum] = "55a7444ec1fbb95c086d40967388f231b5c0bbc8cffaa086bf9290ae449e51d5"
 
 # gtk+3 and libepoxy need to be built with x11 PACKAGECONFIG.
 # cairo would at least needed to be built with xlib.