Patchwork [PATCHv2] connman: add PACKAGECONFIG options

login
register
mail settings
Submitter ml@communistcode.co.uk
Date April 26, 2013, 10:54 a.m.
Message ID <1366973665-8779-1-git-send-email-ml@communistcode.co.uk>
Download mbox | patch
Permalink /patch/48931/
State New
Headers show

Comments

ml@communistcode.co.uk - April 26, 2013, 10:54 a.m.
From: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>

- change TIST from being explicitly built, to a PACKAGECONFIG
- move wifi, 3g and bluetooth to PACKAGECONFIG

Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
---

Runtime tested on beaglebone armv7a without wifi, 3g or bluetooth support.

Runtime tested with and without TIST support.

 meta/recipes-connectivity/connman/connman.inc | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
Martin Jansa - April 26, 2013, 11:04 a.m.
On Fri, Apr 26, 2013 at 11:54:25AM +0100, Jack Mitchell wrote:
> From: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
> 
> - change TIST from being explicitly built, to a PACKAGECONFIG
> - move wifi, 3g and bluetooth to PACKAGECONFIG
> 
> Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
> ---
> 
> Runtime tested on beaglebone armv7a without wifi, 3g or bluetooth support.
> 
> Runtime tested with and without TIST support.
> 
>  meta/recipes-connectivity/connman/connman.inc | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
> index 589ece8..5fcffc4 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -13,17 +13,9 @@ LICENSE  = "GPLv2"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
>                      file://src/main.c;beginline=1;endline=20;md5=d6a1ac98a6791c5294e8a7f176ecd66d"
>  
> -# we need to define the depends here, the dynamic stuff is too late
> -DEPENDS  = "dbus glib-2.0 ppp iptables gnutls \
> -            ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluez4', '', d)} \
> -            ${@base_contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
> -            ${@base_contains('DISTRO_FEATURES', '3g','ofono', '', d)} \
> -            "
> +DEPENDS  = "dbus glib-2.0 ppp iptables gnutls"
>  
> -INC_PR = "r19"
> -
> -TIST = "--enable-tist"
> -TIST_powerpc = ""
> +INC_PR = "r20"
>  
>  EXTRA_OECONF += "\
>      ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
> @@ -32,9 +24,6 @@ EXTRA_OECONF += "\
>      --enable-threads \
>      --enable-loopback \
>      --enable-ethernet \
> -    ${@base_contains('DISTRO_FEATURES', 'wifi','--enable-wifi ${TIST}', '--disable-wifi', d)} \
> -    ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth ${TIST}', '--disable-bluetooth', d)} \
> -    ${@base_contains('DISTRO_FEATURES', '3g', '--enable-ofono', '--disable-ofono', d)} \
>      --enable-tools \
>      --enable-test \
>      --disable-polkit \
> @@ -43,6 +32,17 @@ EXTRA_OECONF += "\
>      ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
>  "
>  
> +PACKAGECONFIG ??= "\
> +                   ${@base_contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \
> +                   ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
> +                   ${@base_contains('DISTRO_FEATURES', '3g','3g', '', d)} \
> +"
> +
> +PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant"
> +PACKAGECONFIG[bluetooth] = "--enable-bluetooth, --disable-bluetooth, bluez4"
> +PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono"
> +PACKAGECONFIG[tist] = "--enable-tist,,"
> +
>  INITSCRIPT_NAME = "connman"
>  INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."

There are few DISTRO_FEATURES conditional left, I think it would be
better to use base_contains('PACKAGECONFIG',.. there to be able to
define PACKAGECONFIG = "foo" only in .bbappend.

RPROVIDES:
-${@base_contains('DISTRO_FEATURES', 'bluetooth','connman-plugin-bluetooth', '', d)} \
+${@base_contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
etc should probably work

Thanks for doing it!

Cheers,

>  
> -- 
> 1.8.2.1
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Ross Burton - April 26, 2013, 11:15 a.m.
On 26 April 2013 11:54, Jack Mitchell <ml@communistcode.co.uk> wrote:
> +PACKAGECONFIG[tist] = "--enable-tist,,"

Please also --disable-tist so it's explicit as to what's happening.

Ross

Patch

diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 589ece8..5fcffc4 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -13,17 +13,9 @@  LICENSE  = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://src/main.c;beginline=1;endline=20;md5=d6a1ac98a6791c5294e8a7f176ecd66d"
 
-# we need to define the depends here, the dynamic stuff is too late
-DEPENDS  = "dbus glib-2.0 ppp iptables gnutls \
-            ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluez4', '', d)} \
-            ${@base_contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
-            ${@base_contains('DISTRO_FEATURES', '3g','ofono', '', d)} \
-            "
+DEPENDS  = "dbus glib-2.0 ppp iptables gnutls"
 
-INC_PR = "r19"
-
-TIST = "--enable-tist"
-TIST_powerpc = ""
+INC_PR = "r20"
 
 EXTRA_OECONF += "\
     ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
@@ -32,9 +24,6 @@  EXTRA_OECONF += "\
     --enable-threads \
     --enable-loopback \
     --enable-ethernet \
-    ${@base_contains('DISTRO_FEATURES', 'wifi','--enable-wifi ${TIST}', '--disable-wifi', d)} \
-    ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth ${TIST}', '--disable-bluetooth', d)} \
-    ${@base_contains('DISTRO_FEATURES', '3g', '--enable-ofono', '--disable-ofono', d)} \
     --enable-tools \
     --enable-test \
     --disable-polkit \
@@ -43,6 +32,17 @@  EXTRA_OECONF += "\
     ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
 "
 
+PACKAGECONFIG ??= "\
+                   ${@base_contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \
+                   ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
+                   ${@base_contains('DISTRO_FEATURES', '3g','3g', '', d)} \
+"
+
+PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant"
+PACKAGECONFIG[bluetooth] = "--enable-bluetooth, --disable-bluetooth, bluez4"
+PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono"
+PACKAGECONFIG[tist] = "--enable-tist,,"
+
 INITSCRIPT_NAME = "connman"
 INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."