gst1-plugins-bad: fix broken dependency for the hls plugin
authorRahul Bedarkar <rahul.bedarkar@imgtec.com>
Thu, 4 Aug 2016 10:06:43 +0000 (15:36 +0530)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 5 Aug 2016 19:08:16 +0000 (21:08 +0200)
HLS plugin can be built with nettle or libgcrypt or openssl
cryptographic backend. But current dependency on gnutls is incorrect.
It has been working so far because gnutls depends on nettle.

gst-plugins-bad's build system for HLS allows user to choose which
cryptographic backend to use. If that is not specified, it internally
checks for nettle or libgcrypt or openssl in order. If none of the
cryptographic backend is available, HLS plugin gets disabled internally.

Select cryptographic backend according to which cryptographic packages
are available. If both libgcrypt or openssl are not available, choose
nettle by default.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gstreamer1/gst1-plugins-bad/Config.in
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk

index 0f9fb154dc485528bc9be4dac3c0f59c52c61e09..2f288cabc6321857b3fde53f9f6b9322f9214435 100644 (file)
@@ -530,7 +530,7 @@ comment "gl needs the gst1-plugins-bad opengl library"
 
 config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS
        bool "hls"
-       select BR2_PACKAGE_GNUTLS
+       select BR2_PACKAGE_NETTLE if !(BR2_PACKAGE_LIBGCRYPT || BR2_PACKAGE_OPENSSL)
        help
          Fragmented streaming plugins
 
index 8f739ecbdca5ba7e4ae7fb061930fe1a3dcf51ee..3ffdd10d19adbb43e987417462955310bbb17adf 100644 (file)
@@ -650,7 +650,19 @@ endif
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS),y)
 GST1_PLUGINS_BAD_CONF_OPTS += --enable-hls
-GST1_PLUGINS_BAD_DEPENDENCIES += gnutls
+
+ifeq ($(BR2_PACKAGE_NETTLE),y)
+GST1_PLUGINS_BAD_DEPENDENCIES += nettle
+GST1_PLUGINS_BAD_CONF_OPTS += --with-hls-crypto=nettle
+else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
+GST1_PLUGINS_BAD_DEPENDENCIES += libgcrypt
+GST1_PLUGINS_BAD_CONF_OPTS += --with-hls-crypto=libgcrypt \
+       --with-libgcrypt-prefix=$(STAGING_DIR)/usr
+else
+GST1_PLUGINS_BAD_DEPENDENCIES += openssl
+GST1_PLUGINS_BAD_CONF_OPTS += --with-hls-crypto=openssl
+endif
+
 else
 GST1_PLUGINS_BAD_CONF_OPTS += --disable-hls
 endif