Skip to contentSkip to conversation

santiy-meta-gnome: add class for bbappend files checking

PATCH In review Armin Kuster 2 participants 24 messages Mar 7, 2018 – Mar 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/23 santiy-meta-gnome: add class for bbappend files checking

Idea taken from meta-virt

Add a new class, sanity-meta-gnome.bbclass, to check for whether necessary settings are available for bbappend files in this layer to be effective, and warn users if not.

In addition, a variable SKIP_SANITY_BBAPPEND_CHECK is added to enable users to explicitly skip the checking to avoid unwanted warnings.

---
 meta-gnome/README                            | 23 +++++++++++++++++++++++
 meta-gnome/classes/sanity-meta-gnome.bbclass | 10 ++++++++++
 meta-gnome/conf/layer.conf                   |  4 ++++
 3 files changed, 37 insertions(+)
 create mode 100644 meta-gnome/classes/sanity-meta-gnome.bbclass
meta-gnome/README +23 -0
index 0c4fbd2..ef3a6f3 100644
@@ -1,3 +1,25 @@
+meta-gnome
+===========
+
+The recipe in this layer needs to have 'x11' in DISTRO_FEATURES 
+to have effect. To enable them, add in configuration file the following line.
+
+  DISTRO_FEATURES_append = " x11"
+
+If meta-gnome is included, but x11 is not enabled as a
+distro feature a warning is printed at parse time:
+
+    You have included the meta-gnome layer, but
+    'x11' has not been enabled in your DISTRO_FEATURES.
+
+If you know what you are doing, this warning can be disabled by setting the following
+variable in your configuration:
+
+  SKIP_META_VIRT_SANITY_CHECK = 1
+
+
+Dependencies
+------------
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
@@ -14,3 +36,4 @@ When sending single patches, please using something like:
 'git send-email -M -1 --to [email protected] --subject-prefix=meta-gnome][PATCH'
 
 Interim layer maintainer: Martin Jansa <[email protected]>
