[meta-oe] mpg123: add PACKAGECONFIG for pulseaudio and alsa

Submitted by Eren Türkay on Aug. 23, 2013, 2:18 p.m.

Details

Message ID 1377267483-7785-1-git-send-email-eren@hambedded.org
State Accepted, archived
Commit 06673b1e9d8ff4f5f11f01c763e4a6f841836cf4
Headers show

Commit Message

Eren Türkay Aug. 23, 2013, 2:18 p.m.
The default DISTRO_FEATURES include alsa and pulseaudio at the same
time. Hence, both of the options are enabled in mpg123 configuration
without adding related dependencies, which causes build error.

Make the options mutually exclusive through PACKAGECONFIG.  If both alsa
and pulseaudio are specified, pulseaudio takes precedence.

Signed-off-by: Eren Türkay <eren@hambedded.org>
---
 .../recipes-multimedia/mpg123/mpg123_1.15.3.bb     |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb b/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb
index 595235c..0075427 100644
--- a/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb
+++ b/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb
@@ -6,6 +6,14 @@  HOMEPAGE = "http://mpg123.de/"
 BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
 SECTION = "multimedia"
 
+# The options should be mutually exclusive for configuration script.
+# If both alsa and pulseaudio are specified (as in the default distro features)
+# pulseaudio takes precedence.
+PACKAGECONFIG_ALSA = "${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
+PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
+PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
+
 LICENSE = "LGPLv2.1"
 LICENSE_FLAGS = "commercial"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a7aa23a2b646eca38ad4eeb7a853761c"
@@ -23,7 +31,5 @@  EXTRA_OECONF = " \
     --enable-shared \
     ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
     ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '--with-default-audio=alsa', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', '--with-default-audio=pulse', '', d)} \
 "
 

Comments

Martin Jansa Sept. 3, 2013, 5:58 p.m.
On Fri, Aug 23, 2013 at 05:18:03PM +0300, Eren Türkay wrote:
> The default DISTRO_FEATURES include alsa and pulseaudio at the same
> time. Hence, both of the options are enabled in mpg123 configuration
> without adding related dependencies, which causes build error.
> 
> Make the options mutually exclusive through PACKAGECONFIG.  If both alsa
> and pulseaudio are specified, pulseaudio takes precedence.

Applied, thanks!

> 
> Signed-off-by: Eren Türkay <eren@hambedded.org>
> ---
>  .../recipes-multimedia/mpg123/mpg123_1.15.3.bb     |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb b/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb
> index 595235c..0075427 100644
> --- a/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb
> +++ b/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.15.3.bb
> @@ -6,6 +6,14 @@ HOMEPAGE = "http://mpg123.de/"
>  BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
>  SECTION = "multimedia"
>  
> +# The options should be mutually exclusive for configuration script.
> +# If both alsa and pulseaudio are specified (as in the default distro features)
> +# pulseaudio takes precedence.
> +PACKAGECONFIG_ALSA = "${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
> +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
> +PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
> +PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
> +
>  LICENSE = "LGPLv2.1"
>  LICENSE_FLAGS = "commercial"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=a7aa23a2b646eca38ad4eeb7a853761c"
> @@ -23,7 +31,5 @@ EXTRA_OECONF = " \
>      --enable-shared \
>      ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
>      ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
> -    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '--with-default-audio=alsa', '', d)} \
> -    ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', '--with-default-audio=pulse', '', d)} \
>  "
>  
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel