package/rtty: add optional SSL support
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 22 Mar 2020 20:42:49 +0000 (21:42 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 22 Mar 2020 20:43:45 +0000 (21:43 +0100)
This commit adds optional dependencies on mbedtls, openssl or wolfssl.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/rtty/rtty.mk

index 21ba385018ef75f2b9f1f19f40b5fab163238852..bcd0fb3625b2f8cde0a67a4b27af34d3f0c0c6ea 100644 (file)
@@ -9,6 +9,30 @@ RTTY_SITE = https://github.com/zhaojh329/rtty/releases/download/v$(RTTY_VERSION)
 RTTY_LICENSE = MIT
 RTTY_LICENSE_FILES = LICENSE
 RTTY_DEPENDENCIES = libev
-RTTY_CONF_OPTS = -DRTTY_SSL_SUPPORT=OFF
+
+ifeq ($(BR2_PACKAGE_MBEDTLS),y)
+RTTY_DEPENDENCIES += mbedtls
+RTTY_CONF_OPTS += \
+       -DRTTY_SSL_SUPPORT=ON \
+       -DRTTY_USE_MBEDTLS=ON \
+       -DRTTY_USE_OPENSSL=OFF \
+       -DRTTY_USE_WOLFSSL=OFF
+else ifeq ($(BR2_PACKAGE_OPENSSL),y)
+RTTY_DEPENDENCIES += openssl
+RTTY_CONF_OPTS += \
+       -DRTTY_SSL_SUPPORT=ON \
+       -DRTTY_USE_MBEDTLS=OFF \
+       -DRTTY_USE_OPENSSL=ON \
+       -DRTTY_USE_WOLFSSL=OFF
+else ifeq ($(BR2_PACKAGE_WOLFSSL),y)
+RTTY_DEPENDENCIES += wolfssl
+RTTY_CONF_OPTS += \
+       -DRTTY_SSL_SUPPORT=ON \
+       -DRTTY_USE_MBEDTLS=OFF \
+       -DRTTY_USE_OPENSSL=OFF \
+       -DRTTY_USE_WOLFSSL=ON
+else
+RTTY_CONF_OPTS += -DRTTY_SSL_SUPPORT=OFF
+endif
 
 $(eval $(cmake-package))