Patchwork [v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl

login
register
mail settings
Submitter Matthieu CRAPET
Date June 30, 2014, 2:23 p.m.
Message ID <1404138201-22662-1-git-send-email-Matthieu.Crapet@ingenico.com>
Download mbox | patch
Permalink /patch/74481/
State New
Headers show

Comments

Matthieu CRAPET - June 30, 2014, 2:23 p.m.
Dropped libvorvis dependency because there is already a (better) builtin vorbis codec.
Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).

Changes:
- add --enable-nonfree when faac or openssl are used
- add DESCRIPTION
- sort PACKAGECONFIG entries

Tested with libav-0.8.11 & libav-9.13.

Note: Be sure to have a recent version of bitbake (2014-06-11 or better) including this:
http://cgit.openembedded.org/bitbake/commit/?id=2e742c03e8dfdfa67899e7f5d579ed14bd87e139
It affects behavior of bb.utils.contains_any

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 meta/recipes-multimedia/libav/libav.inc | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)
Martin Jansa - June 30, 2014, 4:40 p.m.
On Mon, Jun 30, 2014 at 04:23:21PM +0200, Matthieu Crapet wrote:
> Dropped libvorvis dependency because there is already a (better) builtin vorbis codec.
> Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).
> Changes:
> - add --enable-nonfree when faac or openssl are used
> - add DESCRIPTION
> - sort PACKAGECONFIG entries
> 
> Tested with libav-0.8.11 & libav-9.13.
> 
> Note: Be sure to have a recent version of bitbake (2014-06-11 or better) including this:
> http://cgit.openembedded.org/bitbake/commit/?id=2e742c03e8dfdfa67899e7f5d579ed14bd87e139
> It affects behavior of bb.utils.contains_any
> 
> Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
> ---
>  meta/recipes-multimedia/libav/libav.inc | 30 ++++++++++++++++++++++--------
>  1 file changed, 22 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
> index a05a2a6..1d617a2 100644
> --- a/meta/recipes-multimedia/libav/libav.inc
> +++ b/meta/recipes-multimedia/libav/libav.inc
> @@ -1,6 +1,12 @@
> -SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video"
> +SUMMARY = "Open source audio and video processing tools and librairies"
> +DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \
> +               with a set of portable, functional and high-performance libraries for \
> +               dealing with multimedia formats of all sorts. It originates from the \
> +               FFmpeg codebase, but goes its own way these days, providing its users \
> +               with reliable releases and a clear vision how to go forward."
>  HOMEPAGE = "http://libav.org/"
>  SECTION = "libs"
> +
>  LICENSE = "GPLv2+"
>  LICENSE_FLAGS = "commercial"
>  
> @@ -9,7 +15,7 @@ PROVIDES = "ffmpeg"
>  
>  ARM_INSTRUCTION_SET = "arm"
>  
> -DEPENDS = "zlib libogg libvorbis libtheora yasm-native"
> +DEPENDS = "zlib libogg yasm-native"
>  
>  INC_PR = "r8"
>  
> @@ -23,21 +29,29 @@ BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
>  EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
>  EXTRA_FFCONF ?= ""
>  
> -PACKAGECONFIG ??= "bzip2 x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
> -PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
> +PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
>  PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
> -PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
> +PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
>  PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
> -PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
> -PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
> +PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
> +PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
>  PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
> -PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
> +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
> +PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
> +PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
> +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
> +PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
>  PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
> +PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
> +
> +# Check codecs that require --enable-nonfree
> +USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
>  
>  EXTRA_OECONF = " \
>      --enable-shared \
>      --enable-pthreads \
>      --enable-gpl \
> +    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \

cannot you just pass --enable-nonfree in faac and openssl PACKAGECONFIG?
In worse case when both are enabled the option will be added twice.

>      --enable-avfilter \
>      \
>      --cross-prefix=${TARGET_PREFIX} \
> -- 
> 2.0.0
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Matthieu CRAPET - July 1, 2014, 7:31 a.m.
Hi,

To summarize the situation:

This v2 patch works fine with an "old" bitbake (keeping the default PACKAGECONFIG).

But if user change PACKAGECONFIG  and adds "faac" or "openssl" (but not both),
the USE_NONFREE test will fail, so there will be a configure error.

Maybe could I add a comment inside the recipe ?

Regards,
M


