Skip to contentSkip to conversation

connman: conditionally enable bluetooth and wifi

PATCH Superseded Anders Darander 2 participants 4 messages Aug 16, 2011 – Aug 17, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover connman: conditionally enable bluetooth and wifi

Let connman depend and enable wifi and bluetooth, only when these are set in the DISTRO_FEATURES.

This reduces build-time, and make a non-x11 build succeed, as bluez4 currently depends on x11 through a dependency chain. (This could/should be fixed in a later patch).

The following changes since commit 6d424db5a0f952956a218e82a3ef0c43ebaafd5a:

xcb: add missing bbappends (2011-08-16 13:07:31 +0200)

are available in the git repository at:
git://github.com/darander/meta-oe connman
https://github.com/darander/meta-oe/tree/connman

Anders Darander (1):
connman: conditionally enable wifi and bluetooth

 meta-oe/recipes-connectivity/connman/connman.inc   |    7 ++++++-
 .../recipes-connectivity/connman/connman_0.76.bb   |    4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 connman: conditionally enable wifi and bluetooth

Use DISTRO_FEATURES to conditionally depend and enable wifi and bluetooth.

---
 meta-oe/recipes-connectivity/connman/connman.inc   |    7 ++++++-
 .../recipes-connectivity/connman/connman_0.76.bb   |    4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)
meta-oe/recipes-connectivity/connman/connman.inc +6 -1
index 2652125..284edd2 100644
@@ -14,7 +14,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://src/main.c;beginline=1;endline=20;md5=4b55b550fa6b33cc2055ef30dd262b3e"
 
 # we need to define the depends here, the dynamic stuff is too late
-DEPENDS  = "wpa-supplicant dbus glib-2.0 ppp busybox dhcp resolvconf bluez4 iptables gnutls ntp"
+BLUEZDEPENDS = "bluez4"
+WIFIDEPENDS = "wpa-supplicant"
+DEPENDS  = "dbus glib-2.0 ppp busybox dhcp resolvconf iptables gnutls ntp \
+            ${@base_contains('DISTRO_FEATURES', 'bluetooth','${BLUEZDEPENDS}', '', d)} \
+            ${@base_contains('DISTRO_FEATURES', 'wifi','${WIFIDEPENDS}', '', d)} \
+            "
 
 EXTRA_OECONF += "\
     ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \
meta-oe/recipes-connectivity/connman/connman_0.76.bb +2 -2
index cb84caa..abae73a 100644
@@ -6,8 +6,8 @@ EXTRA_OECONF += "\
   --enable-threads \
   --enable-loopback \
   --enable-ethernet \
-  --enable-wifi \
-  --enable-bluetooth \
+  ${@base_contains('DISTRO_FEATURES', 'wifi','--enable-wifi', '--disable-wifi', d)} \
+  ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
   --enable-ofono \
   --enable-tools \
   --disable-polkit \
Signature · 1 line
1.7.5.4
#2 lore raw

Re: [meta-oe][PATCH 1/1] connman: conditionally enable wifi and bluetooth

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 16-08-11 15:38, Anders Darander schreef:

Quoted 9 lines

Use DISTRO_FEATURES to conditionally depend and enable wifi and bluetooth.

meta-oe/recipes-connectivity/connman/connman.inc index 2652125..284edd2 100644 --- a/meta-oe/recipes-connectivity/connman/connman.inc +++ b/meta-oe/recipes-connectivity/connman/connman.inc @@ -14,7 +14,12 @@ LIC_FILES_CHKSUM = renamed from meta-oe/recipes-connectivity/connman/connman.inc +0 -0

"file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://src/main.c;beginline=1;endline=20;md5=4b55b550fa6b33cc2055ef30dd262b3e"

# we need to define the depends here, the dynamic stuff is too late -DEPENDS  = "wpa-supplicant dbus glib-2.0 ppp busybox dhcp resolvconf bluez4 iptables gnutls ntp" +BLUEZDEPENDS = "bluez4" +WIFIDEPENDS = "wpa-supplicant" +DEPENDS  = "dbus glib-2.0 ppp busybox dhcp resolvconf iptables gnutls ntp
\ +            ${@base_contains('DISTRO_FEATURES', 'bluetooth','${BLUEZDEPENDS}', '', d)} \ +            ${@base_contains('DISTRO_FEATURES', 'wifi','${WIFIDEPENDS}', '', d)} \

Are those helper vars really needed?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFOSo5NMkyGM64RGpERAjb6AJ9pUdvD2Ida/gShyst/YrVgUfvflwCgkz3y afoEW11A6q6GHXyJJer6NfM=
=OXpK
-----END PGP SIGNATURE-----

#3 lore raw

Re: [meta-oe][PATCH 1/1] connman: conditionally enable wifi and bluetooth

Quoted 5 lines · Koen Kooi

Op 16-08-11 15:38, Anders Darander schreef:

Quoted 4 lines

Use DISTRO_FEATURES to conditionally depend and enable wifi and bluetooth.

Quoted 7 lines
Quoted 5 lines
meta-oe/recipes-connectivity/connman/connman.inc index 2652125..284edd2 100644 --- a/meta-oe/recipes-connectivity/connman/connman.inc +++ b/meta-oe/recipes-connectivity/connman/connman.inc @@ -14,7 +14,12 @@ LIC_FILES_CHKSUM = renamed from meta-oe/recipes-connectivity/connman/connman.inc +0 -0

"file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://src/main.c;beginline=1;endline=20;md5=4b55b550fa6b33cc2055ef30dd262b3e"

# we need to define the depends here, the dynamic stuff is too late -DEPENDS  = "wpa-supplicant dbus glib-2.0 ppp busybox dhcp resolvconf bluez4 iptables gnutls ntp" +BLUEZDEPENDS = "bluez4" +WIFIDEPENDS = "wpa-supplicant" +DEPENDS  = "dbus glib-2.0 ppp busybox dhcp resolvconf iptables gnutls ntp
\ +            ${@base_contains('DISTRO_FEATURES', 'bluetooth','${BLUEZDEPENDS}', '', d)} \ +            ${@base_contains('DISTRO_FEATURES', 'wifi','${WIFIDEPENDS}', '', d)} \

Are those helper vars really needed?

No, they're not strictly needed. I'll submit a new patch version without them.

Cheers,
Anders

Signature · 4 lines
Anders Darander
ChargeStorm AB		Tel: +46 702 44 84 36
Laxholmstorget 3	Email: [email protected]
602 21 Norrköping	Web: www.chargestorm.se