package/msmtp: prefer gnutls over openssl
authorRyan Coe <bluemrp9@gmail.com>
Sat, 29 Dec 2018 15:31:57 +0000 (07:31 -0800)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 30 Dec 2018 15:29:17 +0000 (16:29 +0100)
Msmtp no longer uses openssl as default [1], and even discourages the
use of the OpenSSL. Let's follow this upstream recommendation: if the
Buildroot configuration has both OpenSSL and GnuTLS enabled, GnuTLS
will be preferred over OpenSSL.

[1] https://marlam.de/msmtp/news/openssl-discouraged/

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
[Thomas: improve commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/msmtp/msmtp.mk

index a26de92ef92e6a3e71fed6c4fdf1a3b53529ee19..079c7c23192e695f393716cecc4159c6125e46ab 100644 (file)
@@ -40,16 +40,16 @@ else
 MSMTP_CONF_OPTS += --without-libsecret
 endif
 
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+MSMTP_CONF_OPTS += --with-tls=gnutls
+MSMTP_DEPENDENCIES += gnutls
+else ifeq ($(BR2_PACKAGE_OPENSSL),y)
 MSMTP_CONF_OPTS += --with-tls=openssl
 MSMTP_DEPENDENCIES += openssl
 ifeq ($(BR2_STATIC_LIBS),y)
 # openssl uses zlib, so we need to explicitly link with it when static
 MSMTP_CONF_ENV += LIBS=-lz
 endif
-else ifeq ($(BR2_PACKAGE_GNUTLS),y)
-MSMTP_CONF_OPTS += --with-tls=gnutls
-MSMTP_DEPENDENCIES += gnutls
 else
 MSMTP_CONF_OPTS += --with-tls=no
 endif