Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/1] package/ffmpeg: Add support for GnuTLS
@ 2015-10-17 16:52 Bernd Kuhls
  2015-10-17 18:16 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2015-10-17 16:52 UTC (permalink / raw)
  To: buildroot

Besides OpenSSL ffmpeg also supports GnuTLS.

If both GnuTLS and OpenSSL are enabled, the former takes precedence over
the latter:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=configure;h=7f9fed31a491ed0991aee2d354dba82e54e3291e;hb=refs/heads/release/2.8#l2719

Introduce a Kconfig choice option to let the user decide which SSL
library ffmpeg should use. This choice also shows the fact, that OpenSSL
is incompatible with the GPL unless the nonfree option is enabled,
instead of silently ignoring OpenSSL when BR2_PACKAGE_FFMPEG_GPL is
enabled.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: rebased
v2: OpenSSL and gpl'ed code from ffmpeg play together when nonfree

 package/ffmpeg/Config.in | 38 ++++++++++++++++++++++++++++++++++++++
 package/ffmpeg/ffmpeg.mk | 12 +++++++-----
 2 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/package/ffmpeg/Config.in b/package/ffmpeg/Config.in
index e5981fe..de253c3 100644
--- a/package/ffmpeg/Config.in
+++ b/package/ffmpeg/Config.in
@@ -70,6 +70,44 @@ config BR2_PACKAGE_FFMPEG_SWSCALE
 	help
 	  Swscale is a library of video scaling routines.
 
+if BR2_PACKAGE_GNUTLS || \
+	(BR2_PACKAGE_OPENSSL && \
+		(!BR2_PACKAGE_FFMPEG_GPL || \
+		BR2_PACKAGE_FFMPEG_NONFREE))
+
+choice
+	prompt "https support library"
+
+config BR2_PACKAGE_FFMPEG_GNUTLS
+	bool "gnutls"
+	depends on BR2_PACKAGE_GNUTLS
+
+comment "GnuTLS support not available"
+	depends on !BR2_PACKAGE_GNUTLS
+
+config BR2_PACKAGE_FFMPEG_OPENSSL
+	bool "openssl"
+	depends on !BR2_PACKAGE_FFMPEG_GPL || BR2_PACKAGE_FFMPEG_NONFREE
+	depends on BR2_PACKAGE_OPENSSL
+
+comment "OpenSSL support not available"
+	depends on !BR2_PACKAGE_OPENSSL
+
+comment "OpenSSL is incompatible with the GPL, enable nonfree"
+	depends on BR2_PACKAGE_FFMPEG_GPL && \
+		!BR2_PACKAGE_FFMPEG_NONFREE && BR2_PACKAGE_OPENSSL
+
+endchoice
+
+endif
+
+comment "https support needs either OpenSSL or GnuTLS"
+	depends on !BR2_PACKAGE_GNUTLS && !BR2_PACKAGE_OPENSSL
+
+comment "https support using OpenSSL is incompatible with the GPL, enable nonfree"
+	depends on !BR2_PACKAGE_GNUTLS && BR2_PACKAGE_OPENSSL && \
+		BR2_PACKAGE_FFMPEG_GPL && !BR2_PACKAGE_FFMPEG_NONFREE
+
 config BR2_PACKAGE_FFMPEG_ENCODERS
 	string "Enabled encoders"
 	default "all"
diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
index 287338d..26e01e2 100644
--- a/package/ffmpeg/ffmpeg.mk
+++ b/package/ffmpeg/ffmpeg.mk
@@ -200,14 +200,16 @@ else
 FFMPEG_CONF_OPTS += --disable-libfdk-aac
 endif
 
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
-# openssl isn't license compatible with GPL
-ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx)
-FFMPEG_CONF_OPTS += --disable-openssl
+ifeq ($(BR2_PACKAGE_FFMPEG_GNUTLS),y)
+FFMPEG_CONF_OPTS += --enable-gnutls
+FFMPEG_DEPENDENCIES += gnutls
 else
+FFMPEG_CONF_OPTS += --disable-gnutls
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_OPENSSL),y)
 FFMPEG_CONF_OPTS += --enable-openssl
 FFMPEG_DEPENDENCIES += openssl
-endif
 else
 FFMPEG_CONF_OPTS += --disable-openssl
 endif
-- 
2.6.1

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

end of thread, other threads:[~2015-10-17 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-17 16:52 [Buildroot] [PATCH v3 1/1] package/ffmpeg: Add support for GnuTLS Bernd Kuhls
2015-10-17 18:16 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox