* [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
* [Buildroot] [PATCH v3 1/1] package/ffmpeg: Add support for GnuTLS
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
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-10-17 18:16 UTC (permalink / raw)
To: buildroot
Dear Bernd Kuhls,
On Sat, 17 Oct 2015 18:52:28 +0200, Bernd Kuhls wrote:
> 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>
To be honest, I don't think it's worth adding a Config.in choice here.
Just use Gnutls if available, or use OpenSSL if available, and that's
it. I believe it's sufficient, and more in line with how we handle the
other options in ffmpeg (by doing "automatic handling of
optional dependencies")
Best regards;
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [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