All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
@ 2014-06-30 14:23 Matthieu Crapet
  2014-06-30 16:40 ` Martin Jansa
  0 siblings, 1 reply; 18+ messages in thread
From: Matthieu Crapet @ 2014-06-30 14:23 UTC (permalink / raw)
  To: openembedded-core

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)} \
     --enable-avfilter \
     \
     --cross-prefix=${TARGET_PREFIX} \
-- 
2.0.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
  2014-06-30 14:23 [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl Matthieu Crapet
@ 2014-06-30 16:40 ` Martin Jansa
  2014-07-01  7:31   ` Matthieu CRAPET
  2014-07-11  6:36   ` Koen Kooi
  0 siblings, 2 replies; 18+ messages in thread
From: Martin Jansa @ 2014-06-30 16:40 UTC (permalink / raw)
  To: Matthieu Crapet; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 4643 bytes --]

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

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
  2014-06-30 16:40 ` Martin Jansa
@ 2014-07-01  7:31   ` Matthieu CRAPET
  2014-07-11  6:36   ` Koen Kooi
  1 sibling, 0 replies; 18+ messages in thread
From: Matthieu CRAPET @ 2014-07-01  7:31 UTC (permalink / raw)
  To: openembedded-core

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

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
  2014-06-30 16:40 ` Martin Jansa
  2014-07-01  7:31   ` Matthieu CRAPET
@ 2014-07-11  6:36   ` Koen Kooi
  2014-07-11 11:47     ` Matthieu CRAPET
  1 sibling, 1 reply; 18+ messages in thread
From: Koen Kooi @ 2014-07-11  6:36 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core


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



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
  2014-07-11  6:36   ` Koen Kooi
@ 2014-07-11 11:47     ` Matthieu CRAPET
  2014-07-11 12:43       ` Andreas Oberritter
  0 siblings, 1 reply; 18+ messages in thread
From: Matthieu CRAPET @ 2014-07-11 11:47 UTC (permalink / raw)
  To: openembedded-core

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



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
  2014-07-11 11:47     ` Matthieu CRAPET
@ 2014-07-11 12:43       ` Andreas Oberritter
  2014-07-15 14:38         ` Matthieu CRAPET
  0 siblings, 1 reply; 18+ messages in thread
From: Andreas Oberritter @ 2014-07-11 12:43 UTC (permalink / raw)
  To: openembedded-core

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
> 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
  2014-07-11 12:43       ` Andreas Oberritter