-----Message d'origine-----
De : Martin Jansa [mailto:martin.jansa@gmail.com] 
Envoyé : lundi 30 juin 2014 18:41
À : Matthieu CRAPET
Cc : openembedded-core@lists.openembedded.org
Objet : Re: [OE-core] [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl

On Mon, Jun 30, 2014 at 04:23:21PM +0200, Matthieu Crapet wrote:
> Dropped libvorvis dependency because there is already a (better) builtin vorbis codec.
> Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).
> Changes:
> - add --enable-nonfree when faac or openssl are used
> - add DESCRIPTION
> - sort PACKAGECONFIG entries
> 
> Tested with libav-0.8.11 & libav-9.13.
> 
> Note: Be sure to have a recent version of bitbake (2014-06-11 or better) including this:
> http://cgit.openembedded.org/bitbake/commit/?id=2e742c03e8dfdfa67899e7
> f5d579ed14bd87e139 It affects behavior of bb.utils.contains_any
> 
> Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
> ---
>  meta/recipes-multimedia/libav/libav.inc | 30 
> ++++++++++++++++++++++--------
>  1 file changed, 22 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/recipes-multimedia/libav/libav.inc 
> b/meta/recipes-multimedia/libav/libav.inc
> index a05a2a6..1d617a2 100644
> --- a/meta/recipes-multimedia/libav/libav.inc
> +++ b/meta/recipes-multimedia/libav/libav.inc
> @@ -1,6 +1,12 @@
> -SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video"
> +SUMMARY = "Open source audio and video processing tools and librairies"
> +DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \
> +               with a set of portable, functional and high-performance libraries for \
> +               dealing with multimedia formats of all sorts. It originates from the \
> +               FFmpeg codebase, but goes its own way these days, providing its users \
> +               with reliable releases and a clear vision how to go forward."
>  HOMEPAGE = "http://libav.org/"
>  SECTION = "libs"
> +
>  LICENSE = "GPLv2+"
>  LICENSE_FLAGS = "commercial"
>  
> @@ -9,7 +15,7 @@ PROVIDES = "ffmpeg"
>  
>  ARM_INSTRUCTION_SET = "arm"
>  
> -DEPENDS = "zlib libogg libvorbis libtheora yasm-native"
> +DEPENDS = "zlib libogg yasm-native"
>  
>  INC_PR = "r8"
>  
> @@ -23,21 +29,29 @@ BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
>  EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
>  EXTRA_FFCONF ?= ""
>  
> -PACKAGECONFIG ??= "bzip2 x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
> -PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
> +PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
>  PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
> -PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
> +PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
>  PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
> -PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
> -PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
> +PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
> +PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
>  PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
> -PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
> +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
> +PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
> +PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
> +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
> +PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
>  PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
> +PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
> +
> +# Check codecs that require --enable-nonfree USE_NONFREE = 
> +"${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
>  
>  EXTRA_OECONF = " \
>      --enable-shared \
>      --enable-pthreads \
>      --enable-gpl \
> +    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', 
> + '', d)} \

cannot you just pass --enable-nonfree in faac and openssl PACKAGECONFIG?
In worse case when both are enabled the option will be added twice.

>      --enable-avfilter \
>      \
>      --cross-prefix=${TARGET_PREFIX} \
> --
> 2.0.0
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Koen Kooi - July 11, 2014, 6:36 a.m.
Op 30 jun. 2014, om 18:40 heeft Martin Jansa <martin.jansa@gmail.com> het volgende geschreven:

