package/libnice: add optional dependency to openssl
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 31 Aug 2019 13:04:17 +0000 (15:04 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 16 Dec 2019 20:56:06 +0000 (21:56 +0100)
Support for OpenSSL was added in version 0.1.15:
https://lists.freedesktop.org/archives/nice/2018-December/001443.html

With the option of using OpenSSL as a crypto provider, we can't keep
GnuTLS as the default, because using:

       select BR2_PACKAGE_GNUTLS if !BR2_PACKAGE_OPENSSL

causes a Kconfig circular dependency:

package/openssl/Config.in:4:error: recursive dependency detected!
package/openssl/Config.in:4: symbol BR2_PACKAGE_OPENSSL is selected by BR2_PACKAGE_GNUTLS
package/gnutls/Config.in:1: symbol BR2_PACKAGE_GNUTLS is selected by BR2_PACKAGE_OPENSSL

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Thomas: pass --with-crypto-library argument]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libnice/Config.in
package/libnice/libnice.mk

index af8e8146186fdf82c9bcf7dc2a833962773f382f..1f62c0b5c80e42c73c6e9e350ff7d181601ce64e 100644 (file)
@@ -4,7 +4,7 @@ config BR2_PACKAGE_LIBNICE
        depends on BR2_USE_WCHAR # libglib2
        depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
        depends on BR2_USE_MMU # fork()
-       select BR2_PACKAGE_GNUTLS
+       select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_GNUTLS
        select BR2_PACKAGE_LIBGLIB2
        help
          Libnice is an implementation of the IETF's Interactive
index b2fea4d66cf4f52cdca19ed814d4450a47ef8742..b5168f83edd9a225b2acb371257cba61889a1c76 100644 (file)
@@ -8,9 +8,19 @@ LIBNICE_VERSION = 0.1.16
 LIBNICE_SITE = http://nice.freedesktop.org/releases
 LIBNICE_LICENSE = MPL-1.1 or LGPL-2.1
 LIBNICE_LICENSE_FILES = COPYING COPYING.MPL COPYING.LGPL
-LIBNICE_DEPENDENCIES = gnutls libglib2 host-pkgconf
+LIBNICE_DEPENDENCIES = libglib2 host-pkgconf
 LIBNICE_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+LIBNICE_CONF_OPTS += --with-crypto-library=gnutls
+LIBNICE_DEPENDENCIES += gnutls
+else
+LIBNICE_CONF_OPTS += \
+       --with-crypto-library=openssl \
+       --with-openssl=$(STAGING_DIR)/usr
+LIBNICE_DEPENDENCIES += openssl
+endif
+
 ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)
 LIBNICE_CONF_OPTS += --with-gstreamer-0.10
 LIBNICE_DEPENDENCIES += gst-plugins-base