Patchwork [3/5] gconf.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-4-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/21573/
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/gconf.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index 7bfa871..5067abd 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -1,4 +1,4 @@ 
-DEPENDS += "gconf gconf-native"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'x11', 'gconf gconf-native', '', d)}"
 
 # This is referenced by the gconf m4 macros and would default to the value hardcoded
 # into gconf at compile time otherwise
@@ -31,6 +31,9 @@  done
 }
 
 python populate_packages_append () {
+	if not oe.utils.contains('DISTRO_FEATURES', 'x11', True, False, d):
+		return
+
 	import re
 	packages = d.getVar('PACKAGES', 1).split()
 	pkgdest =  d.getVar('PKGDEST', 1)