@ 2014-07-15 14:38         ` Matthieu CRAPET
  2014-07-15 14:54           ` [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options Matthieu Crapet
  0 siblings, 1 reply; 18+ messages in thread
From: Matthieu CRAPET @ 2014-07-15 14:38 UTC (permalink / raw)
  To: openembedded-core

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
> 

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options
  2014-07-15 14:38         ` Matthieu CRAPET
@ 2014-07-15 14:54           ` Matthieu Crapet
  2014-07-15 16:39             ` Andreas Oberritter
  0 siblings, 1 reply; 18+ messages in thread
From: Matthieu Crapet @ 2014-07-15 14:54 UTC (permalink / raw)
  To: openembedded-core

+ fix: drop unwanted --enable-libtheora & --enable-libvorbis in EXTRA_OECONF

Reported-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 meta/recipes-multimedia/libav/libav.inc | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
index 1d617a2..cd5ac5f 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -7,8 +7,7 @@ DESCRIPTION = "Libav is a friendly and community-driven effort to provide its us
 HOMEPAGE = "http://libav.org/"
 SECTION = "libs"
 
-LICENSE = "GPLv2+"
-LICENSE_FLAGS = "commercial"
+LICENSE = "GPLv2+ & LGPLv2.1+"
 
 # Provides ffmpeg compat, see http://libav.org/about.html
 PROVIDES = "ffmpeg"
@@ -44,14 +43,20 @@ 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)}"
+# Check codecs that trigger nonfree license
+python () {
+	pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
+	nonfree = [ 'faac', 'openssl' ]
+	if set(pkgconfig) & set(nonfree):
+		d.setVar('LICENSE', 'Proprietary')
+		d.setVar('LICENSE_FLAGS', 'commercial')
+}
 
 EXTRA_OECONF = " \
     --enable-shared \
     --enable-pthreads \
     --enable-gpl \
-    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+    ${@bb.utils.contains('LICENSE', 'Proprietary', '--enable-nonfree', '', d)} \
     --enable-avfilter \
     \
     --cross-prefix=${TARGET_PREFIX} \
@@ -60,8 +65,6 @@ EXTRA_OECONF = " \
     --enable-avserver \
     --enable-avplay \
     --ld="${CCLD}" \
-    --enable-libtheora  \
-    --enable-libvorbis \
     --arch=${TARGET_ARCH} \
     --target-os="linux" \
     --enable-cross-compile \
-- 
2.0.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options
  2014-07-15 14:54           ` [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options Matthieu Crapet
@ 2014-07-15 16:39             ` Andreas Oberritter
  2014-07-16  6:43               ` Matthieu CRAPET
  0 siblings, 1 reply; 18+ messages in thread
From: Andreas Oberritter @ 2014-07-15 16:39 UTC (permalink / raw)
  To: openembedded-core

Hello Matthieu,

On 15.07.2014 16:54, Matthieu Crapet wrote:
> + fix: drop unwanted --enable-libtheora & --enable-libvorbis in EXTRA_OECONF
> 
> Reported-by: Andreas Oberritter <obi@opendreambox.org>
> Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
> ---
>  meta/recipes-multimedia/libav/libav.inc | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
> index 1d617a2..cd5ac5f 100644
> --- a/meta/recipes-multimedia/libav/libav.inc
> +++ b/meta/recipes-multimedia/libav/libav.inc
> @@ -7,8 +7,7 @@ DESCRIPTION = "Libav is a friendly and community-driven effort to provide its us
>  HOMEPAGE = "http://libav.org/"
>  SECTION = "libs"
>  
> -LICENSE = "GPLv2+"
> -LICENSE_FLAGS = "commercial"
> +LICENSE = "GPLv2+ & LGPLv2.1+"

I think this is wrong (if it means dual licensed). To quote from the
LICENSE file:

"Most files in Libav are under the GNU Lesser General Public License
version 2.1 or later (LGPL v2.1+). Read the file COPYING.LGPLv2.1 for
details. Some other files have MIT/X11/BSD-style licenses. In
combination the LGPL v2.1+ applies to Libav.

Some optional parts of Libav are licensed under the GNU General Public
License version 2 or later (GPL v2+). See the file COPYING.GPLv2 for
details. None of these parts are used by default, you have to explicitly
pass --enable-gpl to configure to activate them. In this case, Libav's
license changes to GPL v2+."

So with --enable-gpl hardcoded in EXTRA_OECONF, GPLv2+ was the right choice.

>  
>  # Provides ffmpeg compat, see http://libav.org/about.html
>  PROVIDES = "ffmpeg"
> @@ -44,14 +43,20 @@ 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)}"
> +# Check codecs that trigger nonfree license
> +python () {
> +	pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
> +	nonfree = [ 'faac', 'openssl' ]
> +	if set(pkgconfig) & set(nonfree):
> +		d.setVar('LICENSE', 'Proprietary')
> +		d.setVar('LICENSE_FLAGS', 'commercial')
> +}

Do you think it would be feasible to add code which decides whether to
set --enable-gpl or not? Because --enable-gpl forbids linking libav for
programs with incompatible licenses.

While your approach is to set the license according to enabled codecs,
my approach is to choose the license and then enable all possible
codecs, because for me the license is more important than some codecs. I
think libav would abort configuration anyway if it encountered
incompatible flags.

Regards,
Andreas


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options
  2014-07-15 16:39             ` Andreas Oberritter
@ 2014-07-16  6:43               ` Matthieu CRAPET
  2014-07-16  8:31                 ` Andreas Oberritter
  0 siblings, 1 reply; 18+ messages in thread
From: Matthieu CRAPET @ 2014-07-16  6:43 UTC (permalink / raw)
  To: openembedded-core

Hi again,

> Some optional parts of Libav are licensed under the GNU General Public License version 2 or later (GPL v2+). See the file COPYING.GPLv2 for details. 
> None of these parts are used by default, you have to explicitly pass --enable-gpl to configure to activate them. In this case, Libav's license changes to GPL v2+."

I may misunderstood something here.

For example:
- libavfiler. It contains yadif code which is GPLv2+ and frei0r code is LGPLv2.1+. Libavfiler is clearly contaminated: 
LICENSE_libavfilter = "GPLv2+"
- libavutils is 100% LGPL
LICENSE_libavutils = " LGPLv2.1+"

Giving --enable-gpl to configure does not convert pure 100% LGPL licensed library to GPL license. Am I wrong?

> Do you think it would be feasible to add code which decides whether to set --enable-gpl or not? Because --enable-gpl forbids linking libav for programs with incompatible licenses.
Yes it's possible.

Regards,
M


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options
  2014-07-16  6:43               ` Matthieu CRAPET
