Skip to contentSkip to conversation

gst-ffmpeg: add option to select GPL vs LGPL build

PATCH Superseded Danomi Manchego 6 participants 14 messages Oct 12, 2014 – Oct 18, 2014

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/3 gst-ffmpeg: add option to select GPL vs LGPL build

---

v2 -> v3:
- Change enable-LGPL option to an enable-GPL, like the ffmpeg option, per recommendation from Luca Ceresoli.

v1 -> v2:
- Move GST_FFMPEG_CONF_OPT adjustment (introduced by this patch) higher in the file, so that GST_FFMPEG_CONF_EXTRA_OPT lines don't get split.

---
 package/gstreamer/gst-ffmpeg/Config.in     | 12 +++++++++++-
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 12 +++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)
package/gstreamer/gst-ffmpeg/Config.in +11 -1
index d879f5e..00c3471 100644
@@ -1,4 +1,4 @@
-config BR2_PACKAGE_GST_FFMPEG
+menuconfig BR2_PACKAGE_GST_FFMPEG
 	bool "gst-ffmpeg"
 	select BR2_PACKAGE_GST_PLUGINS_BASE
 	depends on BR2_LARGEFILE
@@ -8,5 +8,15 @@ config BR2_PACKAGE_GST_FFMPEG
 
 	  http://gstreamer.freedesktop.org/
 
+if BR2_PACKAGE_GST_FFMPEG
+
+config BR2_PACKAGE_GST_FFMPEG_GPL
+	bool "Enable GPL code"
+	help
+	  Allow use of GPL code.  The resulting libs and binaries will
+	  be under GPL.
+
+endif
+
 comment "gst-ffmpeg needs a toolchain w/ largefile, IPv6"
 	depends on !(BR2_LARGEFILE && BR2_INET_IPV6)
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +11 -1
index b94fb0f..af3e880 100644
@@ -10,6 +10,16 @@ GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg
 GST_FFMPEG_INSTALL_STAGING = YES
 GST_FFMPEG_DEPENDENCIES = host-pkgconf gstreamer gst-plugins-base
 
+ifeq ($(BR2_PACKAGE_GST_FFMPEG_GPL),y)
+GST_FFMPEG_CONF_OPTS += --disable-lgpl
+GST_FFMPEG_LICENSE = GPLv2+ (gst-ffmpeg), GPLv2+/GPL3+ (libav)
+GST_FFMPEG_LICENSE_FILES = COPYING gst-libs/ext/libav/COPYING.GPLv2 gst-libs/ext/libav/COPYING.GPLv3
+else
+GST_FFMPEG_CONF_OPTS += --enable-lgpl
+GST_FFMPEG_LICENSE = LGPL2+ (gst-ffmpeg), LGPLv2.1+/LGPL3+ (libav)
+GST_FFMPEG_LICENSE_FILES = COPYING.LIB gst-libs/ext/libav/COPYING.LGPLv2.1 gst-libs/ext/libav/COPYING.LGPLv3
+endif
+
 GST_FFMPEG_CONF_EXTRA_OPTS = \
 		--cross-prefix=$(TARGET_CROSS) \
 		--target-os=linux
@@ -73,6 +83,6 @@ ifeq ($(BR2_PREFER_STATIC_LIB),)
 GST_FFMPEG_CONF_EXTRA_OPTS += --enable-pic
 endif
 
