summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2004-08-05 02:31:24 +0000
committerjlam <jlam>2004-08-05 02:31:24 +0000
commitb225bd041c144eab901407f9e00517f71a76d8dd (patch)
tree92ba11f6c8ebc9c1fc32269766b5b549618eb2b6
parentaf2164f7af8f884b4a1b232106c57e3fad460a8d (diff)
downloadpkgsrc-b225bd041c144eab901407f9e00517f71a76d8dd.tar.gz
Move options-handling into a separate file and document each option.
-rw-r--r--mail/fetchmail/Makefile48
-rw-r--r--mail/fetchmail/options.mk51
2 files changed, 55 insertions, 44 deletions
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index 12b52e8ac7c..bcbd973749c 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.145 2004/07/30 21:05:41 jlam Exp $
+# $NetBSD: Makefile,v 1.146 2004/08/05 02:31:24 jlam Exp $
DISTNAME= fetchmail-6.2.5
PKGREVISION= 2
@@ -14,57 +14,17 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
BUILD_USES_MSGFMT= yes
+.include "../../mk/bsd.prefs.mk"
+
USE_BUILDLINK3= yes
USE_PKGINSTALL= yes
USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --without-hesiod
USE_TBL= yes
-
-BUILD_DEFS+= USE_INET6
LDFLAGS+= ${CFLAGS}
-.include "../../mk/bsd.prefs.mk"
-
-# Global and legacy options
-.if defined(KERBEROS) && defined(USE_INET6) || defined(FETCHMAIL_USE_SSL)
-. if !defined(PKG_OPTIONS.fetchmail)
-. if defined(KERBEROS)
-PKG_OPTIONS.fetchmail+= kerberos4
-. endif
-. if defined(USE_INET6) && !empty(USE_INET6:M[yY][eE][sS])
-PKG_OPTIONS.fetchmail+= inet6
-. endif
-. if defined(FETCHMAIL_USE_SSL) && !empty(FETCHMAIL_USE_SSL:M[yY][eE][sS])
-PKG_OPTIONS.fetchmail+= ssl
-. endif
-. endif
-.endif
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.fetchmail
-PKG_SUPPORTED_OPTIONS= inet6 kerberos4 ssl
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Minet6)
-CONFIGURE_ARGS+= --enable-inet6
-.endif
-
-.if !empty(PKG_OPTIONS:Mkerberos4)
-CRYPTO+= uses Kerberos encryption code
-CONFIGURE_ARGS+= --with-kerberos=yes
-. if empty(MACHINE_PLATFORM:MNetBSD-1.[0-4]*-i386)
-REPLACE_KERBEROS_LIBS= # defined
-. endif
-.else
-CONFIGURE_ARGS+= --with-kerberos=no
-.endif
-
-.if !empty(PKG_OPTIONS:Mssl)
-. include "../../security/openssl/buildlink3.mk"
-CONFIGURE_ARGS+= --with-ssl=${SSLBASE}
-.else
-CONFIGURE_ARGS+= --without-ssl
-.endif
+.include "options.mk"
DOCDIR= ${PREFIX}/share/doc/fetchmail
RCD_SCRIPTS= fetchmail
diff --git a/mail/fetchmail/options.mk b/mail/fetchmail/options.mk
new file mode 100644
index 00000000000..6041cb67b03
--- /dev/null
+++ b/mail/fetchmail/options.mk
@@ -0,0 +1,51 @@
+# $NetBSD: options.mk,v 1.1 2004/08/05 02:31:24 jlam Exp $
+
+# Global and legacy options
+.if defined(KERBEROS) && defined(USE_INET6) || defined(FETCHMAIL_USE_SSL)
+. if !defined(PKG_OPTIONS.fetchmail)
+. if defined(KERBEROS)
+PKG_OPTIONS.fetchmail+= kerberos4
+. endif
+. if defined(USE_INET6) && !empty(USE_INET6:M[yY][eE][sS])
+PKG_OPTIONS.fetchmail+= inet6
+. endif
+. if defined(FETCHMAIL_USE_SSL) && !empty(FETCHMAIL_USE_SSL:M[yY][eE][sS])
+PKG_OPTIONS.fetchmail+= ssl
+. endif
+. endif
+.endif
+PKG_OPTIONS.fetchmail?= inet6 ssl
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.fetchmail
+PKG_SUPPORTED_OPTIONS= inet6 kerberos4 ssl
+.include "../../mk/bsd.options.mk"
+
+###
+### IPv6 support.
+###
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-inet6
+.endif
+
+###
+### KPOP (POP3 + Kerberos 4) support.
+###
+.if !empty(PKG_OPTIONS:Mkerberos4)
+CRYPTO+= uses Kerberos encryption code
+CONFIGURE_ARGS+= --with-kerberos=yes
+. if empty(MACHINE_PLATFORM:MNetBSD-1.[0-4]*-i386)
+REPLACE_KERBEROS_LIBS= yes
+. endif
+.else
+CONFIGURE_ARGS+= --with-kerberos=no
+.endif
+
+###
+### Support POP3 and IMAP over SSL.
+###
+.if !empty(PKG_OPTIONS:Mssl)
+. include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ssl=${SSLBASE}
+.else
+CONFIGURE_ARGS+= --without-ssl
+.endif