@ 2014-07-16  8:31                 ` Andreas Oberritter
  2014-07-16  8:42                   ` Andreas Oberritter
  0 siblings, 1 reply; 18+ messages in thread
From: Andreas Oberritter @ 2014-07-16  8:31 UTC (permalink / raw)
  To: openembedded-core

On 16.07.2014 08:43, Matthieu CRAPET wrote:
> Hi again,
> 
>> Some optional parts of Libav are licensed under the GNU General Public License version 2 or later (GPL v2+). See the file COPYING.GPLv2 for details. 
>> None of these parts are used by default, you have to explicitly pass --enable-gpl to configure to activate them. In this case, Libav's license changes to GPL v2+."
> 
> I may misunderstood something here.
> 
> For example:
> - libavfiler. It contains yadif code which is GPLv2+ and frei0r code is LGPLv2.1+. Libavfiler is clearly contaminated: 

Yadif needs to be enabled explicitly with --enable-gpl. frei0r is 
disabled by default. If enabled, it's linked at runtime using dlopen. 
At least, this is what the 'configure' script suggests.

> LICENSE_libavfilter = "GPLv2+"
> - libavutils is 100% LGPL
> LICENSE_libavutils = " LGPLv2.1+"
> 
> Giving --enable-gpl to configure does not convert pure 100% LGPL licensed library to GPL license. Am I wrong?

If you combine GPL'ed and LGPL'ed code, the resulting binary will be GPL'ed.

https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License#Compatibility

Regards,
Andreas



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options
  2014-07-16  8:31                 ` Andreas Oberritter
@ 2014-07-16  8:42                   ` Andreas Oberritter
  2014-07-16  9:05                     ` Matthieu CRAPET
  0 siblings, 1 reply; 18+ messages in thread
From: Andreas Oberritter @ 2014-07-16  8:42 UTC (permalink / raw)
  To: openembedded-core

On 16.07.2014 10:31, Andreas Oberritter wrote:
> On 16.07.2014 08:43, Matthieu CRAPET wrote:
>> Giving --enable-gpl to configure does not convert pure 100% LGPL licensed library to GPL license. Am I wrong?
> 
> If you combine GPL'ed and LGPL'ed code, the resulting binary will be GPL'ed.
> 
> https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License#Compatibility

Sorry, I misunderstood that part of your question. If libavutils
contains LGPL'ed code only, then there's no technical reason to
automatically convert the license of libavutils to GPL, just because
--enable-gpl was given on the comand-line. However, the libav 'LICENSE'
clearly states that it's still the case anyway, but for non-technical
reasons.

Regards,
Andreas


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options
  2014-07-16  8:42                   ` Andreas Oberritter
@ 2014-07-16  9:05                     ` Matthieu CRAPET
  2014-07-16 16:31                       ` Saul Wold
  2014-07-17 14:44                       ` [RFC][PATCH v4] libav: set LICENSE " Matthieu Crapet
  0 siblings, 2 replies; 18+ messages in thread
From: Matthieu CRAPET @ 2014-07-16  9:05 UTC (permalink / raw)
  To: openembedded-core

>> However, the libav 'LICENSE' clearly states that it's still the case anyway, but for non-technical reasons.

If so, I'll post a v4 patch asap.

Regards,
M



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options
  2014-07-16  9:05                     ` Matthieu CRAPET
@ 2014-07-16 16:31                       ` Saul Wold
  2014-07-17 14:44                       ` [RFC][PATCH v4] libav: set LICENSE " Matthieu Crapet
  1 sibling, 0 replies; 18+ messages in thread
From: Saul Wold @ 2014-07-16 16:31 UTC (permalink / raw)
  To: Matthieu CRAPET, openembedded-core

On 07/16/2014 02:05 AM, Matthieu CRAPET wrote:
>>> However, the libav 'LICENSE' clearly states that it's still the case anyway, but for non-technical reasons.
>
> If so, I'll post a v4 patch asap.
>

We also saw a build failure with this patch last night, please see this 
log file:

https://autobuilder.yoctoproject.org/main/builders/nightly-world/builds/164/steps/BuildImages/logs/stdio