-GST_FFMPEG_CONF_OPTS = --with-ffmpeg-extra-configure="$(GST_FFMPEG_CONF_EXTRA_OPTS)"
+GST_FFMPEG_CONF_OPTS += --with-ffmpeg-extra-configure="$(GST_FFMPEG_CONF_EXTRA_OPTS)"
 
 $(eval $(autotools-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

The internal copy of libav in gst-ffmpeg does not understand the PKG_CONFIG env variable, so it throws a line like this at the end of its configuration:

WARNING: .../output/host/usr/bin/i686-pc-linux-gnu-pkg-config not found, library detection may fail.

This patch adds the --pkg-config to let libav know where it is.

---

This is basically the same problem suffered by ffmpeg, fixed in commit a9a5a8159937cbc5e472cbd0b144d596b85a3386.

---
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +2 -1
index af3e880..11f28dc 100644
@@ -22,7 +22,8 @@ endif
 
 GST_FFMPEG_CONF_EXTRA_OPTS = \
 		--cross-prefix=$(TARGET_CROSS) \
-		--target-os=linux
+		--target-os=linux \
+		--pkg-config='$(PKG_CONFIG_HOST_BINARY)'
 
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 GST_FFMPEG_CONF_EXTRA_OPTS += --enable-zlib
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

Dear Danomi,

Quoted 5 lines · Danomi Manchego

The internal copy of libav in gst-ffmpeg does not understand the PKG_CONFIG env variable, so it throws a line like this at the end of its configuration:

WARNING: .../output/host/usr/bin/i686-pc-linux-gnu-pkg-config not found, library detection may fail.

I tried to reproduce the issue, but the message didn't show up. Can you chare a defconfig to reproduce the issue?

Thanks.

Signature · 1 line
Luca
#3 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

Luca,

Quoted 8 lines · Luca Ceresoli

Dear Danomi,

Quoted 5 lines · Danomi Manchego

The internal copy of libav in gst-ffmpeg does not understand the PKG_CONFIG env variable, so it throws a line like this at the end of its configuration:

Quoted 6 lines
Quoted 2 lines

WARNING: .../output/host/usr/bin/i686-pc-linux-gnu-pkg-config not found, library detection may fail.

I tried to reproduce the issue, but the message didn't show up. Can you chare a defconfig to reproduce the issue?

I've seen this in a few different configurations, so I didn't think that you needed anything special. But anyway, here is one possible defconfig:

    BR2_arm=y
    BR2_cortex_a8=y
    BR2_ARM_FPU_NEON=y
    BR2_ENABLE_DEBUG=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_PACKAGE_GSTREAMER=y
    BR2_PACKAGE_GST_FFMPEG=y
    # BR2_TARGET_ROOTFS_TAR is not set

Look at the very end of the configure step, just before the build step:

License: GPL version 2 or later
Creating config.mak and config.h...

WARNING: xxxx/output/host/usr/bin/arm-none-linux-gnueabi-pkg-config
not found, library detection may fail.
configure: WARNING: unrecognized options: --disable-doc,
--disable-docs, --disable-documentation, --with-xmlto, --with-fop, --enable-ipv6
configure: *** Orc acceleration disabled. Requires Orc >= 0.4.6,
which was not found. Slower code paths will be used.

Quoted 1 line
Quoted 1 line
Quoted 1 line

gst-ffmpeg 0.10.13 Building

Danomi -

#4 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

Dear Danomi,

Quoted 31 lines · Danomi Manchego

Luca,

Quoted 8 lines · Luca Ceresoli

Dear Danomi,

Quoted 5 lines · Danomi Manchego

The internal copy of libav in gst-ffmpeg does not understand the PKG_CONFIG env variable, so it throws a line like this at the end of its configuration:

Quoted 6 lines
Quoted 2 lines

WARNING: .../output/host/usr/bin/i686-pc-linux-gnu-pkg-config not found, library detection may fail.

I tried to reproduce the issue, but the message didn't show up. Can you chare a defconfig to reproduce the issue?

I've seen this in a few different configurations, so I didn't think that you needed anything special. But anyway, here is one possible defconfig:

     BR2_arm=y
     BR2_cortex_a8=y
     BR2_ARM_FPU_NEON=y
     BR2_ENABLE_DEBUG=y
     BR2_TOOLCHAIN_EXTERNAL=y
     BR2_PACKAGE_GSTREAMER=y
     BR2_PACKAGE_GST_FFMPEG=y
     # BR2_TARGET_ROOTFS_TAR is not set
Quoted 7 lines

Look at the very end of the configure step, just before the build step:

License: GPL version 2 or later
Creating config.mak and config.h...

WARNING: xxxx/output/host/usr/bin/arm-none-linux-gnueabi-pkg-config
not found, library detection may fail.

Reproduced with this config, and disappeared applying your patch.

Signature · 1 line
Luca
#5 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

In reply to Danomi Manchego

Danomi, All,

On 2014-10-12 15:30 -0400, Danomi Manchego spake thusly:

Quoted 5 lines

The internal copy of libav in gst-ffmpeg does not understand the PKG_CONFIG env variable, so it throws a line like this at the end of its configuration:

WARNING: .../output/host/usr/bin/i686-pc-linux-gnu-pkg-config not found, library detection may fail.

Instead of fixing just that one package, shouldn't we provide a symlink:

    TUPLE-pkg-config  ->  pkg-config

This way, all packages that expect a cross-pkg-config will work without customisation.

Thomas, thoughts?

Regards,
Yann E. MORIN.

Quoted 33 lines

This patch adds the --pkg-config to let libav know where it is.

---

This is basically the same problem suffered by ffmpeg, fixed in commit a9a5a8159937cbc5e472cbd0b144d596b85a3386.

---
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +2 -1
index af3e880..11f28dc 100644
@@ -22,7 +22,8 @@ endif
 
 GST_FFMPEG_CONF_EXTRA_OPTS = \
 		--cross-prefix=$(TARGET_CROSS) \
-		--target-os=linux
+		--target-os=linux \
+		--pkg-config='$(PKG_CONFIG_HOST_BINARY)'
 
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 GST_FFMPEG_CONF_EXTRA_OPTS += --enable-zlib
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

"Yann E. MORIN" <[email protected]> wrote in news:20141017212453.GI3971 at free.fr:

Quoted 7 lines

Instead of fixing just that one package, shouldn't we provide a symlink:

    TUPLE-pkg-config  ->  pkg-config

This way, all packages that expect a cross-pkg-config will work without customisation.

Thomas, thoughts?

Hi,

I had the same idea back in January, but Thomas did not like it ;)
http://patchwork.ozlabs.org/patch/312273/

Regards, Bernd

#7 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

Bernd, All,

On 2014-10-17 23:39 +0200, Bernd Kuhls spake thusly:

Quoted 9 lines

"Yann E. MORIN" <[email protected]> wrote in news:20141017212453.GI3971 at free.fr:

Quoted 6 lines

Instead of fixing just that one package, shouldn't we provide a symlink:

    TUPLE-pkg-config  ->  pkg-config

This way, all packages that expect a cross-pkg-config will work without customisation.

Quoted 6 lines
Quoted 1 line

Thomas, thoughts?

Hi,

I had the same idea back in January, but Thomas did not like it ;)
http://patchwork.ozlabs.org/patch/312273/