> On Mon, Jun 30, 2014 at 04:23:21PM +0200, Matthieu Crapet wrote:
>> Dropped libvorvis dependency because there is already a (better) builtin vorbis codec.
>> Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).
>> Changes:
>> - add --enable-nonfree when faac or openssl are used
>> - add DESCRIPTION
>> - sort PACKAGECONFIG entries
>> 
>> Tested with libav-0.8.11 & libav-9.13.
>> 
>> Note: Be sure to have a recent version of bitbake (2014-06-11 or better) including this:
>> http://cgit.openembedded.org/bitbake/commit/?id=2e742c03e8dfdfa67899e7f5d579ed14bd87e139
>> It affects behavior of bb.utils.contains_any
>> 
>> Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
>> ---
>> meta/recipes-multimedia/libav/libav.inc | 30 ++++++++++++++++++++++--------
>> 1 file changed, 22 insertions(+), 8 deletions(-)
>> 
>> diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
>> index a05a2a6..1d617a2 100644
>> --- a/meta/recipes-multimedia/libav/libav.inc
>> +++ b/meta/recipes-multimedia/libav/libav.inc
>> @@ -1,6 +1,12 @@
>> -SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video"
>> +SUMMARY = "Open source audio and video processing tools and librairies"
>> +DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \
>> +               with a set of portable, functional and high-performance libraries for \
>> +               dealing with multimedia formats of all sorts. It originates from the \
>> +               FFmpeg codebase, but goes its own way these days, providing its users \
>> +               with reliable releases and a clear vision how to go forward."
>> HOMEPAGE = "http://libav.org/"
>> SECTION = "libs"
>> +
>> LICENSE = "GPLv2+"
>> LICENSE_FLAGS = "commercial"
>> 
>> @@ -9,7 +15,7 @@ PROVIDES = "ffmpeg"
>> 
>> ARM_INSTRUCTION_SET = "arm"
>> 
>> -DEPENDS = "zlib libogg libvorbis libtheora yasm-native"
>> +DEPENDS = "zlib libogg yasm-native"
>> 
>> INC_PR = "r8"
>> 
>> @@ -23,21 +29,29 @@ BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
>> EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
>> EXTRA_FFCONF ?= ""
>> 
>> -PACKAGECONFIG ??= "bzip2 x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
>> -PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
>> +PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
>> PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
>> -PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
>> +PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
>> PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
>> -PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
>> -PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
>> +PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
>> +PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
>> PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
>> -PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
>> +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
>> +PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
>> +PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
>> +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
>> +PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
>> PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
>> +PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
>> +
>> +# Check codecs that require --enable-nonfree
>> +USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
>> 
>> EXTRA_OECONF = " \
>>     --enable-shared \
>>     --enable-pthreads \
>>     --enable-gpl \
>> +    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
> 
> cannot you just pass --enable-nonfree in faac and openssl PACKAGECONFIG?
> In worse case when both are enabled the option will be added twice.

If you have nonfree enabled, you need to change the license as well, it won't be GPL anymore.

regards,

Koen


> 
>>     --enable-avfilter \
>>     \
>>     --cross-prefix=${TARGET_PREFIX} \
>> -- 
>> 2.0.0
>> 
>> -- 
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Matthieu CRAPET - July 11, 2014, 11:47 a.m.
Hi Koen,

Something like this (in a small python function) would be acceptable?

d.setVar('LICENSE', 'CLOSED')

Regards,
Matthieu


-----Message d'origine-----
De : Koen Kooi [mailto:koen@dominion.thruhere.net] 
Envoyé : vendredi 11 juillet 2014 08:37
À : Martin Jansa
Cc : Matthieu CRAPET; openembedded-core@lists.openembedded.org
Objet : Re: [OE-core] [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl

[...] 

>> +# Check codecs that require --enable-nonfree USE_NONFREE = 
>> +"${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
>> 
>> EXTRA_OECONF = " \
>>     --enable-shared \
>>     --enable-pthreads \
>>     --enable-gpl \
>> +    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', 
>> + '', d)} \
> 
> cannot you just pass --enable-nonfree in faac and openssl PACKAGECONFIG?
> In worse case when both are enabled the option will be added twice.

If you have nonfree enabled, you need to change the license as well, it won't be GPL anymore.

regards,

Koen
Andreas Oberritter - July 11, 2014, 12:43 p.m.
Hi Matthieu,

I used a different approach, but could't test with master yet.

http://git.openembedded.org/openembedded-core-contrib/commit/?h=obi/daisy&id=1e3c64a768a5aeaf8d904609a14dd29e298821df

While at it, you may also take a look at this commit:

http://git.openembedded.org/openembedded-core-contrib/commit/?h=obi/daisy&id=1e39f95927b65c7943c8d6c36203b8b55c9b3cdf

Feel free to modify and submit as you like.

Regards,
Andreas