>
> You can also run generated qemu images with a command like 'runqemu qemux86'
> Parsing recipes...done.
> Parsing of 889 .bb files complete (0 cached, 889 parsed). 2154 targets, 166 skipped, 0 masked, 0 errors.
> NOTE: Resolving any missing task queue dependencies
> ERROR: Nothing PROVIDES 'lib32-x264' (but virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/meta/recipes-multimedia/libav/libav_0.8.11.bb DEPENDS on or otherwise requires it)
> ERROR: lib32-x264 was skipped: because it has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST
> ERROR: Nothing PROVIDES 'x264' (but /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/meta/recipes-multimedia/libav/libav_0.8.11.bb DEPENDS on or otherwise requires it)
> ERROR: x264 was skipped: because it has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST
> ERROR: Nothing RPROVIDES 'lib32-libav' (but virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/meta/recipes-multimedia/libav/libav_0.8.11.bb RDEPENDS on or otherwise requires it)
> ERROR: No eligible RPROVIDERs exist for 'lib32-libav'
> NOTE: Runtime target 'lib32-libav' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['lib32-libav']
> ERROR: Nothing RPROVIDES 'lib32-libav-dev' (but virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/meta/recipes-multimedia/libav/libav_0.8.11.bb RDEPENDS on or otherwise requires it)
> ERROR: No eligible RPROVIDERs exist for 'lib32-libav-dev'
> NOTE: Runtime target 'lib32-libav-dev' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['lib32-libav-dev']
> ERROR: Nothing RPROVIDES 'libav' (but /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/meta/recipes-multimedia/libav/libav_0.8.11.bb RDEPENDS on or otherwise requires it)
> ERROR: No eligible RPROVIDERs exist for 'libav'
> NOTE: Runtime target 'libav' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['libav']
> ERROR: Nothing RPROVIDES 'libav-dev' (but /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/meta/recipes-multimedia/libav/libav_0.8.11.bb RDEPENDS on or otherwise requires it)
> ERROR: No eligible RPROVIDERs exist for 'libav-dev'
> NOTE: Runtime target 'libav-dev' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['libav-dev']


Please look into this failure as you work on your next version of the patch.

Sau!

> Regards,
> M
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [RFC][PATCH v4] libav: set LICENSE according to PACKAGECONFIG options
  2014-07-16  9:05                     ` Matthieu CRAPET
  2014-07-16 16:31                       ` Saul Wold
@ 2014-07-17 14:44                       ` Matthieu Crapet
  2014-07-17 14:50                         ` Matthieu CRAPET
  1 sibling, 1 reply; 18+ messages in thread
From: Matthieu Crapet @ 2014-07-17 14:44 UTC (permalink / raw)
  To: openembedded-core

Experienced users can change license with 'gpl' and 'lic3' PACKAGECONFIG switches.

fix: drop unwanted --enable-libtheora & --enable-libvorbis in EXTRA_OECONF

Reported-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 meta/recipes-multimedia/libav/libav.inc | 35 +++++++++++++++++++++++++--------
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
index 1d617a2..de9770b 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -7,7 +7,7 @@ DESCRIPTION = "Libav is a friendly and community-driven effort to provide its us
 HOMEPAGE = "http://libav.org/"
 SECTION = "libs"
 
-LICENSE = "GPLv2+"
+LICENSE = "LGPLv2.1+"
 LICENSE_FLAGS = "commercial"
 
 # Provides ffmpeg compat, see http://libav.org/about.html
@@ -29,7 +29,7 @@ BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
 EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
 EXTRA_FFCONF ?= ""
 
-PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ??= "bzip2 gpl x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
 PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
 PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
 PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
@@ -44,14 +44,35 @@ 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)}"
+# Licenses flags: allow to switch licence LGPL/GPL and v2/v3
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[lic3] = "--enable-version3,--disable-version3"
+
+# Check codecs and license coherency
+python () {
+	pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
+	nonfree = [ 'faac', 'openssl' ]
+	gpl = [ 'x11', 'x264' ]
+	
+	if 'gpl' in pkgconfig:
+		if 'lic3' in pkgconfig:
+			d.setVar('LICENSE', 'GPLv3+')
+		else:
+			d.setVar('LICENSE', 'GPLv2+')
+	elif set(pkgconfig) & set(gpl):
+		raise bb.parse.SkipPackage("incompatible license, please add 'gpl' in PACKAGECONFIG")
+	elif 'lic3' in pkgconfig:
+		d.setVar('LICENSE', 'LGPLv3+')
+	
+	if set(pkgconfig) & set(nonfree):
+		d.setVar('LICENSE', 'Proprietary')
+		bb.note("Change LICENSE to 'Proprietary'")
+}
 
 EXTRA_OECONF = " \
     --enable-shared \
     --enable-pthreads \
-    --enable-gpl \
-    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+    ${@bb.utils.contains('LICENSE', 'Proprietary', '--enable-nonfree', '', d)} \
     --enable-avfilter \
     \
     --cross-prefix=${TARGET_PREFIX} \
@@ -60,8 +81,6 @@ EXTRA_OECONF = " \
     --enable-avserver \
     --enable-avplay \
     --ld="${CCLD}" \