Damned! :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 9 lines · Yann E. MORIN
Quoted 1 line

WARNING: .../output/host/usr/bin/i686-pc-linux-gnu-pkg-config not found, library detection may fail.

Instead of fixing just that one package, shouldn't we provide a symlink:

    TUPLE-pkg-config  ->  pkg-config

This way, all packages that expect a cross-pkg-config will work without customisation.

Thomas, thoughts?

I don't have a very strong opinion here. How many packages expect TUPLE-pkg-config instead of pkg-config? I'm not sure it's really the majority, and if it's not, I prefer to keep handling this on a per-package basis rather than adding a symlink.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH v3 2/3 gst-ffmpeg: add --pkg-config to internal libav configure options

Quoted 12 lines · Thomas Petazzoni

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN
Quoted 1 line

WARNING: .../output/host/usr/bin/i686-pc-linux-gnu-pkg-config not found, library detection may fail.

Instead of fixing just that one package, shouldn't we provide a symlink:

    TUPLE-pkg-config  ->  pkg-config

This way, all packages that expect a cross-pkg-config will work without customisation.

Quoted 6 lines
Quoted 1 line

Thomas, thoughts?

I don't have a very strong opinion here. How many packages expect TUPLE-pkg-config instead of pkg-config? I'm not sure it's really the majority, and if it's not, I prefer to keep handling this on a per-package basis rather than adding a symlink.

Actually, even if it is just two packages that use it, I think it is worthwhile
to add the symlink. It is one less thing to solve when adding a package.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#10 lore raw

PATCH v3 3/3 gst-ffmpeg: expand package description to describe libav usage

In reply to Danomi Manchego

- Change URL to gst-ffmpeg page at the gstreamer site.
- Note that gst-ffmpeg actually uses libav, not ffmpeg [anymore].
- Note that gst-ffmpeg is using an internal copy of libav, not a system copy.

---
 package/gstreamer/gst-ffmpeg/Config.in | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/gstreamer/gst-ffmpeg/Config.in +7 -2
index 00c3471..10e51b3 100644
@@ -4,9 +4,14 @@ menuconfig BR2_PACKAGE_GST_FFMPEG
 	depends on BR2_LARGEFILE
 	depends on BR2_INET_IPV6
 	help
-	  GStreamer plugin using FFmpeg.
+	  GStreamer plugin containing one plugin with a set of elements using
+	  the Libav library.  It contains most popular decoders as well as
+	  colorspace conversion elements.
 
-	  http://gstreamer.freedesktop.org/
+	  This package is configured to use an internal copy of the Libav
+	  library.
+
+	  http://gstreamer.freedesktop.org/modules/gst-ffmpeg.html
 
 if BR2_PACKAGE_GST_FFMPEG
 
Signature · 1 line
1.9.1
#11 lore raw

PATCH v3 3/3 gst-ffmpeg: expand package description to describe libav usage

Dear Danomi,

Quoted 6 lines · Danomi Manchego

