Patchwork [v2] bluez4: make alsa support conditional upon DISTRO_FEATURES

login
register
mail settings
Submitter Jonas Danielsson
Date April 19, 2012, 8:13 a.m.
Message ID <20120419081315.GA22585@jkd-desktop>
Download mbox | patch
Permalink /patch/26151/
State New
Headers show

Comments

Jonas Danielsson - April 19, 2012, 8:13 a.m.
Do not enable alsa in bluez4 unless it's included in DISTRO_FEATURES.

Signed-off-by: Jonas Danielsson <jonas.danielsson@lundinova.se>
---
 meta/recipes-connectivity/bluez/bluez4.inc     |    9 +++++++--
 meta/recipes-connectivity/bluez/bluez4_4.99.bb |    3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)
Martin Jansa - April 19, 2012, 8:19 a.m.
On Thu, Apr 19, 2012 at 10:13:15AM +0200, Jonas Danielsson wrote:
> 
> 
> Do not enable alsa in bluez4 unless it's included in DISTRO_FEATURES.
> 
> Signed-off-by: Jonas Danielsson <jonas.danielsson@lundinova.se>
> ---
>  meta/recipes-connectivity/bluez/bluez4.inc     |    9 +++++++--
>  meta/recipes-connectivity/bluez/bluez4_4.99.bb |    3 ++-
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/bluez/bluez4.inc b/meta/recipes-connectivity/bluez/bluez4.inc
> index fbbe0bf..40e8543 100644
> --- a/meta/recipes-connectivity/bluez/bluez4.inc
> +++ b/meta/recipes-connectivity/bluez/bluez4.inc
> @@ -7,9 +7,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
>                      file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
>                      file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e \
>                      file://sbc/sbc.c;beginline=1;endline=25;md5=1a40781ed30d50d8639323a184aeb191"
> -DEPENDS = "udev alsa-lib libusb dbus-glib glib-2.0 libcheck"
> +DEPENDS = "\
> +  udev ${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa-lib', '', d)} \

this ^ is not needed anymore

> +  libusb dbus-glib glib-2.0 libcheck \
> +  "
>  RDEPENDS_${PN}-dev = "bluez-hcidump"
>  
> +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
> +PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
> +
>  ASNEEDED = ""
>  
>  SRC_URI = "\
> @@ -21,7 +27,6 @@ inherit autotools
>  
>  EXTRA_OECONF = "\
>    --disable-gstreamer \
> -  --enable-alsa \
>    --enable-usb \
>    --enable-tools \
>    --enable-bccmd \
> diff --git a/meta/recipes-connectivity/bluez/bluez4_4.99.bb b/meta/recipes-connectivity/bluez/bluez4_4.99.bb
> index 5033d34..32831e7 100644
> --- a/meta/recipes-connectivity/bluez/bluez4_4.99.bb
> +++ b/meta/recipes-connectivity/bluez/bluez4_4.99.bb
> @@ -1,6 +1,6 @@
>  require bluez4.inc
>  
> -PR = "r1"
> +PR = "r2"
>  
>  SRC_URI += "file://bluetooth.conf \
>              file://sbc_mmx.patch \
> @@ -19,6 +19,7 @@ do_install_append() {
>  
>  RDEPENDS_${PN}-dev = "bluez-hcidump"
>  
> +ALLOW_EMPTY_libasound-module-bluez = "1"
>  PACKAGES =+ "libasound-module-bluez"
>  
>  FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-connectivity/bluez/bluez4.inc b/meta/recipes-connectivity/bluez/bluez4.inc
index fbbe0bf..40e8543 100644
--- a/meta/recipes-connectivity/bluez/bluez4.inc
+++ b/meta/recipes-connectivity/bluez/bluez4.inc
@@ -7,9 +7,15 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
                     file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e \
                     file://sbc/sbc.c;beginline=1;endline=25;md5=1a40781ed30d50d8639323a184aeb191"
-DEPENDS = "udev alsa-lib libusb dbus-glib glib-2.0 libcheck"
+DEPENDS = "\
+  udev ${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa-lib', '', d)} \
+  libusb dbus-glib glib-2.0 libcheck \
+  "
 RDEPENDS_${PN}-dev = "bluez-hcidump"
 
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+
 ASNEEDED = ""
 
 SRC_URI = "\
@@ -21,7 +27,6 @@  inherit autotools
 
 EXTRA_OECONF = "\
   --disable-gstreamer \
-  --enable-alsa \
   --enable-usb \
   --enable-tools \
   --enable-bccmd \
diff --git a/meta/recipes-connectivity/bluez/bluez4_4.99.bb b/meta/recipes-connectivity/bluez/bluez4_4.99.bb
index 5033d34..32831e7 100644
--- a/meta/recipes-connectivity/bluez/bluez4_4.99.bb
+++ b/meta/recipes-connectivity/bluez/bluez4_4.99.bb
@@ -1,6 +1,6 @@ 
 require bluez4.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI += "file://bluetooth.conf \
             file://sbc_mmx.patch \
@@ -19,6 +19,7 @@  do_install_append() {
 
 RDEPENDS_${PN}-dev = "bluez-hcidump"
 
+ALLOW_EMPTY_libasound-module-bluez = "1"
 PACKAGES =+ "libasound-module-bluez"
 
 FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"