Patchwork [4/5] gtk-icon-cache.bbclass: don't add dependencies or hooks unless x11 is defined

login
register
mail settings
Submitter Andreas Oberritter
Date Feb. 22, 2012, 11:26 a.m.
Message ID <1329910007-8441-5-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/21571/
State New
Headers show

Comments

Andreas Oberritter - Feb. 22, 2012, 11:26 a.m.
* Drop dependency on GNOME if x11 is disabled.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/classes/gtk-icon-cache.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index 0204fd3..cf5907b 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -1,6 +1,6 @@ 
 FILES_${PN} += "${datadir}/icons/hicolor"
 
-DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']}"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'x11', ['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme'], '', d)}"
 
 # This could run on the host as icon cache files are architecture independent,
 # but there is no gtk-update-icon-cache built natively.
@@ -28,6 +28,9 @@  done
 }
 
 python populate_packages_append () {
+	if not oe.utils.contains('DISTRO_FEATURES', 'x11', True, False, d):
+		return
+
 	packages = d.getVar('PACKAGES', 1).split()
 	pkgdest =  d.getVar('PKGDEST', 1)