- Change URL to gst-ffmpeg page at the gstreamer site.
- Note that gst-ffmpeg actually uses libav, not ffmpeg [anymore].
- Note that gst-ffmpeg is using an internal copy of libav, not a system copy.

Signature · 1 line
Luca
#13 lore raw

PATCH v3 1/3 gst-ffmpeg: add option to select GPL vs LGPL build

In reply to Danomi Manchego

Danomi, All,

On 2014-10-12 15:30 -0400, Danomi Manchego spake thusly:

Quoted 22 lines

---

v2 -> v3:
- Change enable-LGPL option to an enable-GPL, like the ffmpeg option, per recommendation from Luca Ceresoli.

v1 -> v2:
- Move GST_FFMPEG_CONF_OPT adjustment (introduced by this patch) higher in the file, so that GST_FFMPEG_CONF_EXTRA_OPT lines don't get split.

---
 package/gstreamer/gst-ffmpeg/Config.in     | 12 +++++++++++-
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 12 +++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)
package/gstreamer/gst-ffmpeg/Config.in +0 -0
index d879f5e..00c3471 100644

package/gstreamer/gst-ffmpeg/Config.in line 1

Quoted 2 lines
package/gstreamer/gst-ffmpeg/Config.in +1 -1
@@ -1,4 +1,4 @@
-config BR2_PACKAGE_GST_FFMPEG
+menuconfig BR2_PACKAGE_GST_FFMPEG

NAK.

Although I do like 'menuconfig' much for a better-lookinf layout, this should not be part of that patch, but separate in its own one.

Quoted 24 lines
package/gstreamer/gst-ffmpeg/Config.in +10 -0
 	bool "gst-ffmpeg"
 	select BR2_PACKAGE_GST_PLUGINS_BASE
 	depends on BR2_LARGEFILE
@@ -8,5 +8,15 @@ config BR2_PACKAGE_GST_FFMPEG
 
 	  http://gstreamer.freedesktop.org/
 
+if BR2_PACKAGE_GST_FFMPEG
+
+config BR2_PACKAGE_GST_FFMPEG_GPL
+	bool "Enable GPL code"
+	help
+	  Allow use of GPL code.  The resulting libs and binaries will
+	  be under GPL.
+
+endif
+
 comment "gst-ffmpeg needs a toolchain w/ largefile, IPv6"
 	depends on !(BR2_LARGEFILE && BR2_INET_IPV6)
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +0 -0
index b94fb0f..af3e880 100644

package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg · line 15

Quoted 6 lines
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +3 -0
@@ -10,6 +10,16 @@ GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg
 GST_FFMPEG_INSTALL_STAGING = YES
 GST_FFMPEG_DEPENDENCIES = host-pkgconf gstreamer gst-plugins-base
 
+ifeq ($(BR2_PACKAGE_GST_FFMPEG_GPL),y)
+GST_FFMPEG_CONF_OPTS += --disable-lgpl
+GST_FFMPEG_LICENSE = GPLv2+ (gst-ffmpeg), GPLv2+/GPL3+ (libav)

Missing 'v': GPLv3+

package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg · line 19

Quoted 4 lines
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +4 -0
+GST_FFMPEG_LICENSE_FILES = COPYING gst-libs/ext/libav/COPYING.GPLv2 gst-libs/ext/libav/COPYING.GPLv3
+else
+GST_FFMPEG_CONF_OPTS += --enable-lgpl
+GST_FFMPEG_LICENSE = LGPL2+ (gst-ffmpeg), LGPLv2.1+/LGPL3+ (libav)

Ditto: LGPLv3+

Regards,
Yann E. MORIN.

Quoted 21 lines
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +4 -1
+GST_FFMPEG_LICENSE_FILES = COPYING.LIB gst-libs/ext/libav/COPYING.LGPLv2.1 gst-libs/ext/libav/COPYING.LGPLv3
+endif
+
 GST_FFMPEG_CONF_EXTRA_OPTS = \
 		--cross-prefix=$(TARGET_CROSS) \
 		--target-os=linux
@@ -73,6 +83,6 @@ ifeq ($(BR2_PREFER_STATIC_LIB),)
 GST_FFMPEG_CONF_EXTRA_OPTS += --enable-pic
 endif
 
-GST_FFMPEG_CONF_OPTS = --with-ffmpeg-extra-configure="$(GST_FFMPEG_CONF_EXTRA_OPTS)"
+GST_FFMPEG_CONF_OPTS += --with-ffmpeg-extra-configure="$(GST_FFMPEG_CONF_EXTRA_OPTS)"
 
 $(eval $(autotools-package))
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'