From 64440b3aaeef576d697d349e8aa85e1a31fe2d92 Mon Sep 17 00:00:00 2001 From: Eric Meyers Date: Mon, 10 Nov 2025 08:29:13 -0600 Subject: [PATCH] network-manager-applet: Fixing builds when x11 is not included in DISTRO_FEATURES Commit c466cb9 (https://github.com/openembedded/meta-openembedded/commit/c466cb9) switched to using ANY_OF_DISTRO_FEATURES, so theoretically users can have either x11 or wayland in their DISTRO_FEATURES. In the case that only wayland is specified, this build error is seen: | In file included from ../sources/network-manager-applet-1.36.0/src/applet.c:25: | ../sources/network-manager-applet-1.36.0/src/applet.h:14:10: fatal error: gdk/gdkx.h: No such file or directory | 14 | #include | | ^~~~~~~~~~~~ | compilation terminated. gdkx.h is brought in via including x11 in DISTRO_FEATURES - so this patch removes the incompatible headers in the case of x11 not being specified in DISTRO_FEATURES. Signed-off-by: Eric Meyers Signed-off-by: Khem Raj --- ...kx-build-error-when-x11-not-included.patch | 50 +++++++++++++++++++ .../network-manager-applet_1.36.0.bb | 1 + 2 files changed, 51 insertions(+) create mode 100644 meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet/0001-fix-gdkx-build-error-when-x11-not-included.patch diff --git a/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet/0001-fix-gdkx-build-error-when-x11-not-included.patch b/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet/0001-fix-gdkx-build-error-when-x11-not-included.patch new file mode 100644 index 0000000000..f0cc54c131 --- /dev/null +++ b/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet/0001-fix-gdkx-build-error-when-x11-not-included.patch @@ -0,0 +1,50 @@ +From: Eric Meyers +Date: Fri, 7 Nov 2025 12:00:00 +0000 +Subject: [PATCH] Patch to fix gdkx.h build issues. + +Patch to fix gdkx.h build issues when x11 is not included in DISTRO_FEATURES: + +| In file included from ../sources/network-manager-applet-1.36.0/src/applet.c:25: +| ../sources/network-manager-applet-1.36.0/src/applet.h:14:10: fatal error: gdk/gdkx.h: No such file or directory +| 14 | #include +| | ^~~~~~~~~~~~ +| compilation terminated. + +Upstream-Status: Pending +Signed-off-by: Eric Meyers +diff --git a/src/applet.h b/src/applet.h +index 7978ba7c..6992196a 100644 +--- a/src/applet.h ++++ b/src/applet.h +@@ -11,7 +11,6 @@ + #include + + #include +-#include + + #include + +diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c +index b68141bb..2d8762d8 100644 +--- a/src/connection-editor/nm-connection-editor.c ++++ b/src/connection-editor/nm-connection-editor.c +@@ -15,7 +15,6 @@ + #include + #include + #include +-#include + + #if WITH_SELINUX + #include +diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c +index a3f41c04..b54c76b0 100644 +--- a/src/connection-editor/nm-connection-list.c ++++ b/src/connection-editor/nm-connection-list.c +@@ -13,7 +13,6 @@ + #include + #include + #include +-#include + + #include "ce-page.h" + #include "nm-connection-editor.h" diff --git a/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.36.0.bb b/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.36.0.bb index 10e514775a..f6c6bdab96 100644 --- a/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.36.0.bb +++ b/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.36.0.bb @@ -10,6 +10,7 @@ ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" REQUIRED_DISTRO_FEATURES = "opengl" SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" +SRC_URI:append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', ' file://0001-fix-gdkx-build-error-when-x11-not-included.patch', d)}" SRC_URI[archive.sha256sum] = "a84704487ea3afe1485c47fb2ab598b8f779f540ae0dcbf0a1c5f85e64a7e253"