Patchwork gstreamer: make pulseaudio support dependent on DISTRO_FEATURES

login
register
mail settings
Submitter Paul Eggleton
Date Sept. 26, 2012, 11:34 a.m.
Message ID <1348659245-14209-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/37261/
State New
Headers show

Comments

Paul Eggleton - Sept. 26, 2012, 11:34 a.m.
This should be no change to the previous situation unless you
explicitly have pulseaudio in DISTRO_FEATURES_BACKFILL_CONSIDERED
(currently).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../gstreamer/gst-plugins-good_0.10.31.bb          |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Martin Jansa - Sept. 26, 2012, 11:38 a.m.
On Wed, Sep 26, 2012 at 12:34:05PM +0100, Paul Eggleton wrote:
> This should be no change to the previous situation unless you
> explicitly have pulseaudio in DISTRO_FEATURES_BACKFILL_CONSIDERED
> (currently).

Why not use PACKAGECONFIG for this?


Cheers,

> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  .../gstreamer/gst-plugins-good_0.10.31.bb          |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
> index 641de7c..07fda87 100644
> --- a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
> +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
> @@ -6,15 +6,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
>                      file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
>  
>  DEPENDS += "gst-plugins-base gconf cairo jpeg libpng zlib libid3tag flac \
> -	    speex libsoup-2.4 pulseaudio"
> -PR = "r5"
> +            speex libsoup-2.4 \
> +            ${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
> +
> +PR = "r6"
>  
>  inherit gettext gconf
>  
>  SRC_URI += "file://0001-v4l2-fix-build-with-recent-kernels-the-v4l2_buffer-i.patch"
>  
>  EXTRA_OECONF += "--disable-aalib --disable-esd --disable-shout2 --disable-libcaca --disable-hal --without-check \
> -                 --disable-orc --disable-examples"
> +                 --disable-orc --disable-examples \
> +                 ${@base_contains('DISTRO_FEATURES', 'pulseaudio', '--enable-pulse', '--disable-pulse', d)}"
>  
>  do_configure_prepend() {
>  	# This m4 file contains nastiness which conflicts with libtool 2.2.2
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Paul Eggleton - Sept. 26, 2012, 12:31 p.m.
On Wednesday 26 September 2012 13:38:19 Martin Jansa wrote:
> On Wed, Sep 26, 2012 at 12:34:05PM +0100, Paul Eggleton wrote:
> > This should be no change to the previous situation unless you
> > explicitly have pulseaudio in DISTRO_FEATURES_BACKFILL_CONSIDERED
> > (currently).
> 
> Why not use PACKAGECONFIG for this?

Only because I didn't see the need complicate it just to be able to configure 
it on a per-recipe basis - you almost certainly want pulseaudio either on or 
off everywhere. If you want it for stylistic reasons, sure, I guess... it is a 
bit ugly though.

Cheers,
Paul
Martin Jansa - Sept. 26, 2012, 12:32 p.m.
On Wed, Sep 26, 2012 at 01:31:10PM +0100, Paul Eggleton wrote:
> On Wednesday 26 September 2012 13:38:19 Martin Jansa wrote:
> > On Wed, Sep 26, 2012 at 12:34:05PM +0100, Paul Eggleton wrote:
> > > This should be no change to the previous situation unless you
> > > explicitly have pulseaudio in DISTRO_FEATURES_BACKFILL_CONSIDERED
> > > (currently).
> > 
> > Why not use PACKAGECONFIG for this?
> 
> Only because I didn't see the need complicate it just to be able to configure 
> it on a per-recipe basis - you almost certainly want pulseaudio either on or 
> off everywhere. If you want it for stylistic reasons, sure, I guess... it is a 
> bit ugly though.

Well it looked to me like ideal use-case for PACKAGECONFIG.
Paul Eggleton - Sept. 26, 2012, 1:24 p.m.
On Wednesday 26 September 2012 14:32:57 Martin Jansa wrote:
> On Wed, Sep 26, 2012 at 01:31:10PM +0100, Paul Eggleton wrote:
> > On Wednesday 26 September 2012 13:38:19 Martin Jansa wrote:
> > > On Wed, Sep 26, 2012 at 12:34:05PM +0100, Paul Eggleton wrote:
> > > > This should be no change to the previous situation unless you
> > > > explicitly have pulseaudio in DISTRO_FEATURES_BACKFILL_CONSIDERED
> > > > (currently).
> > > 
> > > Why not use PACKAGECONFIG for this?
> > 
> > Only because I didn't see the need complicate it just to be able to
> > configure it on a per-recipe basis - you almost certainly want pulseaudio
> > either on or off everywhere. If you want it for stylistic reasons, sure,
> > I guess... it is a bit ugly though.
> 
> Well it looked to me like ideal use-case for PACKAGECONFIG.

It does encapsulate the DEPENDS and EXTRA_OECONF into one piece, yes, but then 
when you make the PACKAGECONFIG option set from DISTRO_FEATURES anyway it gets 
ugly, and here I'm not convinced it adds anything useful.

FWIW, this also matches how the same configuration is implemented for Qt. If we 
want to switch everything over to PACKAGECONFIG later we can with no penalty.

Cheers,
Paul
Martin Jansa - Sept. 26, 2012, 1:30 p.m.
On Wed, Sep 26, 2012 at 02:24:07PM +0100, Paul Eggleton wrote:
> On Wednesday 26 September 2012 14:32:57 Martin Jansa wrote:
> > On Wed, Sep 26, 2012 at 01:31:10PM +0100, Paul Eggleton wrote:
> > > On Wednesday 26 September 2012 13:38:19 Martin Jansa wrote:
> > > > On Wed, Sep 26, 2012 at 12:34:05PM +0100, Paul Eggleton wrote:
> > > > > This should be no change to the previous situation unless you
> > > > > explicitly have pulseaudio in DISTRO_FEATURES_BACKFILL_CONSIDERED
> > > > > (currently).
> > > > 
> > > > Why not use PACKAGECONFIG for this?
> > > 
> > > Only because I didn't see the need complicate it just to be able to
> > > configure it on a per-recipe basis - you almost certainly want pulseaudio
> > > either on or off everywhere. If you want it for stylistic reasons, sure,
> > > I guess... it is a bit ugly though.
> > 
> > Well it looked to me like ideal use-case for PACKAGECONFIG.
> 
> It does encapsulate the DEPENDS and EXTRA_OECONF into one piece, yes, but then 
> when you make the PACKAGECONFIG option set from DISTRO_FEATURES anyway it gets 
> ugly, and here I'm not convinced it adds anything useful.

Yes, but that's the case for almost every other PACKAGECONFIG use in
oe-core too AFAIK and I was asked to convert similar commit to use
PACKAGECONFIG before so I was expecting that the ultimate goal is to
replace all such DISTRO_FEATURE tests with PACKAGECONFIG where possible,
not to add more of them.

Cheers,

> FWIW, this also matches how the same configuration is implemented for Qt. If we 
> want to switch everything over to PACKAGECONFIG later we can with no penalty.
> 
> Cheers,
> Paul
> 
> -- 
> 
> Paul Eggleton
> Intel Open Source Technology Centre
Paul Eggleton - Sept. 26, 2012, 1:45 p.m.
On Wednesday 26 September 2012 15:30:13 Martin Jansa wrote:
> On Wed, Sep 26, 2012 at 02:24:07PM +0100, Paul Eggleton wrote:
> > On Wednesday 26 September 2012 14:32:57 Martin Jansa wrote:
> > > On Wed, Sep 26, 2012 at 01:31:10PM +0100, Paul Eggleton wrote:
> > > > On Wednesday 26 September 2012 13:38:19 Martin Jansa wrote:
> > > > > On Wed, Sep 26, 2012 at 12:34:05PM +0100, Paul Eggleton wrote:
> > > > > > This should be no change to the previous situation unless you
> > > > > > explicitly have pulseaudio in DISTRO_FEATURES_BACKFILL_CONSIDERED
> > > > > > (currently).
> > > > > 
> > > > > Why not use PACKAGECONFIG for this?
> > > > 
> > > > Only because I didn't see the need complicate it just to be able to
> > > > configure it on a per-recipe basis - you almost certainly want
> > > > pulseaudio
> > > > either on or off everywhere. If you want it for stylistic reasons,
> > > > sure,
> > > > I guess... it is a bit ugly though.
> > > 
> > > Well it looked to me like ideal use-case for PACKAGECONFIG.
> > 
> > It does encapsulate the DEPENDS and EXTRA_OECONF into one piece, yes, but
> > then when you make the PACKAGECONFIG option set from DISTRO_FEATURES
> > anyway it gets ugly, and here I'm not convinced it adds anything useful.
> 
> Yes, but that's the case for almost every other PACKAGECONFIG use in
> oe-core too AFAIK and I was asked to convert similar commit to use
> PACKAGECONFIG before so I was expecting that the ultimate goal is to
> replace all such DISTRO_FEATURE tests with PACKAGECONFIG where possible,
> not to add more of them.

Perhaps. Well, I just noticed I need to correct the commit message anyway 
(it's a change to gst-plugins-good, not gstreamer) so given that I'll send a 
v2 using PACKAGECONFIG.

Cheers,
Paul

Patch

diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
index 641de7c..07fda87 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
@@ -6,15 +6,18 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
                     file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
 
 DEPENDS += "gst-plugins-base gconf cairo jpeg libpng zlib libid3tag flac \
-	    speex libsoup-2.4 pulseaudio"
-PR = "r5"
+            speex libsoup-2.4 \
+            ${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
+
+PR = "r6"
 
 inherit gettext gconf
 
 SRC_URI += "file://0001-v4l2-fix-build-with-recent-kernels-the-v4l2_buffer-i.patch"
 
 EXTRA_OECONF += "--disable-aalib --disable-esd --disable-shout2 --disable-libcaca --disable-hal --without-check \
-                 --disable-orc --disable-examples"
+                 --disable-orc --disable-examples \
+                 ${@base_contains('DISTRO_FEATURES', 'pulseaudio', '--enable-pulse', '--disable-pulse', d)}"
 
 do_configure_prepend() {
 	# This m4 file contains nastiness which conflicts with libtool 2.2.2