lighttpd: cleaner TLS dependency logic in Makefile
authorGlenn Strauss <gstrauss@gluelogic.com>
Thu, 17 Dec 2020 10:15:43 +0000 (05:15 -0500)
committerGlenn Strauss <gstrauss@gluelogic.com>
Thu, 17 Dec 2020 10:22:06 +0000 (05:22 -0500)
incorporate suggestion from cotequeiroz (Eneas U de Queiroz)
https://github.com/openwrt/packages/issues/14142#issuecomment-739583111

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
net/lighttpd/Makefile

index a96215c22d9774ce9a8533c2671bd83b358d528c..ea7283b8eea758e813752b28a52be7b1088e9cd2 100644 (file)
@@ -57,6 +57,17 @@ config LIGHTTPD_SSL
          your lighttpd configuration file.
           (mod_gnutls, mod_mbedtls, mod_nss, mod_openssl, mod_wolfssl)
 
+config LIGHTTPD_SSL_DEPENDS
+        bool
+        depends on LIGHTTPD_SSL
+        default PACKAGE_lighttpd-mod-mbedtls || PACKAGE_lighttpd-mod-wolfssl || PACKAGE_lighttpd-mod-gnutls || PACKAGE_lighttpd-mod-nss
+
+config LIGHTTPD_SSL_SELECT
+        tristate
+        depends on LIGHTTPD_SSL
+        default m if !LIGHTTPD_SSL_DEPENDS
+        select PACKAGE_lighttpd-mod-openssl
+
 config LIGHTTPD_LOGROTATE
        bool "Logrotate support"
        depends on PACKAGE_lighttpd
@@ -65,26 +76,6 @@ config LIGHTTPD_LOGROTATE
          It adds support for logrotate functionality.
 endef
 
-ifneq ($(strip $(CONFIG_LIGHTTPD_SSL)),)
-  ifeq ($(CONFIG_PACKAGE_lighttpd-mod-openssl),)
-  ifeq ($(CONFIG_PACKAGE_lighttpd-mod-mbedtls),)
-  ifeq ($(CONFIG_PACKAGE_lighttpd-mod-wolfssl),)
-  ifeq ($(CONFIG_PACKAGE_lighttpd-mod-gnutls),)
-  ifeq ($(CONFIG_PACKAGE_lighttpd-mod-nss),)
-    CONFIG_PACKAGE_lighttpd-mod-openssl=m
-  endif
-  endif
-  endif
-  endif
-  endif
-endif
-
-ifneq ($(CONFIG_PACKAGE_lighttpd-mod-auth),)
-  ifeq ($(CONFIG_PACKAGE_lighttpd-mod-authn_file),)
-    CONFIG_PACKAGE_lighttpd-mod-authn_file=m
-  endif
-endif
-
 MESON_ARGS += \
        -Dwith_brotli=false \
        -Dwith_bzip=false \