mutt: prevent exposing mutt config options when not enabled
authorMatthew Hagan <mnhagan88@gmail.com>
Sat, 6 Nov 2021 23:42:44 +0000 (23:42 +0000)
committerRosen Penev <rosenp@gmail.com>
Tue, 9 Nov 2021 01:56:46 +0000 (17:56 -0800)
Ensure Mutt's configuration options do not appear in the config when
Mutt is not enabled.

Reported-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
mail/mutt/Makefile

index 4bafcc16f4bb8de64f72d46ab6898b780a8ef997..49c8be91af858c4d4022d8621f75ca531d533fa7 100644 (file)
@@ -33,6 +33,7 @@ define Package/mutt
   DEPENDS:=+MUTT_GNUTLS:libgnutls +MUTT_OPENSSL:libopenssl +libncursesw +MUTT_SASL:libsasl2 +terminfo +zlib
   TITLE:=Console mail client
   URL:=http://www.mutt.org/
+  MENU:=1
 endef
 
 define Package/mutt/description
@@ -59,38 +60,42 @@ define Package/mutt/install
 endef
 
 define Package/mutt/config
-       menu "Select mutt build options"
-               config MUTT_POP
-                       bool "POP support"
-                       default y
-                       help
-                         Enables POP support in mutt.
-               config MUTT_IMAP
-                       bool "IMAP support"
-                       default y
-                       help
-                         Enables IMAP support in mutt
-               config MUTT_SMTP
-                       bool "SMTP support"
-                       default n
-                       help
-                         Enables SMTP support in mutt.
-               config MUTT_SASL
-                       bool "SASL support"
-                       default n
-                       help
-                         Enables SASL support in mutt (libsasl2).
-               config MUTT_GNUTLS
-                       bool "GnuTLS support"
-                       default n
-                       help
-                         Enables GnuTLS support in mutt (libgnutls).
-               config MUTT_OPENSSL
-                       bool "OpenSSL support"
-                       default y
-                       help
-                         Enables OpenSSL support in mutt (libopenssl).
-       endmenu
+       config MUTT_POP
+               depends on PACKAGE_mutt
+               bool "POP support"
+               default y
+               help
+                       Enables POP support in mutt.
+       config MUTT_IMAP
+               depends on PACKAGE_mutt
+               bool "IMAP support"
+               default y
+               help
+                       Enables IMAP support in mutt
+       config MUTT_SMTP
+               depends on PACKAGE_mutt
+               bool "SMTP support"
+               default n
+               help
+                       Enables SMTP support in mutt.
+       config MUTT_SASL
+               depends on PACKAGE_mutt
+               bool "SASL support"
+               default n
+               help
+                       Enables SASL support in mutt (libsasl2).
+       config MUTT_GNUTLS
+               depends on PACKAGE_mutt
+               bool "GnuTLS support"
+               default n
+               help
+                       Enables GnuTLS support in mutt (libgnutls).
+       config MUTT_OPENSSL
+               depends on PACKAGE_mutt
+               bool "OpenSSL support"
+               default y
+               help
+                       Enables OpenSSL support in mutt (libopenssl).
 endef
 
 $(eval $(call BuildPackage,mutt))