Subject: pkg/20043: postfix does not work with cyrus-sasl2 installed.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Christos.Zoulas@twosigma.com>
List: netbsd-bugs
Date: 01/24/2003 12:09:01
>Number:         20043
>Category:       pkg
>Synopsis:       postfix does not work with cyrus-sasl2 installed.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 24 09:10:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Christos Zoulas
>Release:        NetBSD 1.6J
>Organization:
	Entropy, Inc.
>Environment:
System: NetBSD gw1.twosigma.com 1.6J NetBSD 1.6J (GENERIC) #122: Fri Oct 25 11:27:27 EDT 2002 christos@gw2.twosigma.com:/home/NetBSD/co/src/sys/arch/i386-normal/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	Looks for includes files in the wrong place and -lsasl instead
	of -lsasl2
>How-To-Repeat:
	install cyrus-sasl2 and then try to build postfix with USE_SASL=YES
>Fix:
	This is a hack; there should be a way to tell which version is
	installed and cope with it. Also there is no PLIST.sasl, so I got
	rid of it.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/postfix/Makefile,v
retrieving revision 1.75
diff -u -u -r1.75 Makefile
--- Makefile	2003/01/23 06:50:21	1.75
+++ Makefile	2003/01/24 17:06:28
@@ -83,15 +83,21 @@
 MESSAGE_SRC+=	${PKGDIR}/MESSAGE.tls
 .endif
 
-.if defined(USE_SASL) && ${USE_SASL} == "YES"
+.if defined(USE_SASL2) && ${USE_SASL2} == "YES"
+.include "../../security/cyrus-sasl2/buildlink2.mk"
+SASL_LIB=-lsasl2
+.elseif defined(USE_SASL) && ${USE_SASL} == "YES"
 .include "../../security/cyrus-sasl/buildlink2.mk"
-CCARGS+=	-DUSE_SASL_AUTH
+SASL_LIB=-lsasl
+.endif
+
+.if defined(SASL_LIB)
+CCARGS+=	-DUSE_SASL_AUTH -I${BUILDLINK_PREFIX.cyrus-sasl}/include/sasl
 AUXLIBS+=	-L${BUILDLINK_PREFIX.cyrus-sasl}/lib		\
 		-Wl,-R${BUILDLINK_PREFIX.cyrus-sasl}/lib	\
-		-lsasl
+		${SASL_LIB}
 BUILD_DEFS+=	USE_SASL
 
-PLIST_SRC+=	${WRKDIR}/PLIST.sasl
 MESSAGE_SRC+=	${PKGDIR}/MESSAGE.sasl
 MESSAGE_SUBST+=	PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
 .endif
>Release-Note:
>Audit-Trail:
>Unformatted: