libtorrent: refactor openssl optional dependency
authorAsaf Kahlon <asafka7@gmail.com>
Thu, 30 Aug 2018 13:42:20 +0000 (16:42 +0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 1 Sep 2018 12:59:05 +0000 (14:59 +0200)
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libtorrent/libtorrent.mk

index 8d74addaf7dd13ebeff1009930572602ec8dd138..de964b45ae222516bd3277614d28f25c8b463ffc 100644 (file)
@@ -6,15 +6,20 @@
 
 LIBTORRENT_VERSION = 0.13.7
 LIBTORRENT_SITE = http://rtorrent.net/downloads
-LIBTORRENT_DEPENDENCIES = host-pkgconf zlib \
-       $(if $(BR2_PACKAGE_OPENSSL),openssl)
+LIBTORRENT_DEPENDENCIES = host-pkgconf zlib
 LIBTORRENT_CONF_OPTS = --enable-aligned \
        --disable-instrumentation \
-       --with-zlib=$(STAGING_DIR)/usr \
-       $(if $(BR2_PACKAGE_OPENSSL),--enable-openssl,--disable-openssl)
+       --with-zlib=$(STAGING_DIR)/usr
 LIBTORRENT_INSTALL_STAGING = YES
 LIBTORRENT_AUTORECONF = YES
 LIBTORRENT_LICENSE = GPL-2.0
 LIBTORRENT_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBTORRENT_CONF_OPTS += --enable-openssl
+LIBTORRENT_DEPENDENCIES += openssl
+else
+LIBTORRENT_CONF_OPTS += --disable-openssl
+endif
+
 $(eval $(autotools-package))