gst-ffmpeg: add option to select GPL vs LGPL build
authorDanomi Manchego <danomimanchego123@gmail.com>
Sun, 19 Oct 2014 19:33:19 +0000 (15:33 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Oct 2014 15:49:40 +0000 (16:49 +0100)
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gstreamer/gst-ffmpeg/Config.in
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk

index d879f5ed48338ec02a7f3dd3157831fa9fd76828..9bf519684950ab88ab58df5fbabae59d857e401a 100644 (file)
@@ -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)
index 59b9323e7467aefa9a8bc9f3f37ca8323e019dd8..44d3acec60d35a97aeca5f13111b0f6d03c418f5 100644 (file)
@@ -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))