-    --enable-libtheora  \
-    --enable-libvorbis \
     --arch=${TARGET_ARCH} \
     --target-os="linux" \
     --enable-cross-compile \
-- 
2.0.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH v4] libav: set LICENSE according to PACKAGECONFIG options
  2014-07-17 14:44                       ` [RFC][PATCH v4] libav: set LICENSE " Matthieu Crapet
@ 2014-07-17 14:50                         ` Matthieu CRAPET
  2014-07-28 12:06                           ` [PATCH] libav: fix PACKAGECONFIG for theora and libvorbis Matthieu Crapet
  0 siblings, 1 reply; 18+ messages in thread
From: Matthieu CRAPET @ 2014-07-17 14:50 UTC (permalink / raw)
  To: openembedded-core

Hi,

One more note. I've tested with 0.8.11 & 9.13 on OE-Core current git (master).
The only weak point is the use of python anonymous function which is called twice each time, is there a better solution ?

Regards,
Matt


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] libav: fix PACKAGECONFIG for theora and libvorbis
  2014-07-17 14:50                         ` Matthieu CRAPET
@ 2014-07-28 12:06                           ` Matthieu Crapet
  2014-07-28 12:10                             ` Matthieu CRAPET
  0 siblings, 1 reply; 18+ messages in thread
From: Matthieu Crapet @ 2014-07-28 12:06 UTC (permalink / raw)
  To: openembedded-core

Switches must not be in EXTRA_OECONF anymore.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 meta/recipes-multimedia/libav/libav.inc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
index 1d617a2..5c327df 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -60,8 +60,6 @@ EXTRA_OECONF = " \
     --enable-avserver \
     --enable-avplay \
     --ld="${CCLD}" \
-    --enable-libtheora  \
-    --enable-libvorbis \
     --arch=${TARGET_ARCH} \
     --target-os="linux" \
     --enable-cross-compile \
-- 
2.0.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] libav: fix PACKAGECONFIG for theora and libvorbis
  2014-07-28 12:06                           ` [PATCH] libav: fix PACKAGECONFIG for theora and libvorbis Matthieu Crapet
@ 2014-07-28 12:10                             ` Matthieu CRAPET
  0 siblings, 0 replies; 18+ messages in thread
From: Matthieu CRAPET @ 2014-07-28 12:10 UTC (permalink / raw)
  To: openembedded-core

Hi,

Please take this bugfix patch first, then we could arrange the LICENSE change issue later.

Regards,
Matthieu


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-07-28 12:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30 14:23 [PATCH v2] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl Matthieu Crapet
2014-06-30 16:40 ` Martin Jansa
2014-07-01  7:31   ` Matthieu CRAPET
2014-07-11  6:36   ` Koen Kooi
2014-07-11 11:47     ` Matthieu CRAPET
2014-07-11 12:43       ` Andreas Oberritter
2014-07-15 14:38         ` Matthieu CRAPET
2014-07-15 14:54           ` [PATCH v3] libav: set LICENSE and LICENSE_FLAGS according to PACKAGECONFIG options Matthieu Crapet
2014-07-15 16:39             ` Andreas Oberritter
2014-07-16  6:43               ` Matthieu CRAPET
2014-07-16  8:31                 ` Andreas Oberritter
2014-07-16  8:42                   ` Andreas Oberritter
2014-07-16  9:05                     ` Matthieu CRAPET
2014-07-16 16:31                       ` Saul Wold
2014-07-17 14:44                       ` [RFC][PATCH v4] libav: set LICENSE " Matthieu Crapet
2014-07-17 14:50                         ` Matthieu CRAPET
2014-07-28 12:06                           ` [PATCH] libav: fix PACKAGECONFIG for theora and libvorbis Matthieu Crapet
2014-07-28 12:10                             ` Matthieu CRAPET

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.