+
meta-gnome/classes/sanity-meta-gnome.bbclass new file +10 -0
new file mode 100644
index 0000000..331ea19
@@ -0,0 +1,10 @@
+addhandler gnome_bbappend_distrocheck
+gnome_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck"
+python gnome_bbappend_distrocheck() {
+    skip_check = e.data.getVar('SKIP_META_GNOME_SANITY_CHECK') == "1"
+    if 'x11' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
+        bb.warn("You have included the meta-gnome layer, but \
+'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
+may not take effect. See the meta-gnome README for details on enabling \
+meta-gnome support.")
+}
meta-gnome/conf/layer.conf +4 -0
index fb89c14..37215a7 100644
@@ -13,3 +13,7 @@ BBFILE_PRIORITY_gnome-layer = "7"
 LAYERVERSION_gnome-layer = "1"
 
 LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
+
+# Sanity check for meta-gnome layer.
+# Setting SKIP_META_GNOME_SANITY_CHECK to "1" would skip the bbappend files check.
+INHERIT += "sanity-meta-gnome"
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/23 gupnp-tools: only include when x11 in DISTRO_FEATURES

---
 meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb +3 -1
index 9360d65..3ddb818 100644
@@ -8,4 +8,6 @@ RRECOMMENDS_${PN} = "adwaita-icon-theme"
 SRC_URI = "http://download.gnome.org/sources/${BPN}/0.8/${BPN}-${PV}.tar.xz"
 SRC_URI[md5sum] = "212d85ebce89b32468b59e1164050d40"
 SRC_URI[sha256sum] = "aa3decb9d532c0e2e505adc592f431fd81c0231ded2981129e87da13712479ed"
-inherit autotools pkgconfig gettext
+inherit distro_features_check autotools pkgconfig gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
Signature · 1 line
2.7.4
#2 lore raw

PATCH 3/23 florence: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-support/florence/florence_0.6.3.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-support/florence/florence_0.6.3.bb +3 -1
index b9b7d0c..bb55721 100644
@@ -12,7 +12,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/${PN}/${PN}/${PV}/${PN}-${PV}.tar.bz2"
 SRC_URI[md5sum] = "8775051d7352f75dec5a86dc9964e8e0"
 SRC_URI[sha256sum] = "422992fd07d285be73cce721a203e22cee21320d69b0fda1579ce62944c5091e"
 
-inherit gettext autotools gconf pkgconfig
+inherit distro_features_check gettext autotools gconf pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 EXTRA_OECONF = "--disable-scrollkeeper --without-docs --without-at-spi --without-panelapplet --without-xrecord"
 
Signature · 1 line
2.7.4
#3 lore raw

PATCH 4/23 evince: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/evince/evince_3.24.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-gnome/recipes-gnome/evince/evince_3.24.0.bb +2 -0
index 78a9495..c7ecf2b 100644
@@ -7,6 +7,8 @@ PR = "r5"
 
 inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check systemd
 
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
            file://0001-help-remove-YELP-macro.patch \
            file://0001-Add-format-attribute-to-_synctex_malloc.patch \
Signature · 1 line
2.7.4
#4 lore raw

PATCH 5/23 evolution-data-server: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/eds/evolution-data-server_3.26.3.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/eds/evolution-data-server_3.26.3.bb +3 -1
index 2d410e2..f4ff489 100644
@@ -14,7 +14,9 @@ DEPENDS = " \
     dbus db virtual/libiconv zlib libsoup-2.4 libglade libical nss libsecret \
 "
 
-inherit gnomebase cmake gtk-doc gettext gobject-introspection perlnative pythonnative
+inherit distro_features_check gnomebase cmake gtk-doc gettext gobject-introspection perlnative pythonnative
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI += " \
     file://0001-CMakeLists.txt-Remove-TRY_RUN-for-iconv.patch \
Signature · 1 line
2.7.4
#5 lore raw

PATCH 6/23 onboard: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-support/onboard/onboard_1.4.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-support/onboard/onboard_1.4.1.bb +3 -1
index 10765ee..4e49bec 100644
@@ -10,7 +10,9 @@ SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz
 SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
 SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"
 
-inherit setuptools3 pkgconfig gtk-icon-cache gsettings
+inherit distro_features_check setuptools3 pkgconfig gtk-icon-cache gsettings
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 FILES_${PN} += " \
     ${datadir}/dbus-1 \
Signature · 1 line
2.7.4
#6 lore raw

PATCH 7/23 gnome-menus3: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/gnome-menus/gnome-menus3_3.10.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/gnome-menus/gnome-menus3_3.10.1.bb +3 -1
index 01da347..647ae91 100644
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
 DEPENDS = "python libxml2 gconf popt gtk+3 intltool-native gnome-common-native"
 
-inherit gnomebase pkgconfig python-dir pythonnative gobject-introspection
+inherit distro_features_check gnomebase pkgconfig python-dir pythonnative gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 BPN = "gnome-menus"
 
Signature · 1 line
2.7.4
#7 lore raw

PATCH 8/23 libgnomekbd: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb +3 -1
index 12ed81d..40249fd 100644
@@ -6,7 +6,9 @@ SECTION = "x11/gnome/libs"
 
 DEPENDS = "gconf glib-2.0 libxklavier gtk+3 intltool-native"
 
-inherit gnome gobject-introspection gettext
+inherit distro_features_check gnome gobject-introspection gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 GNOME_COMPRESS_TYPE = "xz"
 
Signature · 1 line
2.7.4
#8 lore raw

PATCH 9/23 keybinder: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-support/keybinder/keybinder_3.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-support/keybinder/keybinder_3.0.bb +3 -1
index d6744a3..0a0a3e6 100644
@@ -18,7 +18,9 @@ SRC_URI = "git://github.com/engla/keybinder.git;branch=keybinder-3.0 \
 
 RDEPENDS_${PN} = "gtk+"
 
-inherit autotools gtk-doc gobject-introspection
+inherit distro_features_check autotools gtk-doc gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 do_configure_prepend() {
 	touch ${S}/ChangeLog
 }
Signature · 1 line
2.7.4
#9 lore raw

PATCH 10/23 libtimezonemap: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb +3 -1
index d6aeed3..957d7d0 100644
@@ -15,7 +15,9 @@ DEPENDS = "gtk+3 gdk-pixbuf libsoup-2.4 json-glib gnome-common-native \
 
 B = "${S}"
 
-inherit autotools pkgconfig gobject-introspection
+inherit distro_features_check autotools pkgconfig gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_configure_prepend() {
 	(cd ${S}; NOCONFIGURE="yes" . ${S}/autogen.sh)
Signature · 1 line
2.7.4
#10 lore raw

PATCH 11/23 network-manager-applet: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 .../network-manager-applet/network-manager-applet_1.4.4.bb            | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb +3 -1
index 14b336a..d6e1db0 100644
@@ -7,7 +7,9 @@ DEPENDS = "gtk+3 libnotify libsecret networkmanager dbus-glib \
            intltool-native \
 "
 
-inherit gnomebase gsettings gtk-icon-cache gobject-introspection
+inherit distro_features_check gnomebase gsettings gtk-icon-cache gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 GNOME_COMPRESS_TYPE = "xz"
 
Signature · 1 line
2.7.4
#11 lore raw

PATCH 12/23 abiword: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb +3 -1
index 2a13e48..1d92b04 100644
@@ -38,7 +38,9 @@ SRC_URI[sha256sum] = "afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090
 #want 3.x from 3.x.y for the installation directory
 SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
 
-inherit autotools-brokensep pkgconfig
+inherit distro_features_check autotools-brokensep pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGECONFIG ??= " \
     collab-backend-xmpp collab-backend-tcp \
Signature · 1 line
2.7.4
#12 lore raw

PATCH 13/23 devilspie: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/devilspie/devilspie2_0.42.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/devilspie/devilspie2_0.42.bb +3 -1
index ae2ec5a..1c7f79f 100644
@@ -14,7 +14,9 @@ SRC_URI = " \
 SRC_URI[md5sum] = "f205409e921aa2d86481f1b8d518da45"
 SRC_URI[sha256sum] = "11f5bc310fba4df404c057461ffb3fadac8ef51d211008c665c48f587a5a3f85"
 
-inherit pkgconfig gettext
+inherit distro_features_check pkgconfig gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_compile() {
     export GTK2=1
Signature · 1 line
2.7.4
#13 lore raw

PATCH 14/23 gparted: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-extended/gparted/gparted_0.30.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-extended/gparted/gparted_0.30.0.bb +3 -1
index cea0e3a..cdc882a 100644
@@ -3,7 +3,9 @@ HOMEPAGE = "http://gparted.org/index.php"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-inherit autotools pkgconfig gtk-icon-cache
+inherit distro_features_check autotools pkgconfig gtk-icon-cache
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = " \
     ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
Signature · 1 line
2.7.4
#14 lore raw

PATCH 15/23 gedit: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb +4 -1
index 5d244de..ba425ad 100644
@@ -7,7 +7,10 @@ DEPENDS = "gvfs enchant gconf gnome-doc-utils glib-2.0 gtk+ gtksourceview2 iso-c
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-inherit gnome gettext pythonnative
+inherit distro_features_check gnome gettext pythonnative
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
            file://0001-workaround-void-pointer-arithmetic.patch \
            file://0001-Remove-help-directory-from-build.patch \
Signature · 1 line
2.7.4
#15 lore raw

PATCH 16/23 gnome-keyring: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb +3 -1
index fd6ca73..9d85c65 100644
@@ -13,7 +13,9 @@ SECTION = "x11/gnome"
 
 PR = "r12"
 
-inherit autotools gnome gtk-doc pkgconfig gsettings
+inherit distro_features_check autotools gnome gtk-doc pkgconfig gsettings
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI += "file://egg-asn1x.patch \
             file://musl.patch \
Signature · 1 line
2.7.4
#16 lore raw

PATCH 17/23 libgtkstylus: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/libgtkstylus/libgtkstylus_0.5.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/libgtkstylus/libgtkstylus_0.5.bb +3 -1
index 3cd7910..a7c8a6f 100644
@@ -5,7 +5,9 @@ LICENSE = "LGPL-2.0+"
 LIC_FILES_CHKSUM = "file://tap.c;beginline=1;endline=20;md5=71756eeb144e9eeb177c69aa672b1635"
 PR = "r4"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://burtonini.com/temp/${BP}.tar.gz \
     file://gtkstylus.sh"
Signature · 1 line
2.7.4
#17 lore raw

PATCH 18/23 glade3: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-devtools/glade/glade3_3.8.5.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-devtools/glade/glade3_3.8.5.bb +3 -1
index 69162bd..6667e29 100644
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \
                     file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475"
 DEPENDS = "gtk+ gnome-doc-utils gnome-common libxml2 intltool-native"
 
-inherit autotools pkgconfig pythonnative gtk-icon-cache
+inherit distro_features_check autotools pkgconfig pythonnative gtk-icon-cache
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade3/3.8/glade3-${PV}.tar.xz \
            file://0001-gnome-doc-utils.make-sysrooted-pkg-config.patch \
Signature · 1 line
2.7.4
#18 lore raw

PATCH 19/23 libgnomecanvas: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/libgnome/libgnomecanvas_2.30.3.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/libgnome/libgnomecanvas_2.30.3.bb +3 -1
index 41a89ce..f21cc5e 100644
@@ -3,7 +3,9 @@ LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605"
 SECTION = "x11/gnome/libs"
 
-inherit gnomebase gtk-doc
+inherit distro_features_check gnomebase gtk-doc
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 # intltool to provide IT_PROG_INTLTOOL
 # configure: line 12654: syntax error near unexpected token `0.35.0'
Signature · 1 line
2.7.4
#19 lore raw

PATCH 20/23 libgnomeui: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/libgnome/libgnomeui_2.24.5.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/libgnome/libgnomeui_2.24.5.bb +3 -1
index b78ffc5..ff8a680 100644
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605"
 SECTION = "x11/gnome/libs"
 DEPENDS = "libgnome libgnomecanvas libbonoboui libgnome-keyring intltool-native gnome-common-native"
 
-inherit gnome
+inherit distro_features_check gnome
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 FILES_${PN} += "${libdir}/gtk-2.0/*/filesystems/lib*.so \
                 ${libdir}/libglade/*/lib*.so \
Signature · 1 line
2.7.4
#20 lore raw

PATCH 21/23 libbonoboui: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/bonobo/libbonoboui_2.24.5.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/bonobo/libbonoboui_2.24.5.bb +3 -1
index b3ca0a4..8e3169e 100644
@@ -3,7 +3,9 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
 
-inherit gnomebase pkgconfig gtk-doc
+inherit distro_features_check gnomebase pkgconfig gtk-doc
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI += "file://gcc5.patch \
             file://0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch \
Signature · 1 line
2.7.4
#21 lore raw

PATCH 22/23 libgdata: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/libgdata/libgdata_0.16.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/libgdata/libgdata_0.16.1.bb +3 -1
index 9b02512..80cbae3 100644
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24 \
 
 DEPENDS = "gnome-common-native libxml2 glib-2.0 libsoup-2.4 intltool-native liboauth gcr json-glib"
 
-inherit gnomebase pkgconfig autotools-brokensep gettext gtk-doc vala gobject-introspection
+inherit distro_features_check gnomebase pkgconfig autotools-brokensep gettext gtk-doc vala gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_configure_prepend_class-target () {
     # introspection.m4 pre-packaged with upstream tarballs does not yet
Signature · 1 line
2.7.4
#22 lore raw

PATCH 23/23 gnome-themes: only include when x11 in DISTRO_FEATURES

In reply to Armin Kuster
---
 meta-gnome/recipes-gnome/themes/gnome-themes_2.32.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/themes/gnome-themes_2.32.1.bb +3 -1
index 1a89f48..c1ecc23 100644
@@ -15,7 +15,9 @@ EXTRA_OECONF += "--enable-all-themes \
     --with-iconmap=${STAGING_LIBEXECDIR_NATIVE}/icon-name-mapping \
 "
 
-inherit gnomebase perlnative
+inherit distro_features_check gnomebase perlnative
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGES =+ " gnome-theme-crux gnome-theme-highcontrast gnome-theme-highcontrastinverse gnome-theme-highcontrastlargeprint gnome-theme-highcontrastlargeprintinverse gnome-theme-largeprint gnome-theme-mist"
 FILES_gnome-theme-crux = "${datadir}/themes/Crux ${datadir}/icons/Crux"
Signature · 1 line
2.7.4
#23 lore raw
In reply to Armin Kuster

Hi Armin,

Just a minor copy-paste error bellow...

Quoted 30 lines · Armin Kuster

Idea taken from meta-virt

Add a new class, sanity-meta-gnome.bbclass, to check for whether necessary settings are available for bbappend files in this layer to be effective, and warn users if not.

In addition, a variable SKIP_SANITY_BBAPPEND_CHECK is added to enable users to explicitly skip the checking to avoid unwanted warnings.

---
  meta-gnome/README                            | 23 +++++++++++++++++++++++
  meta-gnome/classes/sanity-meta-gnome.bbclass | 10 ++++++++++
  meta-gnome/conf/layer.conf                   |  4 ++++
  3 files changed, 37 insertions(+)

create mode 100644 meta-gnome/classes/sanity-meta-gnome.bbclass

meta-gnome/README +8 -0
index 0c4fbd2..ef3a6f3 100644
@@ -1,3 +1,25 @@
+meta-gnome
+===========
+
+The recipe in this layer needs to have 'x11' in DISTRO_FEATURES
+to have effect. To enable them, add in configuration file the following line.
+
+  DISTRO_FEATURES_append = " x11"
+

meta-gnome/README line 18

Quoted 10 lines
meta-gnome/README +10 -0
+If meta-gnome is included, but x11 is not enabled as a
+distro feature a warning is printed at parse time:
+
+    You have included the meta-gnome layer, but
+    'x11' has not been enabled in your DISTRO_FEATURES.
+
+If you know what you are doing, this warning can be disabled by setting the following
+variable in your configuration:
+
+  SKIP_META_VIRT_SANITY_CHECK = 1

I think this should be "SKIP_META_GNOME_SANITY_CHECK".

// Martin

Quoted 41 lines
meta-gnome/README +5 -0
+
+
+Dependencies
+------------
  This layer depends on:
 
  URI: git://github.com/openembedded/oe-core.git
@@ -14,3 +36,4 @@ When sending single patches, please using something like:
  'git send-email -M -1 --to [email protected] --subject-prefix=meta-gnome][PATCH'
 
  Interim layer maintainer: Martin Jansa <[email protected]>
+
meta-gnome/classes/sanity-meta-gnome.bbclass new file +10 -0
new file mode 100644
index 0000000..331ea19
@@ -0,0 +1,10 @@
+addhandler gnome_bbappend_distrocheck
+gnome_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck"
+python gnome_bbappend_distrocheck() {
+    skip_check = e.data.getVar('SKIP_META_GNOME_SANITY_CHECK') == "1"
+    if 'x11' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
+        bb.warn("You have included the meta-gnome layer, but \
+'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
+may not take effect. See the meta-gnome README for details on enabling \
+meta-gnome support.")
+}
meta-gnome/conf/layer.conf +4 -0
index fb89c14..37215a7 100644
@@ -13,3 +13,7 @@ BBFILE_PRIORITY_gnome-layer = "7"
  LAYERVERSION_gnome-layer = "1"
 
  LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
+
+# Sanity check for meta-gnome layer.
+# Setting SKIP_META_GNOME_SANITY_CHECK to "1" would skip the bbappend files check.
+INHERIT += "sanity-meta-gnome"