On 11.07.2014 13:47, Matthieu CRAPET wrote:
> Hi Koen,
> 
> Something like this (in a small python function) would be acceptable?
> 
> d.setVar('LICENSE', 'CLOSED')
> 
> Regards,
> Matthieu
> 
> 
> -----Message d'origine-----
> De : Koen Kooi [mailto:koen@dominion.thruhere.net] 
> Envoyé : vendredi 11 juillet 2014 08:37
> À : Martin Jansa
> Cc : Matthieu CRAPET; openembedded-core@lists.openembedded.org
> Objet : Re: [OE-core] [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
> 
> [...] 
> 
>>> +# Check codecs that require --enable-nonfree USE_NONFREE = 
>>> +"${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
>>>
>>> EXTRA_OECONF = " \
>>>     --enable-shared \
>>>     --enable-pthreads \
>>>     --enable-gpl \
>>> +    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', 
>>> + '', d)} \
>>
>> cannot you just pass --enable-nonfree in faac and openssl PACKAGECONFIG?
>> In worse case when both are enabled the option will be added twice.
> 
> If you have nonfree enabled, you need to change the license as well, it won't be GPL anymore.
> 
> regards,
> 
> Koen
>
Matthieu CRAPET - July 15, 2014, 2:38 p.m.
Hi Andreas,

Thanks for contribution. Your way is simple but user must know internal dependencies between codecs in licenses.
I think we can drop the GPL v2/v3 case because it is only used with libopencore & libvo that we don't use them in our recipe.

I'll post a v3 patch asap.

Regards,
Matthieu


-----Message d'origine-----
De : openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] De la part de Andreas Oberritter
Envoyé : vendredi 11 juillet 2014 14:44
À : openembedded-core@lists.openembedded.org
Objet : Re: [OE-core] [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl

Hi Matthieu,

I used a different approach, but could't test with master yet.

http://git.openembedded.org/openembedded-core-contrib/commit/?h=obi/daisy&id=1e3c64a768a5aeaf8d904609a14dd29e298821df

While at it, you may also take a look at this commit:

http://git.openembedded.org/openembedded-core-contrib/commit/?h=obi/daisy&id=1e39f95927b65c7943c8d6c36203b8b55c9b3cdf

Feel free to modify and submit as you like.

Regards,
Andreas

On 11.07.2014 13:47, Matthieu CRAPET wrote:
> Hi Koen,
> 
> Something like this (in a small python function) would be acceptable?
> 
> d.setVar('LICENSE', 'CLOSED')
> 
> Regards,
> Matthieu
> 
> 
> -----Message d'origine-----
> De : Koen Kooi [mailto:koen@dominion.thruhere.net]
> Envoyé : vendredi 11 juillet 2014 08:37 À : Martin Jansa Cc : Matthieu 
> CRAPET; openembedded-core@lists.openembedded.org
> Objet : Re: [OE-core] [PATCH v2] libav: add PACKAGECONFIG for theora, 
> libvorbis, speex and openssl
> 
> [...]
> 
>>> +# Check codecs that require --enable-nonfree USE_NONFREE = 
>>> +"${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
>>>
>>> EXTRA_OECONF = " \
>>>     --enable-shared \
>>>     --enable-pthreads \
>>>     --enable-gpl \
>>> +    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', 
>>> + '', d)} \
>>
>> cannot you just pass --enable-nonfree in faac and openssl PACKAGECONFIG?
>> In worse case when both are enabled the option will be added twice.
> 
> If you have nonfree enabled, you need to change the license as well, it won't be GPL anymore.
> 
> regards,
> 
> Koen
> 

--

Patch

diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
index a05a2a6..1d617a2 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -1,6 +1,12 @@ 
-SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video"
+SUMMARY = "Open source audio and video processing tools and librairies"
+DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \
+               with a set of portable, functional and high-performance libraries for \
+               dealing with multimedia formats of all sorts. It originates from the \
+               FFmpeg codebase, but goes its own way these days, providing its users \
+               with reliable releases and a clear vision how to go forward."
 HOMEPAGE = "http://libav.org/"
 SECTION = "libs"
+
 LICENSE = "GPLv2+"
 LICENSE_FLAGS = "commercial"
 
@@ -9,7 +15,7 @@  PROVIDES = "ffmpeg"
 
 ARM_INSTRUCTION_SET = "arm"
 
-DEPENDS = "zlib libogg libvorbis libtheora yasm-native"
+DEPENDS = "zlib libogg yasm-native"
 
 INC_PR = "r8"
 
@@ -23,21 +29,29 @@  BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
 EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
 EXTRA_FFCONF ?= ""
 
-PACKAGECONFIG ??= "bzip2 x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
 PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
-PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
+PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
 PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
-PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
-PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
 PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
-PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
 PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
 
 EXTRA_OECONF = " \
     --enable-shared \
     --enable-pthreads \
     --enable-gpl \
+    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
     --enable-avfilter \
     \
     --cross-prefix=${TARGET_PREFIX} \