meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.36.0.bb
Eric Meyers 64440b3aae
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 <gdk/gdkx.h>
|       |          ^~~~~~~~~~~~
| 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 <eric.meyers@arthrex.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-11-10 07:50:05 -08:00

33 lines
1.3 KiB
BlitzBasic

SUMMARY = "GTK+ applet for NetworkManager"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "gtk+3 libnma libnotify libsecret libgudev networkmanager iso-codes nss"
inherit features_check gnomebase gsettings gtk-icon-cache gettext pkgconfig
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"
# We don't not have ubuntu's appindicator (yet?)
EXTRA_OEMESON = "-Dappindicator=no"
# We currently don't build NetworkManager with libteamdctl support
EXTRA_OEMESON += "-Dteam=false"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
PACKAGECONFIG[modemmanager] = "-Dwwan=true, -Dwwan=false, modemmanager"
PACKAGECONFIG[selinux] = "-Dselinux=true, -Dselinux=false, libselinux"
RDEPENDS:${PN} =+ "networkmanager"
FILES:${PN} += " \
${datadir}/nm-applet/ \
${datadir}/libnma/wifi.ui \
${datadir}/metainfo \
"