Wed Mar 13 03:31:41 2013 UTC ()
Convert SASL_DBTYPE variable to option framework, and add gdbm support.
Fixes db name extension in DEINSTALL script for other than ndbm.

Bump PKGREVISION.


(obache)
diff -r1.9 -r1.10 pkgsrc/security/cyrus-sasl/DEINSTALL
diff -r1.66 -r1.67 pkgsrc/security/cyrus-sasl/Makefile
diff -r0 -r1.1 pkgsrc/security/cyrus-sasl/options.mk

cvs diff -r1.9 -r1.10 pkgsrc/security/cyrus-sasl/DEINSTALL (expand / switch to unified diff)

--- pkgsrc/security/cyrus-sasl/DEINSTALL 2006/04/18 17:41:30 1.9
+++ pkgsrc/security/cyrus-sasl/DEINSTALL 2013/03/13 03:31:40 1.10
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: DEINSTALL,v 1.9 2006/04/18 17:41:30 jlam Exp $ 3# $NetBSD: DEINSTALL,v 1.10 2013/03/13 03:31:40 obache Exp $
4 4
5SASLDB=@PKG_SYSCONFDIR@/sasldb.db 5SASLDB=@PKG_SYSCONFDIR@/sasldb@DBEXT@
6 6
7case ${STAGE} in 7case ${STAGE} in
8POST-DEINSTALL) 8POST-DEINSTALL)
9 if ${TEST} -f ${SASLDB}; then 9 if ${TEST} -f ${SASLDB}; then
10 ${CAT} << EOF 10 ${CAT} << EOF
11=========================================================================== 11===========================================================================
12You may want to remove the SASL password data file: 12You may want to remove the SASL password data file:
13 13
14 ${SASLDB} 14 ${SASLDB}
15=========================================================================== 15===========================================================================
16EOF 16EOF
17 fi 17 fi
18 ;; 18 ;;

cvs diff -r1.66 -r1.67 pkgsrc/security/cyrus-sasl/Makefile (expand / switch to unified diff)

--- pkgsrc/security/cyrus-sasl/Makefile 2012/12/20 22:52:37 1.66
+++ pkgsrc/security/cyrus-sasl/Makefile 2013/03/13 03:31:40 1.67
@@ -1,38 +1,24 @@ @@ -1,38 +1,24 @@
1# $NetBSD: Makefile,v 1.66 2012/12/20 22:52:37 joerg Exp $ 1# $NetBSD: Makefile,v 1.67 2013/03/13 03:31:40 obache Exp $
2 2
3PKGREVISION= 1 3PKGREVISION= 2
4SVR4_PKGNAME= csasl 4SVR4_PKGNAME= csasl
5COMMENT= Simple Authentication and Security Layer 5COMMENT= Simple Authentication and Security Layer
6 6
7.include "Makefile.common" 7.include "Makefile.common"
8 8
9CPPFLAGS+= -DPIC -fPIC 9CPPFLAGS+= -DPIC -fPIC
10 10
11.if exists(/usr/include/ndbm.h) && ${OPSYS} != "Linux" 11.include "options.mk"
12SASL_DBTYPE?= ndbm 
13.else 
14SASL_DBTYPE?= berkeley 
15.endif 
16BUILD_DEFS+= SASL_DBTYPE 
17 
18.if ${SASL_DBTYPE} == "berkeley" 
19BDB_ACCEPTED= db3 db4 db5 
20. include "../../mk/bdb.buildlink3.mk" 
21CONFIGURE_ENV+= with_bdb=${BDB_TYPE} 
22.endif 
23 
24CONFIGURE_ARGS+= --with-dblib=${SASL_DBTYPE:Q} 
25CONFIGURE_ARGS+= --with-dbpath=${PKG_SYSCONFDIR}/sasldb 
26 12
27BUILD_DEFS+= VARBASE 13BUILD_DEFS+= VARBASE
28 14
29# Support using Cyrus saslauthd (security/cyrus-saslauthd) for plaintext 15# Support using Cyrus saslauthd (security/cyrus-saslauthd) for plaintext
30# password authentication. 16# password authentication.
31# 17#
32SASLSOCKETDIR?= ${VARBASE}/run/saslauthd 18SASLSOCKETDIR?= ${VARBASE}/run/saslauthd
33CONFIGURE_ARGS+= --with-saslauthd=${SASLSOCKETDIR:Q} 19CONFIGURE_ARGS+= --with-saslauthd=${SASLSOCKETDIR:Q}
34BUILD_DEFS+= SASLSOCKETDIR 20BUILD_DEFS+= SASLSOCKETDIR
35# let not to build & install saslauthd here. 21# let not to build & install saslauthd here.
36SUBST_CLASSES+= saslauthd 22SUBST_CLASSES+= saslauthd
37SUBST_STAGE.saslauthd= pre-configure 23SUBST_STAGE.saslauthd= pre-configure
38SUBST_FILES.saslauthd= Makefile.in 24SUBST_FILES.saslauthd= Makefile.in

File Added: pkgsrc/security/cyrus-sasl/options.mk
# $NetBSD: options.mk,v 1.1 2013/03/13 03:31:40 obache Exp $
#

PKG_OPTIONS_VAR=	PKG_OPTIONS.cyrus-sasl
PKG_OPTIONS_REQUIRED_GROUPS=	database
PKG_OPTIONS_GROUP.database=	ndbm bdb gdbm

.if defined(SASL_DBTYPE)
PKG_OPTIONS_DEPRECATED_WARNINGS+=	"Deprecated SASL_DBTYPE variable used, use ${PKG_OPTIONS_VAR:Q} instead (${PKG_OPTIONS_GROUP.database:ts,:Q})."
.  if !empty(SASL_DBTYPE:Mndbm)
PKG_SUGGESTED_OPTIONS+=	ndbm
.  elif !empty(SASL_DBTYPE:Mberkeley)
PKG_SUGGESTED_OPTIONS+=	bdb
.  else
PKG_FAIL_REASON+=			"Unknown SASL_DBTYPE: ${SASL_DBTYPE:Q}"
.  endif
.elif exists(/usr/include/ndbm.h) && ${OPSYS} != "Linux"
PKG_SUGGESTED_OPTIONS+=	ndbm
.else
PKG_SUGGESTED_OPTIONS+=	bdb
.endif

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mndbm)
SASL_DBTYPE=		ndbm
FILES_SUBST+=		DBEXT=.db
.elif !empty(PKG_OPTIONS:Mbdb)
SASL_DBTYPE=		berkeley
FILES_SUBST+=		DBEXT=
BDB_ACCEPTED=		db3 db4 db5
.  include "../../mk/bdb.buildlink3.mk"
CONFIGURE_ENV+=		with_bdb=${BDB_TYPE}
.elif !empty(PKG_OPTIONS:Mgdbm)
SASL_DBTYPE=		gdbm
FILES_SUBST+=		DBEXT=
.  include "../../databases/gdbm/buildlink3.mk"
.endif

CONFIGURE_ARGS+=	--with-dblib=${SASL_DBTYPE:Q}
CONFIGURE_ARGS+=	--with-dbpath=${PKG_SYSCONFDIR}/sasldb