gst-ffmpeg: add option to select GPL vs LGPL build
PATCH v4 1/4 gst-ffmpeg: add option to select GPL vs LGPL build
---
v3 -> v4:
- Do not change config to menuconfig in this commit, per recommendation from Yann E. MORIN.
- Put missing 'v' in GPL licenses.
- Not adding 'Reviewed-by: Luca Ceresoli' in case above changes invalidate the review.
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 | 10 ++++++++++ package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-)
package/gstreamer/gst-ffmpeg/Config.in +10 -0
@@ -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
@@ -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+/GPLv3+ (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 = LGPLv2+ (gst-ffmpeg), LGPLv2.1+/LGPLv3+ (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
PATCH v4 2/4 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.
v3 -> v4:
- Add Luca Ceresoli's Tested-by and Reviewed-by.
--- package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +2 -1
@@ -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
PATCH v4 3/4 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.
---
v3 -> v4:
- Add 'Acked-by: Luca Ceresoli'
--- package/gstreamer/gst-ffmpeg/Config.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
package/gstreamer/gst-ffmpeg/Config.in +7 -2
@@ -4,9 +4,14 @@ config 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
PATCH v4 4/4 gst-ffmpeg: change config to menuconfig, like other gst plugins
In reply to Danomi Manchego--- package/gstreamer/gst-ffmpeg/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/gstreamer/gst-ffmpeg/Config.in +1 -1
@@ -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
Signature · 1 line
1.9.1
PATCH v4 1/4 gst-ffmpeg: add option to select GPL vs LGPL build
In reply to Danomi ManchegoDear Danomi Manchego,
Quoted 1 line · Danomi Manchego
Signed-off-by Danomi Manchego <[email protected]>
I've applied patches 1, 2 and 3 from your series. However, I haven't applied patch 4, because I believe switching from 'config' to 'menuconfig' for gst-ffmpeg isn't really necessary, since gst-ffmpeg has only one sub-option. The other gst-plugins-* packages that use menuconfig have lots of suboptions, which justify menuconfig.
If you don't agree, feel free to argue more :-)
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com