summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2004-07-30 21:05:41 +0000
committerjlam <jlam>2004-07-30 21:05:41 +0000
commitab399f9c20387f0e8629125679f97e82613cc5a9 (patch)
tree90f33a51019f85b91b5f29838193d07638327f1c
parent8a043543cf52e0083d9fc3a38961d8b67f639a04 (diff)
downloadpkgsrc-ab399f9c20387f0e8629125679f97e82613cc5a9.tar.gz
Convert to use bsd.options.mk. The relevant options variable to set
for each package can be determined by invoking: make show-var VARNAME=PKG_OPTIONS_VAR The old options are still supported unless the variable named in PKG_OPTIONS_VAR is set within make(1) (usually via /etc/mk.conf).
-rw-r--r--databases/openldap/Makefile6
-rw-r--r--databases/openldap/Makefile.options55
-rw-r--r--databases/openldap/buildlink3.mk16
-rw-r--r--mail/cyrus-imapd22/Makefile34
-rw-r--r--mail/fetchmail/Makefile45
-rw-r--r--mail/mutt-devel/Makefile.options45
-rw-r--r--mail/postfix/Makefile12
-rw-r--r--mail/postfix/Makefile.options85
-rw-r--r--mk/bsd.pkg.obsolete.mk114
-rw-r--r--net/samba/Makefile55
-rw-r--r--net/samba/Makefile.options96
-rw-r--r--net/samba/PLIST10
-rw-r--r--net/samba/PLIST.pam9
-rw-r--r--print/cups/Makefile23
-rw-r--r--print/cups/PLIST3
-rw-r--r--print/cups/PLIST.pam2
-rw-r--r--security/PAM/Makefile20
-rw-r--r--security/cyrus-sasl/Makefile48
-rw-r--r--security/cyrus-sasl/PLIST (renamed from security/cyrus-sasl/PLIST.common)28
-rw-r--r--security/cyrus-sasl/PLIST.krb56
-rw-r--r--security/cyrus-sasl/PLIST.plugins21
-rw-r--r--security/cyrus-sasl/buildlink3.mk6
-rw-r--r--security/cyrus-sasl2/Makefile21
-rw-r--r--security/cyrus-sasl2/Makefile.options40
-rw-r--r--security/cyrus-sasl2/PLIST (renamed from security/cyrus-sasl2/PLIST.common)30
-rw-r--r--security/cyrus-sasl2/PLIST.krb55
-rw-r--r--security/cyrus-sasl2/PLIST.plugins25
-rw-r--r--security/cyrus-saslauthd/Makefile35
-rw-r--r--security/cyrus-saslauthd/Makefile.options68
-rw-r--r--security/cyrus-saslauthd/PLIST4
-rw-r--r--security/cyrus-saslauthd/PLIST.ldap3
-rw-r--r--security/heimdal/Makefile33
-rw-r--r--security/mit-krb5/Makefile18
-rw-r--r--security/openssl/Makefile17
-rw-r--r--security/sudo/Makefile15
-rw-r--r--www/apache/Makefile22
-rw-r--r--www/lynx/Makefile59
-rw-r--r--www/lynx/Makefile.options77
-rw-r--r--www/php4/Makefile.php23
39 files changed, 789 insertions, 445 deletions
diff --git a/databases/openldap/Makefile b/databases/openldap/Makefile
index bfbbceef61e..91cd695ae2a 100644
--- a/databases/openldap/Makefile
+++ b/databases/openldap/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.79 2004/07/24 03:32:24 jlam Exp $
+# $NetBSD: Makefile,v 1.80 2004/07/30 21:05:41 jlam Exp $
DISTNAME= openldap-2.2.13
SVR4_PKGNAME= oldap
@@ -36,7 +36,7 @@ CONFIGURE_ARGS+= --with-tls=openssl
# SLAPD options
CONFIGURE_ARGS+= --enable-crypt
-.if !empty(_OPENLDAP_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
CONFIGURE_ARGS+= --enable-spasswd
.endif
CONFIGURE_ARGS+= --enable-wrappers
@@ -44,7 +44,7 @@ CONFIGURE_ARGS+= --enable-wrappers
SLAPD_BACKEND_MODULES= bdb:static dnnsrv hdb ldap ldbm meta \
monitor:static null passwd shell
.for _mod_ in ${SLAPD_BACKEND_MODULES}
-. if !empty(_OPENLDAP_OPTIONS:Mdynamic)
+. if !empty(PKG_OPTIONS:Mdynamic)
CONFIGURE_ARGS+= --enable-${_mod_:C/\:.*//}${_mod_:N*\:static:C/.*/=mod/}
. else
CONFIGURE_ARGS+= --enable-${_mod_:C/\:.*//}
diff --git a/databases/openldap/Makefile.options b/databases/openldap/Makefile.options
index 5f5c22e01b4..e5f1d5d21a9 100644
--- a/databases/openldap/Makefile.options
+++ b/databases/openldap/Makefile.options
@@ -1,45 +1,29 @@
-# $NetBSD: Makefile.options,v 1.4 2004/07/24 18:37:10 jlam Exp $
-#
-# OPENLDAP_ALL_OPTIONS lists all of the currently-supported optional modules
-# that *may* be built.
-#
-# OPENLDAP_OPTIONS is a list of the modules that *will* be built.
-#
-OPENLDAP_ALL_OPTIONS= dynamic sasl slp
+# $NetBSD: Makefile.options,v 1.5 2004/07/30 21:05:41 jlam Exp $
-.if defined(USE_SASL) || defined(USE_SASL2) || defined(KERBEROS)
-. if !defined(OPENLDAP_OPTIONS)
-. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
-OPENLDAP_OPTIONS+= sasl
+# Global and legacy options
+.if defined(KERBEROS) || defined(USE_SASL) || defined(USE_SASL2)
+. if !defined(PKG_OPTIONS.openldap)
+. if defined(KERBEROS)
+PKG_OPTIONS.openldap+= kerberos
. endif
. if defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
-OPENLDAP_OPTIONS+= sasl
+PKG_OPTIONS.openldap+= sasl
. endif
-. if defined(KERBEROS)
-OPENLDAP_OPTIONS+= sasl
+. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+PKG_OPTIONS.openldap+= sasl
. endif
. endif
.endif
-OPENLDAP_OPTIONS?= # empty
-BUILD_DEFS+= OPENLDAP_OPTIONS
-
-_OPENLDAP_OPTIONS= # empty
-.for _opt_ in ${OPENLDAP_OPTIONS}
-. if empty(_OPENLDAP_OPTIONS:M${_opt_})
-. if !empty(OPENLDAP_ALL_OPTIONS:M${_opt_})
-_OPENLDAP_OPTIONS+= ${_opt_}
-. else
-PKG_FAIL_REASON+= "\"${_opt_}\" is not a supported Mutt build option."
-. endif
-. endif
-.endfor
+PKG_OPTIONS_VAR= PKG_OPTIONS.openldap
+PKG_SUPPORTED_OPTIONS= dynamic kerberos sasl slp
+.include "../../mk/bsd.options.mk"
###
### Whether to build with dynamically-loadable backend modules. If not
### specified, then link the backend modules statically into slapd.
###
-.if !empty(_OPENLDAP_OPTIONS:Mdynamic)
+.if !empty(PKG_OPTIONS:Mdynamic)
CONFIGURE_ARGS+= --enable-modules
PLIST_SUBST+= DYNAMIC_MOD=
.else
@@ -47,9 +31,18 @@ PLIST_SUBST+= DYNAMIC_MOD="@comment "
.endif
###
+### Kerberos authentication is via SASL.
+###
+.if !empty(PKG_OPTIONS:Mkerberos)
+. if empty(PKG_OPTIONS:Msasl)
+PKG_OPTIONS+= sasl
+. endif
+.endif
+
+###
### SASL authentication
###
-.if !empty(_OPENLDAP_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
. if !defined(USE_SASL2) && !defined(USE_SASL)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --with-cyrus-sasl
@@ -65,7 +58,7 @@ CONFIGURE_ARGS+= --with-cyrus-sasl
###
### SLP (Service Locator Protocol)
###
-.if !empty(_OPENLDAP_OPTIONS:Mslp)
+.if !empty(PKG_OPTIONS:Mslp)
. include "../../net/openslp/buildlink3.mk"
CONFIGURE_ARGS+= --enable-slp
.endif
diff --git a/databases/openldap/buildlink3.mk b/databases/openldap/buildlink3.mk
index dcab5e17c6a..7712e2e8e70 100644
--- a/databases/openldap/buildlink3.mk
+++ b/databases/openldap/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.10 2004/07/24 17:24:29 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.11 2004/07/30 21:05:41 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
OPENLDAP_BUILDLINK3_MK:= ${OPENLDAP_BUILDLINK3_MK}+
@@ -18,10 +18,16 @@ BUILDLINK_RECOMMENDED.openldap?= openldap>=2.2.13
BUILDLINK_PKGSRCDIR.openldap?= ../../databases/openldap
.endif # OPENLDAP_BUILDLINK3_MK
-.if defined(USE_SASL2) && (${USE_SASL2} == "YES")
-. include "../../security/cyrus-sasl2/buildlink3.mk"
-.elif defined(USE_SASL) && (${USE_SASL} == "YES")
-. include "../../security/cyrus-sasl/buildlink3.mk"
+PKG_OPTIONS.openldap?= ${PKG_DEFAULT_OPTIONS}
+
+.if !empty(PKG_OPTIONS.openldap:Msasl)
+. if !defined(USE_SASL2) && !defined(USE_SASL)
+. include "../../security/cyrus-sasl2/buildlink3.mk"
+. elif defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+. include "../../security/cyrus-sasl2/buildlink3.mk"
+. elif defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
+. include "../../security/cyrus-sasl/buildlink3.mk"
+. endif
.endif
.include "../../security/openssl/buildlink3.mk"
diff --git a/mail/cyrus-imapd22/Makefile b/mail/cyrus-imapd22/Makefile
index 8fc94a89468..f3cab8b8cc4 100644
--- a/mail/cyrus-imapd22/Makefile
+++ b/mail/cyrus-imapd22/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2004/07/29 20:04:02 recht Exp $
+# $NetBSD: Makefile,v 1.18 2004/07/30 21:05:41 jlam Exp $
DISTNAME= cyrus-imapd-2.2.8
CATEGORIES= mail
@@ -49,12 +49,35 @@ CONFIGURE_ARGS+= --without-zephyr
CONFIGURE_ARGS+= --without-ucdsnmp
.if defined(KERBEROS)
-. if (${KERBEROS} == 4) && exists(/usr/include/kerberosIV/krb.h)
-PKG_USE_KERBEROS= yes
+. if !defined(PKG_OPTIONS.cyrus-imapd)
+. if defined(KERBEROS)
+. if ${KERBEROS} == "4"
+PKG_OPTIONS.cyrus-imapd+= kerberos4
+. else
+PKG_OPTIONS.cyrus-imapd+= kerberos
+. endif
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cyrus-imapd
+PKG_SUPPORTED_OPTIONS= gssapi kerberos kerberos4
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mkerberos)
+. if empty(PKG_OPTIONS:Mgssapi)
+PKG_OPTIONS+= gssapi
+. endif
+.endif
+
+.if !empty(PKG_OPTIONS:Mkerberos4)
+. if exists(/usr/include/kerberosIV/krb.h)
+CRYPTO+= uses Kerberos encryption code
CONFIGURE_ARGS+= --with-auth=krb
CONFIGURE_ARGS+= --with-krb=/usr
-. else
-. include "../../mk/krb5.buildlink3.mk"
+. endif
+.elif !empty(PKG_OPTIONS:Mgssapi)
+. include "../../mk/krb5.buildlink3.mk"
CONFIGURE_ARGS+= --with-auth=krb5
CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE}
CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}}
@@ -62,7 +85,6 @@ GSSIMPL.heimdal= heimdal
GSSIMPL.mit-krb5= mit
CONFIGURE_ENV+= COMPILE_ET=${KRB5BASE}/bin/compile_et
COMERRBASE= ${KRB5BASE}
-. endif
.else
CONFIGURE_ARGS+= --with-auth=unix
CONFIGURE_ARGS+= --without-krb
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index be1364eb26d..12b52e8ac7c 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.144 2004/07/22 17:04:28 drochner Exp $
+# $NetBSD: Makefile,v 1.145 2004/07/30 21:05:41 jlam Exp $
DISTNAME= fetchmail-6.2.5
PKGREVISION= 2
@@ -26,33 +26,51 @@ LDFLAGS+= ${CFLAGS}
.include "../../mk/bsd.prefs.mk"
-FETCHMAIL_USE_SSL?= yes
-BUILD_DEFS+= FETCHMAIL_USE_SSL
+# 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
-.if defined(FETCHMAIL_USE_SSL) && !empty(FETCHMAIL_USE_SSL:M[yY][eE][sS])
-. include "../../security/openssl/buildlink3.mk"
-CONFIGURE_ARGS+= --with-ssl=${SSLBASE}
-.else
-CONFIGURE_ARGS+= --without-ssl
+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 defined(KERBEROS)
-PKG_USE_KERBEROS= yes
+.if !empty(PKG_OPTIONS:Mkerberos4)
+CRYPTO+= uses Kerberos encryption code
CONFIGURE_ARGS+= --with-kerberos=yes
-. if ${MACHINE_PLATFORM:MNetBSD-1.[0-4]*-i386} == ""
+. if empty(MACHINE_PLATFORM:MNetBSD-1.[0-4]*-i386)
REPLACE_KERBEROS_LIBS= # defined
. endif
.else
CONFIGURE_ARGS+= --with-kerberos=no
.endif
-.if defined(USE_INET6) && !empty(USE_INET6:M[yY][eE][sS])
-CONFIGURE_ARGS+= --enable-inet6
+.if !empty(PKG_OPTIONS:Mssl)
+. include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ssl=${SSLBASE}
+.else
+CONFIGURE_ARGS+= --without-ssl
.endif
DOCDIR= ${PREFIX}/share/doc/fetchmail
RCD_SCRIPTS= fetchmail
+.include "../../devel/gettext-lib/buildlink3.mk"
+
post-extract:
@${RM} -f ${WRKSRC}/intl/libintl.h
.if ${OPSYS} == "NetBSD"
@@ -86,5 +104,4 @@ post-install:
${INSTALL_DATA} $$file ${DOCDIR}; \
done
-.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/mutt-devel/Makefile.options b/mail/mutt-devel/Makefile.options
index 43b2fd0fb81..3715c78aecc 100644
--- a/mail/mutt-devel/Makefile.options
+++ b/mail/mutt-devel/Makefile.options
@@ -1,52 +1,37 @@
-# $NetBSD: Makefile.options,v 1.2 2004/07/23 15:00:12 jlam Exp $
-#
-# MUTT_ALL_OPTIONS lists all of the currently-supported optional modules
-# that may be built into Mutt.
-#
-# MUTT_OPTIONS is a list of the modules that will be built into Mutt.
-#
-MUTT_ALL_OPTIONS= slang ncurses ssl sasl
+# $NetBSD: Makefile.options,v 1.3 2004/07/30 21:05:41 jlam Exp $
+# Global and legacy options
.if defined(MUTT_USE_SLANG) || defined(MUTT_USE_NCURSES) || \
defined(MUTT_USE_SSL) || defined(MUTT_USE_SASL)
-. if !defined(MUTT_OPTIONS)
+. if !defined(PKG_OPTIONS.mutt)
. if defined(MUTT_USE_SLANG) && !empty(MUTT_USE_SLANG:M[yY][eE][sS])
-MUTT_OPTIONS+= slang
+PKG_OPTIONS.mutt+= slang
. endif
. if defined(MUTT_USE_NCURSES) && !empty(MUTT_USE_NCURSES:M[yY][eE][sS])
-MUTT_OPTIONS+= ncurses
+PKG_OPTIONS.mutt+= ncurses
. endif
. if defined(MUTT_USE_SSL) && !empty(MUTT_USE_SSL:M[yY][eE][sS])
-MUTT_OPTIONS+= ssl
+PKG_OPTIONS.mutt+= ssl
. endif
. if defined(MUTT_USE_SASL) && !empty(MUTT_USE_SASL:M[yY][eE][sS])
-MUTT_OPTIONS+= sasl
+PKG_OPTIONS.mutt+= sasl
. endif
. endif
.endif
+PKG_OPTIONS.mutt?= ssl
-MUTT_OPTIONS?= ssl
-BUILD_DEFS+= MUTT_OPTIONS
-
-_MUTT_OPTIONS= # empty
-.for _opt_ in ${MUTT_OPTIONS}
-. if empty(_MUTT_OPTIONS:M${_opt_})
-. if !empty(MUTT_ALL_OPTIONS:M${_opt_})
-_MUTT_OPTIONS+= ${_opt_}
-. else
-PKG_FAIL_REASON+= "\"${_opt_}\" is not a supported Mutt build option."
-. endif
-. endif
-.endfor
+PKG_OPTIONS_VAR= PKG_OPTIONS.mutt
+PKG_SUPPORTED_OPTIONS= slang ncurses ssl sasl
+.include "../../mk/bsd.options.mk"
###
### Slang and ncurses
###
-.if !empty(_MUTT_OPTIONS:Mslang)
+.if !empty(PKG_OPTIONS:Mslang)
. include "../../devel/libslang/buildlink3.mk"
CONFIGURE_ARGS+= --with-slang=${BUILDLINK_PREFIX.libslang}
.else
-. if !empty(_MUTT_OPTIONS:Mslang)
+. if !empty(PKG_OPTIONS:Mslang)
USE_NCURSES= yes
. endif
. include "../../devel/ncurses/buildlink3.mk"
@@ -56,7 +41,7 @@ CONFIGURE_ARGS+= --with-curses=${BUILDLINK_PREFIX.ncurses}
###
### SASLv2
###
-.if !empty(_MUTT_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --with-sasl2=${BUILDLINK_PREFIX.cyrus-sasl}
.endif
@@ -64,7 +49,7 @@ CONFIGURE_ARGS+= --with-sasl2=${BUILDLINK_PREFIX.cyrus-sasl}
###
### SSL
###
-.if !empty(_MUTT_OPTIONS:Mssl)
+.if !empty(PKG_OPTIONS:Mssl)
. include "../../security/openssl/buildlink3.mk"
CONFIGURE_ARGS+= --with-ssl=${SSLBASE}
.else
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index 7c0a7d6bc4b..e91b3b70c6c 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.144 2004/07/29 10:15:38 martti Exp $
+# $NetBSD: Makefile,v 1.145 2004/07/30 21:05:41 jlam Exp $
DISTNAME= postfix-2.1.4
CATEGORIES= mail
@@ -42,9 +42,7 @@ CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
# Makefile.options appends to CCARGS and AUXLIBS the options needed to
-# build Postfix with support for various add-on modules. It also defines
-# _POSTFIX_OPTIONS, which is POSTFIX_OPTIONS filtered to only contain
-# supported modules.
+# build Postfix with support for various add-on modules.
#
.include "Makefile.options"
@@ -85,7 +83,7 @@ CONF_FILES_PERMS+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
${ROOT_USER} ${ROOT_GROUP} 755
.endfor
.undef _file_
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
MAKE_DIRS+= ${SASLLIBDIR}
CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
.endif
@@ -108,7 +106,7 @@ do-configure:
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/mailer.conf \
> ${WRKDIR}/mailer.conf
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
.endif
@@ -121,7 +119,7 @@ do-install:
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
${INSTALL_DATA_DIR} ${DOCDIR}
-${RM} -f ${WRKSRC}/conf/*.orig
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR}
.endif
@for i in ${POSTFIX_EXAMPLE_FILES}; do \
diff --git a/mail/postfix/Makefile.options b/mail/postfix/Makefile.options
index a871cc437de..b8d626445d2 100644
--- a/mail/postfix/Makefile.options
+++ b/mail/postfix/Makefile.options
@@ -1,29 +1,65 @@
-# $NetBSD: Makefile.options,v 1.4 2004/07/24 22:45:15 recht Exp $
-#
-# POSTFIX_ALL_OPTIONS lists all of the currently-supported optional modules
-# that may be built into Postfix.
+# $NetBSD: Makefile.options,v 1.5 2004/07/30 21:05:41 jlam Exp $
+
+# Global and legacy options
#
-# POSTFIX_OPTIONS is a list of the modules that will be built into Postfix.
+# XXX Support for the following variables will be removed after the
+# XXX pkgsrc-2004Q3 branch is released:
+# XXX
+# XXX POSTFIX_USE_INET6 POSTFIX_USE_TLS
+# XXX POSTFIX_USE_PCRE POSTFIX_USE_MYSQL
+# XXX POSTFIX_USE_PGSQL POSTFIX_USE_VERP
+# XXX POSTFIX_USE_SASL_AUTH POSTFIX_OPTIONS
#
-POSTFIX_ALL_OPTIONS= inet6 ldap mysql mysql4 pcre sasl tls
-POSTFIX_OPTIONS?= # empty
-BUILD_DEFS+= POSTFIX_OPTIONS
-
-_POSTFIX_OPTIONS= # empty
-.for _opt_ in ${POSTFIX_OPTIONS}
-. if empty(_POSTFIX_OPTIONS:M${_opt_})
-. if !empty(POSTFIX_ALL_OPTIONS:M${_opt_})
-_POSTFIX_OPTIONS+= ${_opt_}
-. else
-PKG_FAIL_REASON+= "\"${_opt_}\" is not a supported Postfix build option."
+.if defined(USE_SASL) || defined(USE_SASL2) || defined(USE_OPENLDAP) || \
+ defined(POSTFIX_USE_INET6) || defined(POSTFIX_USE_TLS) || \
+ defined(POSTFIX_USE_PCRE) || defined(POSTFIX_USE_MYSQL) || \
+ defined(POSTFIX_USE_PGSQL) || defined(POSTFIX_USE_VERP) || \
+ defined(POSTFIX_USE_SASL_AUTH)
+. if !defined(PKG_OPTIONS.postfix)
+. if defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= ldap
+. endif
+. if defined(POSTFIX_USE_INET6) && !empty(POSTFIX_USE_INET6:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= inet6
+. endif
+. if defined(POSTFIX_USE_TLS) && !empty(POSTFIX_USE_TLS:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= tls
+. endif
+. if defined(POSTFIX_USE_PCRE) && !empty(POSTFIX_USE_PCRE:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= pcre
+. endif
+. if defined(POSTFIX_USE_MYSQL) && !empty(POSTFIX_USE_MYSQL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= mysql
+. endif
+. if defined(POSTFIX_USE_PGSQL) && !empty(POSTFIX_USE_PGSQL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= pgsql
+. endif
+. if defined(POSTFIX_USE_VERP) && !empty(POSTFIX_USE_VERP:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= verp
+. endif
+. if defined(POSTFIX_USE_SASL_AUTH) && defined(POSTFIX_USE_SASL_AUTH)
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(POSTFIX_OPTIONS)
+PKG_OPTIONS.postfix= ${POSTFIX_OPTIONS}
. endif
. endif
-.endfor
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
+PKG_SUPPORTED_OPTIONS= inet6 ldap mysql mysql4 pcre sasl tls
+.include "../../mk/bsd.options.mk"
###
### IPv6 and STARTTLS support (http://www.ipnet6.org/postfix/)
###
-.if !empty(_POSTFIX_OPTIONS:Minet6) || !empty(_POSTFIX_OPTIONS:Mtls)
+.if !empty(PKG_OPTIONS:Minet6) || !empty(PKG_OPTIONS:Mtls)
. include "../../security/openssl/buildlink3.mk"
PATCHFILES+= tls+ipv6-1.25-pf-2.1.3.patch.gz
PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/
@@ -41,7 +77,7 @@ MESSAGE_SRC+= ${PKGDIR}/MESSAGE.tls
###
### Support "pcre" map type for regular expressions.
###
-.if !empty(_POSTFIX_OPTIONS:Mpcre)
+.if !empty(PKG_OPTIONS:Mpcre)
. include "../../devel/pcre/buildlink3.mk"
CCARGS+= -DHAS_PCRE
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
@@ -54,7 +90,7 @@ CCARGS+= -DNO_PCRE
###
### Support LDAP directories for table lookups.
###
-.if !empty(_POSTFIX_OPTIONS:Mldap)
+.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CCARGS+= -DHAS_LDAP
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
@@ -72,12 +108,12 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.db4}/lib \
###
### Support using a MySQL database server for table lookups.
###
-.if !empty(_POSTFIX_OPTIONS:Mmysql4)
+.if !empty(PKG_OPTIONS:Mmysql4)
. include "../../databases/mysql4-client/buildlink3.mk"
CCARGS+= -DHAS_MYSQL
CCARGS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --include`
AUXLIBS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --libs`
-.elif !empty(_POSTFIX_OPTIONS:Mmysql)
+.elif !empty(PKG_OPTIONS:Mmysql)
. include "../../databases/mysql-client/buildlink3.mk"
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
@@ -88,7 +124,7 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
## ###
## ### Support using a PostgreSQL database server for table lookups.
## ###
-## .if !empty(_POSTFIX_OPTIONS:Mpgsql)
+## .if !empty(PKG_OPTIONS:Mpgsql)
## . include "../../mk/pgsql.buildlink3.mk"
## . include "../../security/openssl/buildlink3.mk"
## PATCHFILES+= postfix-pg.postfix-2.0.0.2.patch
@@ -104,7 +140,7 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
### SASL support for SMTP authentication. If neither SASLv1 or SASLv2 is
### explicitly specified, then build with SASLv2.
###
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
. if !defined(USE_SASL2) && !defined(USE_SASL)
. include "../../security/cyrus-sasl2/buildlink3.mk"
SASLLIBDIR= ${PREFIX}/lib/sasl2
@@ -130,7 +166,6 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl
. endif
-
PLIST_SRC+= ${PKGDIR}/PLIST.sasl
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
diff --git a/mk/bsd.pkg.obsolete.mk b/mk/bsd.pkg.obsolete.mk
index 81a9571ecb8..d6491705177 100644
--- a/mk/bsd.pkg.obsolete.mk
+++ b/mk/bsd.pkg.obsolete.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.obsolete.mk,v 1.14 2004/07/21 16:19:26 jlam Exp $
+# $NetBSD: bsd.pkg.obsolete.mk,v 1.15 2004/07/30 21:05:41 jlam Exp $
#
# This file holds make(1) logic to allow obsolete or deprecated variables
# still to be used. These may eventually disappear over time as the contents
@@ -50,45 +50,77 @@ ELK_GUI= xaw
PKG_SYSCONFDIR.priv?= ${PRIV_CONF_DIR}
.endif
-##
-## The following Postfix-related section will be removed after the
-## pkgsrc-2004Q3 branch is released.
-##
-.if defined(POSTFIX_USE_INET6) || defined(POSTFIX_USE_TLS) || \
- defined(POSTFIX_USE_PCRE) || defined(POSTFIX_USE_MYSQL) || \
- defined(POSTFIX_USE_PGSQL) || defined(POSTFIX_USE_VERP) || \
- defined(POSTFIX_USE_SASL_AUTH) || defined(USE_SASL) || \
- defined(USE_SASL2) || defined(USE_OPENLDAP)
-. if !defined(POSTFIX_OPTIONS)
-. if defined(POSTFIX_USE_INET6) && !empty(POSTFIX_USE_INET6:M[yY][eE][sS])
-POSTFIX_OPTIONS+= inet6
-. endif
-. if defined(POSTFIX_USE_TLS) && !empty(POSTFIX_USE_TLS:M[yY][eE][sS])
-POSTFIX_OPTIONS+= tls
-. endif
-. if defined(POSTFIX_USE_PCRE) && !empty(POSTFIX_USE_PCRE:M[yY][eE][sS])
-POSTFIX_OPTIONS+= pcre
-. endif
-. if defined(POSTFIX_USE_MYSQL) && !empty(POSTFIX_USE_MYSQL:M[yY][eE][sS])
-POSTFIX_OPTIONS+= mysql
-. endif
-. if defined(POSTFIX_USE_PGSQL) && !empty(POSTFIX_USE_PGSQL:M[yY][eE][sS])
-POSTFIX_OPTIONS+= pgsql
-. endif
-. if defined(POSTFIX_USE_VERP) && !empty(POSTFIX_USE_VERP:M[yY][eE][sS])
-POSTFIX_OPTIONS+= verp
-. endif
-. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
-POSTFIX_OPTIONS+= ldap
-. endif
-. if defined(POSTFIX_USE_SASL_AUTH) && defined(POSTFIX_USE_SASL_AUTH)
-USE_SASL= YES
-. endif
-. if defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
-POSTFIX_OPTIONS+= sasl
-. endif
-. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
-POSTFIX_OPTIONS+= sasl
-. endif
+###
+### Set PKG_DEFAULT_OPTIONS based on global variable settings.
+###
+.if defined(KERBEROS)
+. if ${KERBEROS} == "4"
+PKG_DEFAULT_OPTIONS+= kerberos4
+. else
+PKG_DEFAULT_OPTIONS+= kerberos
. endif
.endif
+.if defined(USE_CANNA) && !empty(USE_CANNA:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= canna
+.endif
+.if defined(USE_CUPS) && !empty(USE_CUPS:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= cups
+.endif
+.if defined(USE_DB4) && !empty(USE_DB4:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= db4
+.endif
+.if defined(USE_ESOUND) && !empty(USE_ESOUND:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= esound
+.endif
+.if defined(USE_GIF)
+PKG_DEFAULT_OPTIONS+= gif
+.endif
+.if defined(USE_I586) && !empty(USE_I586:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= i586
+.endif
+.if defined(USE_IDEA) && !empty(USE_IDEA:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= idea
+.endif
+.if defined(USE_INN) && !empty(USE_INN:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= inn
+.endif
+.if defined(USE_LIBCRACK) && !empty(USE_LIBCRACK:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= libcrack
+.endif
+.if defined(USE_MMX) && !empty(USE_MMX:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= mmx
+.endif
+.if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= openldap
+.endif
+.if defined(USE_OSS)
+PKG_DEFAULT_OPTIONS+= oss
+.endif
+.if defined(USE_PAM)
+PKG_DEFAULT_OPTIONS+= pam
+.endif
+.if defined(USE_RSAREF2)
+PKG_DEFAULT_OPTIONS+= rsaref
+.endif
+.if defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= sasl
+.endif
+.if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= sasl
+.endif
+.if defined(USE_SJ3) && !empty(USE_SJ3:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= sj3
+.endif
+.if defined(USE_SOCKS)
+. if ${USE_SOCKS} == "4"
+PKG_DEFAULT_OPTIONS+= socks4
+. elif ${USE_SOCKS} == "5"
+PKG_DEFAULT_OPTIONS+= socks5
+. endif
+.endif
+.if defined(USE_WNN4) && !empty(USE_WNN4:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= wnn4
+.endif
+.if defined(USE_XFACE) && !empty(USE_XFACE:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= xface
+.endif
diff --git a/net/samba/Makefile b/net/samba/Makefile
index 360f0a625a6..642c302e4a5 100644
--- a/net/samba/Makefile
+++ b/net/samba/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.123 2004/07/23 15:11:30 tron Exp $
+# $NetBSD: Makefile,v 1.124 2004/07/30 21:05:41 jlam Exp $
DISTNAME= samba-3.0.5
CATEGORIES= net
@@ -24,7 +24,6 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/source
USE_BUILDLINK3= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV+= PERL="${PERL5}"
-PLIST_SRC= # empty
.include "../../mk/bsd.prefs.mk"
@@ -65,48 +64,7 @@ USE_GNU_READLINE= yes
.include "../../devel/readline/buildlink3.mk"
CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
-.if defined(SAMBA_WITH_ADS) && !empty(SAMBA_WITH_ADS:M[yY][eE][sS])
-. include "../../mk/krb5.buildlink3.mk"
-SAMBA_USE_LDAP= # defined
-CONFIGURE_ARGS+= --with-ads
-CONFIGURE_ARGS+= --with-krb5=${KRB5BASE}
-.else
-CONFIGURE_ARGS+= --without-ads
-CONFIGURE_ARGS+= --without-krb5
-.endif
-BUILD_DEFS+= SAMBA_WITH_ADS
-
-.if defined(USE_CUPS) && !empty(USE_CUPS:M[yY][eE][sS])
-. include "../../print/cups/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-cups
-.else
-CONFIGURE_ARGS+= --disable-cups
-.endif
-BUILD_DEFS+= USE_CUPS
-
-.if defined(USE_PAM)
-. include "../../security/PAM/module.mk"
-CONFIGURE_ARGS+= --with-pam
-CONFIGURE_ARGS+= --with-pam_smbpass
-PLIST_SRC+= ${PKGDIR}/PLIST.pam
-.endif
-BUILD_DEFS+= USE_PAM
-
-.if defined(SAMBA_USE_LDAP) || (defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS]))
-. include "../../databases/openldap/buildlink3.mk"
-CONFIGURE_ARGS+= --with-ldap
-. if defined(SAMBA_USE_LDAP_COMPAT) && \
- !empty(SAMBA_USE_LDAP_COMPAT:M[yY][eE][sS])
-CONFIGURE_ARGS+= --with-ldapsam
-. endif
-.else
-CONFIGURE_ARGS+= --without-ldap
-.endif
-BUILD_DEFS+= USE_OPENLDAP
-BUILD_DEFS+= SAMBA_USE_LDAP
-BUILD_DEFS+= SAMBA_USE_LDAP_COMPAT
-
-PLIST_SRC+= ${PKGDIR}/PLIST
+.include "Makefile.options"
.if !defined(MKTEMP)
MKTEMP!= ${TYPE} mktemp 2>&1 | \
@@ -124,13 +82,6 @@ FILES_SUBST+= PWD_MKDB=${PWD_MKDB:Q}
DOCDIR= ${PREFIX}/share/doc/${PKGBASE}
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
-.if ${OPSYS} == "Linux"
-CONFIGURE_ARGS+= --with-smbmount
-PLIST_SUBST+= SMBMOUNT=
-.else
-PLIST_SUBST+= SMBMOUNT="@comment "
-.endif
-
USE_PKGINSTALL= yes
CONF_FILES= ${EGDIR}/smb.conf.default ${SAMBA_ETCDIR}/smb.conf
SUPPORT_FILES_PERMS= ${EGDIR}/adduser.sh ${SAMBA_ETCDIR}/adduser \
@@ -169,7 +120,7 @@ post-install:
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} mknissmbpwdtbl.sh ${EGDIR}
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} mksmbpasswd.sh ${EGDIR}
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} updatesmbpasswd.sh ${EGDIR}
-.if defined(USE_PAM)
+.if !empty(PKG_OPTIONS:MPAM)
${INSTALL_DATA_DIR} ${PAM_INSTMODULEDIR}
${INSTALL_LIBRARY} ${WRKSRC}/bin/pam_smbpass.so ${PAM_INSTMODULEDIR}
${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/pam_winbind.so ${PAM_INSTMODULEDIR}
diff --git a/net/samba/Makefile.options b/net/samba/Makefile.options
new file mode 100644
index 00000000000..daeab7a9a39
--- /dev/null
+++ b/net/samba/Makefile.options
@@ -0,0 +1,96 @@
+# $NetBSD: Makefile.options,v 1.1 2004/07/30 21:05:41 jlam Exp $
+
+# Global and legacy options
+.if defined(USE_CUPS) || defined(USE_PAM) || defined(USE_OPENLDAP) || \
+ defined(SAMBA_WITH_ADS) || defined(SAMBA_USE_LDAP) || \
+ defined(SAMBA_USE_LDAP_COMPAT)
+. if !defined(PKG_OPTIONS.samba)
+. if defined(USE_CUPS) && !empty(USE_CUPS:M[yY][eE][sS])
+PKG_OPTIONS.samba+= cups
+. endif
+. if defined(USE_PAM)
+PKG_OPTIONS.samba+= PAM
+. endif
+. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
+PKG_OPTIONS.samba+= ldap
+. endif
+. if defined(SAMBA_WITH_ADS) && !empty(SAMBA_WITH_ADS:M[yY][eE][sS])
+PKG_OPTIONS.samba+= ads
+. endif
+. if defined(SAMBA_USE_LDAP)
+PKG_OPTIONS.samba+= ldap
+. endif
+. if defined(SAMBA_USE_LDAP_COMPAT) && \
+ !empty(SAMBA_USE_LDAP_COMPAT:M[yY][eE][sS])
+PKG_OPTIONS.samba+= ldap-compat
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.samba
+PKG_SUPPORTED_OPTIONS= PAM ads cups ldap ldap-compat
+.include "../../mk/bsd.options.mk"
+
+###
+### Support PAM authentication and build smbpass and winbind PAM modules.
+###
+.if !empty(PKG_OPTIONS:MPAM)
+. include "../../security/PAM/module.mk"
+CONFIGURE_ARGS+= --with-pam
+CONFIGURE_ARGS+= --with-pam_smbpass
+PLIST_SUBST+= PAM=
+.else
+PLIST_SUBST+= PAM="@comment "
+.endif
+
+###
+### Allow Samba to join as a member server of an Active Directory domain.
+###
+.if !empty(PKG_OPTIONS:Mads)
+. include "../../mk/krb5.buildlink3.mk"
+PKG_OPTIONS+= ldap
+CONFIGURE_ARGS+= --with-ads
+CONFIGURE_ARGS+= --with-krb5=${KRB5BASE}
+.else
+CONFIGURE_ARGS+= --without-ads
+CONFIGURE_ARGS+= --without-krb5
+.endif
+
+###
+### Native CUPS support for printing
+###
+.if !empty(PKG_OPTIONS:Mcups)
+. include "../../print/cups/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-cups
+.else
+CONFIGURE_ARGS+= --disable-cups
+.endif
+
+###
+### Support Samba-2.x LDAP password and account databases.
+###
+.if !empty(PKG_OPTIONS:Mldap-compat)
+PKG_OPTIONS+= ldap
+CONFIGURE_ARGS+= --with-ldapsam
+.endif
+
+###
+### Support LDAP authentication and storage of Samba account information.
+###
+.if !empty(PKG_OPTIONS:Mldap)
+. include "../../databases/openldap/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ldap
+.else
+CONFIGURE_ARGS+= --without-ldap
+.endif
+
+###
+### Only Linux supports smbmount for mounting a Samba share into the
+### filesystem.
+###
+.if ${OPSYS} == "Linux"
+CONFIGURE_ARGS+= --with-smbmount
+PLIST_SUBST+= SMBMOUNT=
+.else
+PLIST_SUBST+= SMBMOUNT="@comment "
+.endif
diff --git a/net/samba/PLIST b/net/samba/PLIST
index fad735a1f56..fc7f0e489c4 100644
--- a/net/samba/PLIST
+++ b/net/samba/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.21 2004/05/13 06:44:56 xtraeme Exp $
+@comment $NetBSD: PLIST,v 1.22 2004/07/30 21:05:41 jlam Exp $
bin/findsmb
bin/net
bin/nmblookup
@@ -52,6 +52,8 @@ lib/samba/vfs/netatalk.so
lib/samba/vfs/readonly.so
lib/samba/vfs/recycle.so
lib/samba/vfs/shadow_copy.so
+${PAM}lib/security/pam_smbpass.so
+${PAM}lib/security/pam_winbind.so
man/man1/editreg.1
man/man1/findsmb.1
man/man1/log2pcap.1
@@ -97,6 +99,7 @@ sbin/swat
sbin/winbindd
share/doc/samba/NT4-Locking.reg
share/doc/samba/NT4_PlainPassword.reg
+${PAM}share/doc/samba/README.pam_smbpass
share/doc/samba/Win-2Kx-XPP-DeleteCachedProfiles.reg
share/doc/samba/Win-2Kx-XPP-ForceLocalProfile.reg
share/doc/samba/Win-NT-DeleteRoamingProfile.reg
@@ -113,6 +116,10 @@ share/examples/samba/deluser.sh
share/examples/samba/mknissmbpasswd.sh
share/examples/samba/mknissmbpwdtbl.sh
share/examples/samba/mksmbpasswd.sh
+${PAM}share/examples/samba/pam_smbpass/kdc-pdc
+${PAM}share/examples/samba/pam_smbpass/password-mature
+${PAM}share/examples/samba/pam_smbpass/password-migration
+${PAM}share/examples/samba/pam_smbpass/password-sync
share/examples/samba/samba.schema
share/examples/samba/smb.conf.default
share/examples/samba/updatesmbpasswd.sh
@@ -556,6 +563,7 @@ share/samba/swat/using_samba/toc.html
@dirrm share/samba/swat/help
@dirrm share/samba/swat
@dirrm share/samba
+${PAM}@dirrm share/examples/samba/pam_smbpass
@dirrm share/examples/samba
@dirrm share/doc/samba
@dirrm lib/samba/vfs
diff --git a/net/samba/PLIST.pam b/net/samba/PLIST.pam
deleted file mode 100644
index 18eb3002c82..00000000000
--- a/net/samba/PLIST.pam
+++ /dev/null
@@ -1,9 +0,0 @@
-@comment $NetBSD: PLIST.pam,v 1.1 2004/01/12 03:33:04 jlam Exp $
-lib/security/pam_smbpass.so
-lib/security/pam_winbind.so
-share/doc/samba/README.pam_smbpass
-share/examples/samba/pam_smbpass/kdc-pdc
-share/examples/samba/pam_smbpass/password-mature
-share/examples/samba/pam_smbpass/password-migration
-share/examples/samba/pam_smbpass/password-sync
-@dirrm share/examples/samba/pam_smbpass
diff --git a/print/cups/Makefile b/print/cups/Makefile
index a5976cc80da..1c0c70abcce 100644
--- a/print/cups/Makefile
+++ b/print/cups/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.77 2004/06/23 11:04:37 recht Exp $
+# $NetBSD: Makefile,v 1.78 2004/07/30 21:05:41 jlam Exp $
#
# The CUPS author is very good about taking back changes into the main
# CUPS distribution. The correct place to send patches or bug-fixes is:
@@ -54,18 +54,27 @@ CONFIGURE_ENV+= DSOFLAGS="${LDFLAGS}"
.include "../../mk/bsd.prefs.mk"
+# Global and legacy options
.if defined(USE_PAM)
+. if !defined(PKG_OPTIONS.cups)
+PKG_OPTIONS.cups+= PAM
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cups
+PKG_SUPPORTED_OPTIONS= PAM
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:MPAM)
. include "../../security/PAM/buildlink3.mk"
-BUILD_DEFS+= USE_PAM
CONFIGURE_ARGS+= --enable-pam
-PLIST_SRC= ${PKGDIR}/PLIST.pam
-PLIST_SRC+= ${PKGDIR}/PLIST
MESSAGE_SRC= ${PKGDIR}/MESSAGE
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.pam
+PLIST_SUBST+= PAM=
.else
CONFIGURE_ARGS+= --disable-pam
MESSAGE_SRC= ${.CURDIR}/MESSAGE
-PLIST_SRC= ${PKGDIR}/PLIST
+PLIST_SUBST+= PAM="@comment "
.endif
# CUPS_USER username of the CUPS administrator
@@ -108,7 +117,7 @@ OWN_DIRS_PERMS+= ${CUPS_REQUESTS}/tmp ${CUPS_USER} ${CUPS_GROUP} 1770
pre-configure:
cd ${WRKSRC} && ${AUTOCONF}
-pre-install:
+post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/cups.pam > ${WRKDIR}/cups.pam
post-install:
@@ -126,7 +135,7 @@ post-install:
;; \
esac; \
done
-.if defined(USE_PAM)
+.if !empty(PKG_OPTIONS:MPAM)
${INSTALL_DATA} ${WRKDIR}/cups.pam ${EGDIR}
.endif
diff --git a/print/cups/PLIST b/print/cups/PLIST
index a793333202e..babd9ab5415 100644
--- a/print/cups/PLIST
+++ b/print/cups/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.12 2004/04/23 22:07:57 reed Exp $
+@comment $NetBSD: PLIST,v 1.13 2004/07/30 21:05:41 jlam Exp $
bin/cancel
bin/cups-config
bin/cupstestppd
@@ -502,6 +502,7 @@ share/doc/html/cups/translation.html
share/doc/html/cups/translation.pdf
share/examples/cups/classes.conf
share/examples/cups/client.conf
+${PAM}share/examples/cups/cups.pam
share/examples/cups/cupsd.conf
share/examples/cups/mime.convs
share/examples/cups/mime.types
diff --git a/print/cups/PLIST.pam b/print/cups/PLIST.pam
deleted file mode 100644
index 3a15738d7d8..00000000000
--- a/print/cups/PLIST.pam
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST.pam,v 1.1 2001/10/31 23:32:53 zuntum Exp $
-share/examples/cups/cups.pam
diff --git a/security/PAM/Makefile b/security/PAM/Makefile
index aefd544b413..d2b401c77e3 100644
--- a/security/PAM/Makefile
+++ b/security/PAM/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2004/07/06 22:49:29 jlam Exp $
+# $NetBSD: Makefile,v 1.25 2004/07/30 21:05:41 jlam Exp $
#
DISTNAME= Linux-PAM-0.77
@@ -38,7 +38,20 @@ MESSAGE_SUBST+= PAM_MODULEDIR=${PAM_MODULEDIR}
.include "../../mk/bsd.prefs.mk"
-.if !empty(USE_LIBCRACK:M[yY][eE][sS])
+# Global and legacy options
+.if defined(USE_LIBCRACK)
+. if !defined(PKG_OPTIONS.PAM)
+. if defined(USE_LIBCRACK) && !empty(USE_LIBCRACK:M[yY][eE][sS])
+PKG_OPTIONS.PAM+= libcrack
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.PAM
+PKG_SUPPORTED_OPTIONS= libcrack
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mlibcrack)
. include "../../security/libcrack/buildlink3.mk"
CONFIGURE_ARGS+= --with-libcrack
PLIST_SUBST+= USE_LIBCRACK=
@@ -74,6 +87,8 @@ CONF_FILES= ${EGDIR}/pam.conf ${PKG_SYSCONFBASEDIR}/pam.conf
CONF_FILES+= ${EGDIR}/${FILE} ${PKG_SYSCONFDIR}/${FILE}
.endfor
+.include "../../mk/bdb.buildlink3.mk"
+
post-configure:
cd ${WRKSRC}; for file in libpam/pam_private.h; do \
${SED} -e "s|/etc/|${PKG_SYSCONFBASEDIR}/|g" \
@@ -99,5 +114,4 @@ post-install:
.endif
${INSTALL_DATA_DIR} ${DOCDIR}
-.include "../../mk/bdb.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/security/cyrus-sasl/Makefile b/security/cyrus-sasl/Makefile
index 7e2c80a0849..05df812292b 100644
--- a/security/cyrus-sasl/Makefile
+++ b/security/cyrus-sasl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2004/03/26 02:27:52 wiz Exp $
+# $NetBSD: Makefile,v 1.44 2004/07/30 21:05:41 jlam Exp $
.include "Makefile.common"
@@ -6,32 +6,52 @@ PKGREVISION= 6
SVR4_PKGNAME= csasl
COMMENT= Simple Authentication and Security Layer
-PLIST_SRC+= ${.CURDIR}/PLIST.common
-
# Authentication mechanisms
CONFIGURE_ARGS+= --enable-anon # ANONYMOUS
CONFIGURE_ARGS+= --enable-cram # CRAM-MD5
-
CONFIGURE_ARGS+= --enable-plain # PLAIN
-.if defined(USE_PAM)
+CONFIGURE_ARGS+= --enable-digest # DIGEST-MD5
+CONFIGURE_ARGS+= --with-rc4=${SSLBASE}
+.include "../../security/openssl/buildlink3.mk"
+
+# Global and legacy options
+.if defined(KERBEROS) || defined(USE_PAM) || defined(SASL_USE_GSSAPI)
+. if !defined(PKG_OPTIONS.cyrus-sasl)
+. if defined(KERBEROS)
+PKG_OPTIONS.cyrus-sasl+= kerberos
+. endif
+. if defined(USE_PAM) && !empty(USE_PAM:M[yY][eE][sS])
+PKG_OPTIONS.cyrus-sasl+= PAM
+. endif
+. if defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS])
+PKG_OPTIONS.cyrus-sasl+= gssapi
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cyrus-sasl
+PKG_SUPPORTED_OPTIONS= PAM gssapi kerberos
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:MPAM)
. include "../../security/PAM/buildlink3.mk"
-BUILD_DEFS+= USE_PAM
CONFIGURE_ARGS+= --with-pam=${BUILDLINK_PREFIX.pam}
.endif
-CONFIGURE_ARGS+= --enable-digest # DIGEST-MD5
-CONFIGURE_ARGS+= --with-rc4=${SSLBASE}
-.include "../../security/openssl/buildlink3.mk"
+.if !empty(PKG_OPTIONS:Mkerberos)
+. if empty(PKG_OPTIONS:Mgssapi)
+PKG_OPTIONS+= gssapi
+. endif
+.endif
-.if defined(KERBEROS) || \
- (defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS]))
+.if !empty(PKG_OPTIONS:Mgssapi)
. include "../../mk/krb5.buildlink3.mk"
CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE} # GSSAPI
-PLIST_SRC+= ${.CURDIR}/PLIST.krb5
+PLIST_SUBST+= GSSAPI=
+.else
+PLIST_SUBST+= GSSAPI="@comment "
.endif
-PLIST_SRC+= ${.CURDIR}/PLIST.plugins
-
USE_PKGINSTALL= YES
DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
INSTALL_EXTRA_TMPL+= ${.CURDIR}/INSTALL
diff --git a/security/cyrus-sasl/PLIST.common b/security/cyrus-sasl/PLIST
index 761fa92d0e2..e02e521e7b4 100644
--- a/security/cyrus-sasl/PLIST.common
+++ b/security/cyrus-sasl/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.common,v 1.5 2004/04/23 22:07:58 reed Exp $
+@comment $NetBSD: PLIST,v 1.1 2004/07/30 21:05:41 jlam Exp $
bin/sasl-config
include/hmac-md5.h
include/sasl.h
@@ -9,6 +9,31 @@ lib/libsasl.la
lib/libsasl.so
lib/libsasl.so.8
lib/libsasl.so.8.10
+lib/sasl/libanonymous.a
+lib/sasl/libanonymous.la
+lib/sasl/libanonymous.so
+lib/sasl/libanonymous.so.1
+lib/sasl/libanonymous.so.1.16
+lib/sasl/libcrammd5.a
+lib/sasl/libcrammd5.la
+lib/sasl/libcrammd5.so
+lib/sasl/libcrammd5.so.1
+lib/sasl/libcrammd5.so.1.17
+lib/sasl/libdigestmd5.a
+lib/sasl/libdigestmd5.la
+lib/sasl/libdigestmd5.so
+lib/sasl/libdigestmd5.so.0
+lib/sasl/libdigestmd5.so.0.19
+${GSSAPI}lib/sasl/libgssapiv2.a
+${GSSAPI}lib/sasl/libgssapiv2.la
+${GSSAPI}lib/sasl/libgssapiv2.so
+${GSSAPI}lib/sasl/libgssapiv2.so.1
+${GSSAPI}lib/sasl/libgssapiv2.so.1.18
+lib/sasl/libplain.a
+lib/sasl/libplain.la
+lib/sasl/libplain.so
+lib/sasl/libplain.so.1
+lib/sasl/libplain.so.1.15
man/man3/sasl.3
man/man3/sasl_authorize_t.3
man/man3/sasl_done.3
@@ -53,4 +78,3 @@ share/doc/html/cyrus-sasl/rfc2245.txt
share/doc/html/cyrus-sasl/rfc2831.txt
share/doc/html/cyrus-sasl/sysadmin.html
@dirrm share/doc/html/cyrus-sasl
-@unexec ${RM} -rf ${SASLSOCKETDIR}
diff --git a/security/cyrus-sasl/PLIST.krb5 b/security/cyrus-sasl/PLIST.krb5
deleted file mode 100644
index 6414431fe12..00000000000
--- a/security/cyrus-sasl/PLIST.krb5
+++ /dev/null
@@ -1,6 +0,0 @@
-@comment $NetBSD: PLIST.krb5,v 1.2 2002/03/24 23:30:18 wiz Exp $
-lib/sasl/libgssapiv2.a
-lib/sasl/libgssapiv2.la
-lib/sasl/libgssapiv2.so
-lib/sasl/libgssapiv2.so.1
-lib/sasl/libgssapiv2.so.1.18
diff --git a/security/cyrus-sasl/PLIST.plugins b/security/cyrus-sasl/PLIST.plugins
deleted file mode 100644
index 44faf5cf8dc..00000000000
--- a/security/cyrus-sasl/PLIST.plugins
+++ /dev/null
@@ -1,21 +0,0 @@
-@comment $NetBSD: PLIST.plugins,v 1.4 2002/01/31 20:42:09 jlam Exp $
-lib/sasl/libanonymous.a
-lib/sasl/libanonymous.la
-lib/sasl/libanonymous.so
-lib/sasl/libanonymous.so.1
-lib/sasl/libanonymous.so.1.16
-lib/sasl/libcrammd5.a
-lib/sasl/libcrammd5.la
-lib/sasl/libcrammd5.so
-lib/sasl/libcrammd5.so.1
-lib/sasl/libcrammd5.so.1.17
-lib/sasl/libdigestmd5.a
-lib/sasl/libdigestmd5.la
-lib/sasl/libdigestmd5.so
-lib/sasl/libdigestmd5.so.0
-lib/sasl/libdigestmd5.so.0.19
-lib/sasl/libplain.a
-lib/sasl/libplain.la
-lib/sasl/libplain.so
-lib/sasl/libplain.so.1
-lib/sasl/libplain.so.1.15
diff --git a/security/cyrus-sasl/buildlink3.mk b/security/cyrus-sasl/buildlink3.mk
index 67283f730d8..95355ef7331 100644
--- a/security/cyrus-sasl/buildlink3.mk
+++ b/security/cyrus-sasl/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.2 2004/03/26 02:27:52 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.3 2004/07/30 21:05:41 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
CYRUS_SASL_BUILDLINK3_MK:= ${CYRUS_SASL_BUILDLINK3_MK}+
@@ -18,7 +18,9 @@ BUILDLINK_RECOMMENDED.cyrus-sasl?= cyrus-sasl>=1.5.27nb6
BUILDLINK_PKGSRCDIR.cyrus-sasl?= ../../security/cyrus-sasl
.endif # CYRUS_SASL_BUILDLINK3_MK
-.if defined(USE_PAM)
+PKG_OPTIONS.cyrus-sasl?= ${PKG_DEFAULT_OPTIONS}
+
+.if !empty(PKG_OPTIONS.cyrus-sasl:MPAM)
. include "../../security/PAM/buildlink3.mk"
.endif
diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile
index 459d29b515f..d1bd3693dc4 100644
--- a/security/cyrus-sasl2/Makefile
+++ b/security/cyrus-sasl2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2004/07/08 21:11:25 recht Exp $
+# $NetBSD: Makefile,v 1.33 2004/07/30 21:05:41 jlam Exp $
.include "Makefile.common"
@@ -6,8 +6,6 @@ PKGREVISION= 3
SVR4_PKGNAME= csasl
COMMENT= Simple Authentication and Security Layer
-PLIST_SRC+= ${PKGDIR}/PLIST.common
-
.if exists(/usr/include/ndbm.h)
SASL_DBTYPE?= ndbm
.else
@@ -42,6 +40,8 @@ AUTHDAEMONVAR?= ${VARBASE}/authdaemon
CONFIGURE_ARGS+= --with-authdaemond=${AUTHDAEMONVAR}
BUILD_DEFS+= AUTHDAEMONVAR
+.include "Makefile.options"
+
.if exists(/dev/urandom)
SASL_ENTROPY_SOURCE?= /dev/urandom
.endif
@@ -50,21 +50,6 @@ CONFIGURE_ARGS+= --with-devrandom=${SASL_ENTROPY_SOURCE}
.endif
BUILD_DEFS+= SASL_ENTROPY_SOURCE
-.if defined(KERBEROS)
-SASL_USE_GSSAPI= yes
-.endif
-.if (defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS]))
-. include "../../mk/krb5.buildlink3.mk"
-CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE} # GSSAPI
-CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}}
-GSSIMPL.heimdal= heimdal
-GSSIMPL.mit-krb5= mit
-PLIST_SRC+= ${PKGDIR}/PLIST.krb5
-.endif
-BUILD_DEFS+= SASL_USE_GSSAPI
-
-PLIST_SRC+= ${PKGDIR}/PLIST.plugins
-
USE_PKGINSTALL= YES
DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
diff --git a/security/cyrus-sasl2/Makefile.options b/security/cyrus-sasl2/Makefile.options
new file mode 100644
index 00000000000..a33fbc55c1f
--- /dev/null
+++ b/security/cyrus-sasl2/Makefile.options
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile.options,v 1.1 2004/07/30 21:05:41 jlam Exp $
+
+# Global and legacy options
+.if defined(KERBEROS) || defined(SASL_USE_GSSAPI)
+. if !defined(PKG_OPTIONS.cyrus-sasl)
+. if defined(KERBEROS)
+PKG_OPTIONS.cyrus-sasl+= kerberos
+. endif
+. if defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS])
+PKG_OPTIONS.cyrus-sasl+= gssapi
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cyrus-sasl
+PKG_SUPPORTED_OPTIONS= gssapi kerberos
+.include "../../mk/bsd.options.mk"
+
+###
+### Kerberos authentication is via GSSAPI.
+###
+.if !empty(PKG_OPTIONS:Mkerberos)
+. if empty(PKG_OPTIONS:Mgssapi)
+PKG_OPTIONS+= gssapi
+. endif
+.endif
+
+###
+### Authentication via GSSAPI (which supports primarily Kerberos 5)
+###
+.if !empty(PKG_OPTIONS:Mgssapi)
+. include "../../mk/krb5.buildlink3.mk"
+CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE}
+CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}}
+GSSIMPL.heimdal= heimdal
+GSSIMPL.mit-krb5= mit
+PLIST_SUBST+= GSSAPI=
+.else
+PLIST_SUBST+= GSSAPI="@comment "
+.endif
diff --git a/security/cyrus-sasl2/PLIST.common b/security/cyrus-sasl2/PLIST
index 3a4421e68cb..9fef67e86b1 100644
--- a/security/cyrus-sasl2/PLIST.common
+++ b/security/cyrus-sasl2/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.common,v 1.13 2004/03/29 05:47:31 jlam Exp $
+@comment $NetBSD: PLIST,v 1.1 2004/07/30 21:05:41 jlam Exp $
include/sasl/hmac-md5.h
include/sasl/md5.h
include/sasl/md5global.h
@@ -11,6 +11,34 @@ lib/libsasl2.la
lib/libsasl2.so
lib/libsasl2.so.2
lib/libsasl2.so.2.18
+lib/sasl2/libanonymous.la
+lib/sasl2/libanonymous.so
+lib/sasl2/libanonymous.so.2
+lib/sasl2/libanonymous.so.2.18
+lib/sasl2/libcrammd5.la
+lib/sasl2/libcrammd5.so
+lib/sasl2/libcrammd5.so.2
+lib/sasl2/libcrammd5.so.2.18
+lib/sasl2/libdigestmd5.la
+lib/sasl2/libdigestmd5.so
+lib/sasl2/libdigestmd5.so.2
+lib/sasl2/libdigestmd5.so.2.18
+${GSSAPI}lib/sasl2/libgssapiv2.la
+${GSSAPI}lib/sasl2/libgssapiv2.so
+${GSSAPI}lib/sasl2/libgssapiv2.so.2
+${GSSAPI}lib/sasl2/libgssapiv2.so.2.18
+lib/sasl2/libotp.la
+lib/sasl2/libotp.so
+lib/sasl2/libotp.so.2
+lib/sasl2/libotp.so.2.18
+lib/sasl2/libplain.la
+lib/sasl2/libplain.so
+lib/sasl2/libplain.so.2
+lib/sasl2/libplain.so.2.18
+lib/sasl2/libsasldb.la
+lib/sasl2/libsasldb.so
+lib/sasl2/libsasldb.so.2
+lib/sasl2/libsasldb.so.2.18
man/man3/sasl.3
man/man3/sasl_authorize_t.3
man/man3/sasl_auxprop.3
diff --git a/security/cyrus-sasl2/PLIST.krb5 b/security/cyrus-sasl2/PLIST.krb5
deleted file mode 100644
index d6e66038610..00000000000
--- a/security/cyrus-sasl2/PLIST.krb5
+++ /dev/null
@@ -1,5 +0,0 @@
-@comment $NetBSD: PLIST.krb5,v 1.9 2004/03/29 05:47:31 jlam Exp $
-lib/sasl2/libgssapiv2.la
-lib/sasl2/libgssapiv2.so
-lib/sasl2/libgssapiv2.so.2
-lib/sasl2/libgssapiv2.so.2.18
diff --git a/security/cyrus-sasl2/PLIST.plugins b/security/cyrus-sasl2/PLIST.plugins
deleted file mode 100644
index 12b69f45061..00000000000
--- a/security/cyrus-sasl2/PLIST.plugins
+++ /dev/null
@@ -1,25 +0,0 @@
-@comment $NetBSD: PLIST.plugins,v 1.8 2004/03/29 05:47:31 jlam Exp $
-lib/sasl2/libanonymous.la
-lib/sasl2/libanonymous.so
-lib/sasl2/libanonymous.so.2
-lib/sasl2/libanonymous.so.2.18
-lib/sasl2/libcrammd5.la
-lib/sasl2/libcrammd5.so
-lib/sasl2/libcrammd5.so.2
-lib/sasl2/libcrammd5.so.2.18
-lib/sasl2/libdigestmd5.la
-lib/sasl2/libdigestmd5.so
-lib/sasl2/libdigestmd5.so.2
-lib/sasl2/libdigestmd5.so.2.18
-lib/sasl2/libotp.la
-lib/sasl2/libotp.so
-lib/sasl2/libotp.so.2
-lib/sasl2/libotp.so.2.18
-lib/sasl2/libplain.la
-lib/sasl2/libplain.so
-lib/sasl2/libplain.so.2
-lib/sasl2/libplain.so.2.18
-lib/sasl2/libsasldb.la
-lib/sasl2/libsasldb.so
-lib/sasl2/libsasldb.so.2
-lib/sasl2/libsasldb.so.2.18
diff --git a/security/cyrus-saslauthd/Makefile b/security/cyrus-saslauthd/Makefile
index ee328de2feb..7b849e5dd62 100644
--- a/security/cyrus-saslauthd/Makefile
+++ b/security/cyrus-saslauthd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2004/07/25 04:35:14 grant Exp $
+# $NetBSD: Makefile,v 1.16 2004/07/30 21:05:42 jlam Exp $
DISTNAME= cyrus-sasl-2.1.18
PKGNAME= ${DISTNAME:S/sasl/saslauthd/}
@@ -23,41 +23,15 @@ COMMENT= Cyrus SASL plaintext authentication daemon
USE_BUILDLINK3= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
-PLIST_SRC= ${PKGDIR}/PLIST
ALL_TARGET= all saslcache testsaslauthd
-BUILD_DEFS+= USE_PAM USE_OPENLDAP SASL_USE_GSSAPI
-
SASLSOCKETDIR?= ${VARBASE}/run/saslauthd
BUILD_DEFS+= SASLSOCKETDIR
FILES_SUBST+= SASLSOCKETDIR=${SASLSOCKETDIR}
CONFIGURE_ARGS+= --with-saslauthd="${SASLSOCKETDIR}"
-.if defined(USE_PAM)
-. include "../../security/PAM/buildlink3.mk"
-CONFIGURE_ARGS+= --with-pam=${BUILDLINK_PREFIX.pam}
-.endif
-
-.if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[Yy][Ee][Ss])
-. include "../../databases/openldap/buildlink3.mk"
-. include "../../security/cyrus-sasl2/buildlink3.mk"
-BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
-CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap}
-CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
-PLIST_SRC+= ${PKGDIR}/PLIST.ldap
-.endif
-
-.if defined(KERBEROS)
-SASL_USE_GSSAPI= yes
-.endif
-.if (defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS]))
-. include "../../mk/krb5.buildlink3.mk"
-CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE}
-CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}}
-GSSIMPL.heimdal= heimdal
-GSSIMPL.mit-krb5= mit
-.endif
+.include "Makefile.options"
USE_PKGINSTALL= yes
DEINSTALL_EXTRA_TMPL= ${PKGDIR}/DEINSTALL
@@ -80,11 +54,10 @@ post-install:
for f in saslcache testsaslauthd; do \
${INSTALL_PROGRAM} ${WRKSRC}/$$f ${PREFIX}/bin/$$f; \
done
-.if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[Yy][Ee][Ss])
+.if !empty(PKG_OPTIONS:Mldap)
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cyrus-saslauthd
- ${INSTALL_DATA} ${WRKSRC}/LDAP_SASLAUTHD \
+ ${INSTALL_DATA} ${WRKSRC}/LDAP_SASLAUTHD \
${PREFIX}/share/doc/cyrus-saslauthd
.endif
-.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/security/cyrus-saslauthd/Makefile.options b/security/cyrus-saslauthd/Makefile.options
new file mode 100644
index 00000000000..25bb5dc61a7
--- /dev/null
+++ b/security/cyrus-saslauthd/Makefile.options
@@ -0,0 +1,68 @@
+# $NetBSD: Makefile.options,v 1.1 2004/07/30 21:05:42 jlam Exp $
+
+# Global and legacy options
+.if defined(KERBEROS) || defined(USE_PAM) || defined(USE_OPENLDAP) || \
+ defined(SASL_USE_GSSAPI)
+. if !defined(PKG_OPTIONS.cyrus-saslauthd)
+. if defined(KERBEROS)
+PKG_OPTIONS.cyrus-saslauthd+= kerberos
+. endif
+. if defined(USE_PAM) && !empty(USE_PAM:M[yY][eE][sS])
+PKG_OPTIONS.cyrus-saslauthd+= PAM
+. endif
+. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
+PKG_OPTIONS.cyrus-saslauthd+= ldap
+. endif
+. if defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS])
+PKG_OPTIONS.cyrus-saslauthd+= gssapi
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cyrus-saslauthd
+PKG_SUPPORTED_OPTIONS= PAM kerberos ldap gssapi
+.include "../../mk/bsd.options.mk"
+
+###
+### PAM (Pluggable Authentication Mechanism)
+###
+.if !empty(PKG_OPTIONS:MPAM)
+. include "../../security/PAM/buildlink3.mk"
+CONFIGURE_ARGS+= --with-pam=${BUILDLINK_PREFIX.pam}
+.endif
+
+###
+### Authentication against information stored in an LDAP directory
+###
+.if !empty(PKG_OPTIONS:Mldap)
+. include "../../databases/openldap/buildlink3.mk"
+. include "../../security/cyrus-sasl2/buildlink3.mk"
+. include "../../security/openssl/buildlink3.mk"
+BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
+CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap}
+CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
+PLIST_SUBST+= LDAP=
+.else
+CONFIGURE_ARGS+= --without-openssl
+PLIST_SUBST+= LDAP="@comment "
+.endif
+
+###
+### Kerberos authentication is via GSSAPI.
+###
+.if !empty(PKG_OPTIONS:Mkerberos)
+. if empty(PKG_OPTIONS:Mgssapi)
+PKG_OPTIONS+= gssapi
+. endif
+.endif
+
+###
+### Authentication via GSSAPI (which supports primarily Kerberos 5)
+###
+.if !empty(PKG_OPTIONS:Mgssapi)
+. include "../../mk/krb5.buildlink3.mk"
+CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE}
+CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}}
+GSSIMPL.heimdal= heimdal
+GSSIMPL.mit-krb5= mit
+.endif
diff --git a/security/cyrus-saslauthd/PLIST b/security/cyrus-saslauthd/PLIST
index 578a945e3b2..e68e6f3ad14 100644
--- a/security/cyrus-saslauthd/PLIST
+++ b/security/cyrus-saslauthd/PLIST
@@ -1,5 +1,7 @@
-@comment $NetBSD: PLIST,v 1.4 2004/04/23 22:07:58 reed Exp $
+@comment $NetBSD: PLIST,v 1.5 2004/07/30 21:05:42 jlam Exp $
bin/saslcache
bin/testsaslauthd
man/man8/saslauthd.8
sbin/saslauthd
+${LDAP}share/doc/cyrus-saslauthd/LDAP_SASLAUTHD
+${LDAP}@dirrm share/doc/cyrus-saslauthd
diff --git a/security/cyrus-saslauthd/PLIST.ldap b/security/cyrus-saslauthd/PLIST.ldap
deleted file mode 100644
index 85d4f30be66..00000000000
--- a/security/cyrus-saslauthd/PLIST.ldap
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST.ldap,v 1.2 2004/01/13 08:13:42 jlam Exp $
-share/doc/cyrus-saslauthd/LDAP_SASLAUTHD
-@dirrm share/doc/cyrus-saslauthd
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile
index 71e43171d00..a79ee8d8778 100644
--- a/security/heimdal/Makefile
+++ b/security/heimdal/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2004/07/24 14:01:20 jlam Exp $
+# $NetBSD: Makefile,v 1.18 2004/07/30 21:05:42 jlam Exp $
DISTNAME= heimdal-0.6.1
PKGREVISION= 1
@@ -34,19 +34,33 @@ BUILDLINK_INCDIRS.readline= include/readline
CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
LIBS.SunOS= -ltermcap
-BUILD_DEFS+= USE_DB4
-.if defined(USE_DB4) && !empty(USE_DB4:M[yY][eE][sS])
+CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
+.include "../../security/openssl/buildlink3.mk"
+
+# Global and legacy options
+.if defined(USE_DB4) || defined(KERBEROS_PREFIX_CMDS)
+. if !defined(PKG_OPTIONS.mit-krb5)
+. if defined(USE_DB4) && !empty(USE_DB4:M[yY][eE][sS])
+PKG_OPTIONS.mit-krb5+= db4
+. endif
+. if defined(KERBEROS_PREFIX_CMDS) && !empty(KERBEROS_PREFIX_CMDS:M[yY][eE][sS])
+PKG_OPTIONS.mit-krb5+= prefix-cmds
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.heimdal
+PKG_SUPPORTED_OPTIONS= db4 prefix-cmds #ldap
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdb4)
. include "../../databases/db4/buildlink3.mk"
.else
. include "../../mk/bdb.buildlink3.mk"
.endif
-CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
-.include "../../security/openssl/buildlink3.mk"
-
# XXX Using Heimdal with an LDAP backend isn't supported yet.
-#BUILD_DEFS+= HEIMDAL_USE_LDAP
-#.if defined(HEIMDAL_USE_LDAP) && !empty(HEIMDAL_USE_LDAP:M[yY][eE][sS])
+#.if !empty(PKG_OPTIONS:Mldap)
#. include "../../databases/openldap/buildlink3.mk"
#CONFIGURE_ARGS+= --with-openldap=${BUILDLINK_PREFIX.openldap}
#.endif
@@ -54,8 +68,7 @@ CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
# Rename some of Heimdal's applications so they won't conflict with
# other packages.
#
-BUILD_DEFS+= KERBEROS_PREFIX_CMDS
-.if !empty(KERBEROS_PREFIX_CMDS:M[yY][eE][sS])
+.if !empty(PKG_OPTIONS:Mprefix-cmds)
KRB5_PREFIX= k
HEIMDAL_TRANSFORM= s/^ftp/${KRB5_PREFIX}&/; \
s/^login/${KRB5_PREFIX}&/; \
diff --git a/security/mit-krb5/Makefile b/security/mit-krb5/Makefile
index 2f44c795bda..14b8f91c400 100644
--- a/security/mit-krb5/Makefile
+++ b/security/mit-krb5/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2004/07/24 13:56:09 jlam Exp $
+# $NetBSD: Makefile,v 1.10 2004/07/30 21:05:42 jlam Exp $
DISTNAME= krb5-1.3.4
PKGNAME= mit-${DISTNAME}
@@ -54,11 +54,23 @@ CONFIGURE_ARGS+= --without-krb4
CONFIGURE_ARGS+= --without-tcl
MAKE_ENV+= ROOT_USER=${ROOT_USER}
+# Global and legacy options
+.if defined(KERBEROS_PREFIX_CMDS)
+. if !defined(PKG_OPTIONS.mit-krb5)
+. if defined(KERBEROS_PREFIX_CMDS) && !empty(KERBEROS_PREFIX_CMDS:M[yY][eE][sS])
+PKG_OPTIONS.mit-krb5+= prefix-cmds
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.mit-krb5
+PKG_SUPPORTED_OPTIONS= prefix-cmds
+.include "../../mk/bsd.options.mk"
+
# Rename some of MIT krb5's applications so they won't conflict with
# other packages.
#
-BUILD_DEFS+= KERBEROS_PREFIX_CMDS
-.if !empty(KERBEROS_PREFIX_CMDS:M[yY][eE][sS])
+.if !empty(PKG_OPTIONS:Mprefix-cmds)
KRB5_PREFIX= k
MIT_KRB5_TRANSFORM= s/^ftp/${KRB5_PREFIX}&/; \
s/^rcp/${KRB5_PREFIX}&/; \
diff --git a/security/openssl/Makefile b/security/openssl/Makefile
index 57a3e18ecb6..502e3dd505f 100644
--- a/security/openssl/Makefile
+++ b/security/openssl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.92 2004/03/26 08:33:49 jlam Exp $
+# $NetBSD: Makefile,v 1.93 2004/07/30 21:05:42 jlam Exp $
DISTNAME= openssl-0.9.6m
SVR4_PKGNAME= ossl
@@ -34,7 +34,20 @@ CONFIGURE_ARGS+= shared
# IDEA, RC5, and MDC2 are disabled due to licensing and/or patent issues.
CONFIGURE_ARGS+= no-idea no-rc5 no-mdc2
-.if defined(USE_RSAREF2) && ${USE_RSAREF2} == "YES"
+# Global and legacy options
+.if defined(USE_RSAREF2)
+. if !defined(PKG_OPTIONS.openssl)
+. if defined(USE_RSAREF2) && !empty(USE_RSAREF2:M[yY][eE][sS])
+PKG_OPTIONS.openssl+= rsaref
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.openssl
+PKG_SUPPORTED_OPTIONS= rsaref
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mrsaref)
. include "../../security/rsaref/buildlink3.mk"
CONFIGURE_ARGS+= rsaref
PLIST_RSAREF= ${PKGDIR}/PLIST.rsaref
diff --git a/security/sudo/Makefile b/security/sudo/Makefile
index 53aa519060c..e66d4f85b10 100644
--- a/security/sudo/Makefile
+++ b/security/sudo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.63 2004/03/22 08:45:56 jlam Exp $
+# $NetBSD: Makefile,v 1.64 2004/07/30 21:05:42 jlam Exp $
#
DISTNAME= sudo-1.6.7p5
@@ -32,9 +32,20 @@ CONFIGURE_ARGS+= --with-skey
CONFIGURE_ARGS+= --without-skey
.endif
+# Global and legacy options
.if defined(KERBEROS)
-CONFIGURE_ARGS+= --without-kerb4
+. if !defined(PKG_OPTIONS.sudo)
+PKG_OPTIONS.sudo+= kerberos
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.sudo
+PKG_SUPPORTED_OPTIONS= kerberos
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mkerberos)
. include "../../mk/krb5.buildlink3.mk"
+CONFIGURE_ARGS+= --without-kerb4
CONFIGURE_ARGS+= --with-kerb5
.else
CONFIGURE_ARGS+= --without-kerb5
diff --git a/www/apache/Makefile b/www/apache/Makefile
index 664db6e6fee..0bf03c2152a 100644
--- a/www/apache/Makefile
+++ b/www/apache/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.147 2004/07/17 12:44:28 tron Exp $
+# $NetBSD: Makefile,v 1.148 2004/07/30 21:05:42 jlam Exp $
#
# This pkg does not compile in mod_ssl, only the `mod_ssl EAPI' (a set of
# code hooks that allow mod_ssl to be compiled separately later, if desired).
@@ -60,7 +60,23 @@ BUILD_DEFS+= APACHE_USER APACHE_GROUP
CONFIGURE_ARGS+= --server-uid=${APACHE_USER}
CONFIGURE_ARGS+= --server-gid=${APACHE_GROUP}
-.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
+# Global and legacy options
+.if defined(APACHE_PERF_TUNING) || defined(APACHE_SUEXEC)
+. if !defined(PKG_OPTIONS.apache)
+. if defined(APACHE_PERF_TUNING) && !empty(APACHE_PERF_TUNING:M[yY][eE][sS])
+PKG_OPTIONS.apache+= perf-tuning
+. endif
+. if defined(APACHE_SUEXEC) && !empty(APACHE_SUEXEC:M[yY][eE][sS])
+PKG_OPTIONS.apache+= suexec
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.apache
+PKG_SUPPORTED_OPTIONS= perf-tuning suexec
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Msuexec)
APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
APACHE_SUEXEC_CONFIGURE_ARGS+= \
@@ -91,7 +107,7 @@ CONFIGURE_ARGS+= ${_ENABLE_MOD}=define # from mod_ssl pkg.addon
APACHE_CUSTOM_CFLAGS?= # empty
-.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == "YES"
+.if !empty(PKG_OPTIONS:Mperf-tuning)
APACHE_CUSTOM_CFLAGS+= -DBUFFERED_LOGS
APACHE_CUSTOM_CFLAGS+= ${COMPILER_PERFTUNE_FLAGS}
LDFLAGS+= ${COMPILER_PERFTUNE_FLAGS}
diff --git a/www/lynx/Makefile b/www/lynx/Makefile
index c28080141e6..2776388ec36 100644
--- a/www/lynx/Makefile
+++ b/www/lynx/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.73 2004/05/16 03:34:23 fredb Exp $
+# $NetBSD: Makefile,v 1.74 2004/07/30 21:05:42 jlam Exp $
#
DISTNAME= lynx2.8.5
@@ -31,8 +31,6 @@ USE_GNU_TOOLS+= make
INSTALL_TARGET= install-full install-lss
MAKEFILE= makefile
-BUILD_DEFS+= LYNX_SCREEN_LIB USE_SOCKS USE_INET6
-
.include "../../mk/bsd.prefs.mk"
# For nls/gettext
@@ -65,53 +63,10 @@ CONFIGURE_ARGS+= --enable-nested-tables
CONFIGURE_ARGS+= --enable-prettysrc
CONFIGURE_ARGS+= --enable-read-eta
-.if ${LYNX_SCREEN_LIB} == "slang"
-. include "../../devel/libslang/buildlink3.mk"
-.elif ${LYNX_SCREEN_LIB} == "ncurses"
-USE_NCURSES= color
-. include "../../devel/ncurses/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-color-style
-.elif ${LYNX_SCREEN_LIB} == curses
-. include "../../mk/curses.buildlink3.mk"
-. if !empty(MACHINE_PLATFORM:MNetBSD-1.5*-i386)
-CONFIGURE_ARGS+= --enable-color-style
-. endif
-.else
-pre-configure:
- @${ECHO} '****************************************************'
- @${ECHO} '* Invalid value for LYNX_SCREEN_LIB. Please choose *'
- @${ECHO} '* one of "slang", "ncurses", or "curses"! *'
- @${ECHO} '****************************************************'
- @${FALSE}
-
-.endif
-
-# Include SOCKS firewall support, if desired.
-.if defined(USE_SOCKS) && (${USE_SOCKS} == 4 || ${USE_SOCKS} == 5)
-.if (${LYNX_SCREEN_LIB} == slang)
-pre-configure:
- @${ECHO} '******************************************************'
- @${ECHO} '* Socks may not be enabled together with the "slang" *'
- @${ECHO} '* screen library. If socks support is desired, *'
- @${ECHO} '* please also set LYNX_SCREEN_LIB to one of "curses" *'
- @${ECHO} '* or "ncurses"! *'
- @${ECHO} '******************************************************'
- @${FALSE}
-
-.endif
-.if ${USE_SOCKS} == 4
-CONFIGURE_ARGS+= --with-socks
-. include "../../net/socks4/buildlink3.mk"
-.else
-CONFIGURE_ARGS+= --with-socks5
-. include "../../net/socks5/buildlink3.mk"
-.endif
-.endif
-
-# Do IPV6 on systems which can support it.
-.if defined(USE_INET6) && ${USE_INET6} == YES
-CONFIGURE_ARGS+= --enable-ipv6
-.endif
+.include "Makefile.options"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
post-install:
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/lynx
@@ -119,8 +74,4 @@ post-install:
# patchless update
${RM} ${PREFIX}/share/lynx/lynx_doc/CHANGES.orig_dist
-.include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
-.include "../../security/openssl/buildlink3.mk"
-
.include "../../mk/bsd.pkg.mk"
diff --git a/www/lynx/Makefile.options b/www/lynx/Makefile.options
new file mode 100644
index 00000000000..8a2eaf7e2ec
--- /dev/null
+++ b/www/lynx/Makefile.options
@@ -0,0 +1,77 @@
+# $NetBSD: Makefile.options,v 1.1 2004/07/30 21:05:42 jlam Exp $
+
+# Global and legacy options
+.if defined(LYNX_SCREEN_LIB) || defined(USE_SOCKS) || defined(USE_INET6)
+. if !defined(PKG_OPTIONS.lynx)
+. if defined(LYNX_SCREEN_LIB) && !empty(LYNX_SCREEN_LIB:Mslang)
+PKG_OPTIONS.lynx+= slang
+. endif
+. if defined(LYNX_SCREEN_LIB) && !empty(LYNX_SCREEN_LIB:Mncurses)
+PKG_OPTIONS.lynx+= ncurses
+. endif
+. if defined(LYNX_SCREEN_LIB) && !empty(LYNX_SCREEN_LIB:Mcurses)
+PKG_OPTIONS.lynx+= curses
+. endif
+. if defined(USE_SOCKS) && (${USE_SOCKS} == 4)
+PKG_OPTIONS.lynx+= socks4
+. endif
+. if defined(USE_SOCKS) && (${USE_SOCKS} == 5)
+PKG_OPTIONS.lynx+= socks5
+. endif
+. if defined(USE_INET6) && !empty(USE_INET6:M[yY][eE][sS])
+PKG_OPTIONS.lynx+= inet6
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.lynx
+PKG_SUPPORTED_OPTIONS= curses inet6 ncurses slang socks4 socks5
+.include "../../mk/bsd.options.mk"
+
+###
+### We can't compile support for both the "slang" screen library and
+### SOCKS support.
+###
+.if !empty(PKG_OPTIONS:Mslang) && !empty(PKG_OPTIONS:Msocks*)
+PKG_FAIL_REASON+= "SOCKS may not be enabled together with the \"slang\"" \
+ "screen library. If SOCKS support is desired," \
+ "please change ${PKG_OPTIONS_VAR} to include" \
+ "\"curses\" or \"ncurses\" instead."
+.endif
+
+###
+### Set the screen library to "slang", "ncurses", or plain "curses".
+###
+.if !empty(PKG_OPTIONS:Mslang)
+. include "../../devel/libslang/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mncurses)
+USE_NCURSES= color
+. include "../../devel/ncurses/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-color-style
+.elif !empty(PKG_OPTIONS:Mcurses)
+. include "../../mk/curses.buildlink3.mk"
+. if !empty(MACHINE_PLATFORM:MNetBSD-1.[56]*-i386)
+CONFIGURE_ARGS+= --enable-color-style
+. endif
+.else
+PKG_FAIL_REASON+= "${PKG_OPTIONS_VAR} must contain one of" \
+ "one of \"slang\", \"ncurses\", or \"curses\"!"
+.endif
+
+###
+### SOCKS support
+###
+.if !empty(PKG_OPTIONS:Msocks4)
+CONFIGURE_ARGS+= --with-socks
+. include "../../net/socks4/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Msocks5)
+CONFIGURE_ARGS+= --with-socks5
+. include "../../net/socks5/buildlink3.mk"
+.endif
+
+###
+### IPv6 support
+###
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-ipv6
+.endif
diff --git a/www/php4/Makefile.php b/www/php4/Makefile.php
index de4a3763e7a..058a92e64c7 100644
--- a/www/php4/Makefile.php
+++ b/www/php4/Makefile.php
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.15 2004/07/14 08:03:16 jdolecek Exp $
+# $NetBSD: Makefile.php,v 1.16 2004/07/30 21:05:43 jlam Exp $
.include "../../www/php4/Makefile.common"
@@ -42,8 +42,21 @@ CONFIGURE_ARGS+= ${PHP4_CONFIGURE_ARGS}
CONFIGURE_ENV+= ac_cv_lib_pam_pam_start=no
CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
-BUILD_DEFS+= USE_SSL
-.if defined(USE_SSL) && !empty(USE_SSL:M[Yy][Ee][Ss])
-PHP4_CONFIGURE_ARGS+= --with-openssl
-.include "../../security/openssl/buildlink3.mk"
+PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[^-]*$//}
+
+# Global and legacy options
+.if defined(USE_SSL)
+. if !defined(${PKG_OPTIONS_VAR})
+. if defined(USE_SSL) && !empty(USE_SSL:M[Yy][Ee][Ss])
+${PKG_OPTIONS_VAR}+= ssl
+. endif
+. endif
+.endif
+
+PKG_SUPPORTED_OPTIONS+= ssl
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mssl)
+. include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+= --with-openssl
.endif