Patchwork [CONSOLIDATED,PULL,26/27] ofono: conditionally enable bluetooth

login
register
mail settings
Submitter Saul Wold
Date Aug. 17, 2011, 6:26 a.m.
Message ID <23dc421a0943b13259fe4d86086427bdde8c1ade.1313560883.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/10061/
State New, archived
Headers show

Comments

Saul Wold - Aug. 17, 2011, 6:26 a.m.
From: Anders Darander <anders@chargestorm.se>

Use DISTRO_FEATURE to conditionally depend on bluez4, as well as enabling bluetooth.

Signed-off-by: Anders Darander <anders@chargestorm.se>
---
 meta/recipes-connectivity/ofono/ofono.inc     |    3 ++-
 meta/recipes-connectivity/ofono/ofono_0.50.bb |    1 +
 meta/recipes-connectivity/ofono/ofono_git.bb  |    4 ++++
 3 files changed, 7 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
index a14b35a..ab233dc 100644
--- a/meta/recipes-connectivity/ofono/ofono.inc
+++ b/meta/recipes-connectivity/ofono/ofono.inc
@@ -7,7 +7,8 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
 
 inherit autotools pkgconfig update-rc.d
 
-DEPENDS  = "dbus glib-2.0 udev bluez4"
+BLUEZDEPENDS = "bluez4"
+DEPENDS  = "dbus glib-2.0 udev ${@base_contains('DISTRO_FEATURES', 'bluetooth','${BLUEZDEPENDS}', '', d)}"
 
 INITSCRIPT_NAME = "ofono"
 INITSCRIPT_PARAMS = "defaults 22"
diff --git a/meta/recipes-connectivity/ofono/ofono_0.50.bb b/meta/recipes-connectivity/ofono/ofono_0.50.bb
index ef4fbf0..b679200 100644
--- a/meta/recipes-connectivity/ofono/ofono_0.50.bb
+++ b/meta/recipes-connectivity/ofono/ofono_0.50.bb
@@ -7,6 +7,7 @@  SRC_URI  = "${KERNELORG_MIRROR}/linux/network/ofono/${BPN}-${PV}.tar.bz2 \
 
 EXTRA_OECONF += "\
     --enable-test \
+    ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
 "
 
 SRC_URI[md5sum] = "b2656fd0bbf33f926fc86c1e8915d697"
diff --git a/meta/recipes-connectivity/ofono/ofono_git.bb b/meta/recipes-connectivity/ofono/ofono_git.bb
index dbad5a1..f1770c2 100644
--- a/meta/recipes-connectivity/ofono/ofono_git.bb
+++ b/meta/recipes-connectivity/ofono/ofono_git.bb
@@ -10,6 +10,10 @@  PR = "r1"
 SRC_URI  = "git://git.kernel.org/pub/scm/network/ofono/ofono.git;protocol=git \
 	    file://ofono"
 
+EXTRA_OECONF += "\
+    ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
+"
+
 do_configure_prepend () {
   ${S}/bootstrap
 }