Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  9 Apr 2002 00:26:16 -0700 (PDT)
From:      Scott Lampert <scott@francisscott.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        nbm@FreeBSD.org
Subject:   ports/36920: LDAP compile options in courier-imap port was non-functional
Message-ID:  <20020409072616.24514D4139@yorktown.francisscott.net>

next in thread | raw e-mail | index | archive | help

>Number:         36920
>Category:       ports
>Synopsis:       LDAP compile options in courier-imap port was non-functional
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 09 00:30:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Scott Lampert
>Release:        FreeBSD 4.5-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD yorktown.francisscott.net 4.5-RELEASE-p2 FreeBSD 4.5-RELEASE-p2 #0: Sat Apr 6 16:18:46 PST 2002 root@yorktown.francisscott.net:/usr/src/sys/compile/YORKTOWN i386


	
>Description:
	No option to enable LDAP support in courier-imap.
>How-To-Repeat:
	Not applicable...
>Fix:
	Applying the attached diff adds two make defines that let you
	compile in LDAP support with openldap 1.x or openldap 2.x.


--- courier-imap.diff begins here ---
diff -uNr courier-imap.old/Makefile courier-imap/Makefile
--- courier-imap.old/Makefile	Fri Mar 29 01:28:48 2002
+++ courier-imap/Makefile	Tue Apr  9 00:05:58 2002
@@ -25,6 +25,8 @@
 # WITH_VPOPMAIL:		Build in vpopmail support
 # WITH_MYSQL:			Build in mysql support
 # WITH_POSTGRESQL:		Build in postgresql support
+# WITH_LDAP:			Build in ldap support with openldap 2.x
+# WITH_LDAP1:			Build in ldap support with openldap 1.x
 #
 
 .if !defined(WITHOUT_OPENSSL)
@@ -34,8 +36,7 @@
 PLIST_SUB=	OPENSSLFLAG="@comment "
 .endif
 
-CONFIGURE_ARGS=	--without-authldap --with-authldaprc=filename \
-		--without-authshadow \
+CONFIGURE_ARGS=	--without-authshadow \
 		--without-authcram \
 		--sysconfdir=${PREFIX}/etc/courier-imap \
 		--with-userdb=${PREFIX}/etc/userdb \
@@ -52,6 +53,24 @@
 CONFIGURE_ARGS+=	\
 		--with-authvchkpw
 BUILD_DEPENDS+=	${VPOPMAILDIR}/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail
+.endif
+
+.if !defined(WITH_LDAP) && !defined(WITH_LDAP1)
+CONFIGURE_ARGS+=	\
+		--without-authldap
+PLIST_SUB+=	LDAPFLAG="@comment "
+.else
+CONFIGURE_ARGS+=	\
+		--with-authldap
+PLIST_SUB+=	LDAPFLAG=""
+
+.if defined(WITH_LDAP)
+LIB_DEPENDS=	ldap.2:${PORTSDIR}/net/openldap2 \
+		lber.2:${PORTSDIR}/net/openldap2
+.else
+LIB_DEPENDS=	ldap.1:${PORTSDIR}/net/openldap \
+		lber.1:${PORTSDIR}/net/openldap
+.endif
 .endif
 
 .if !defined(WITH_MYSQL)
diff -uNr courier-imap.old/files/patch-ldap courier-imap/files/patch-ldap
--- courier-imap.old/files/patch-ldap	Wed Dec 31 16:00:00 1969
+++ courier-imap/files/patch-ldap	Mon Apr  8 23:36:21 2002
@@ -0,0 +1,13 @@
+--- authlib/configure.orig	Mon Apr  8 23:36:04 2002
++++ authlib/configure	Mon Apr  8 23:35:24 2002
+@@ -554,6 +554,10 @@
+   > $cache_file
+ fi
+ 
++CFLAGS="$CFLAGS -I/usr/local/include"
++CPPFLAGS="$CPPFLAGS -I/usr/local/include"
++LDFLAGS="-L/usr/local/lib $LDFLAGS"
++
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
diff -uNr courier-imap.old/pkg-plist courier-imap/pkg-plist
--- courier-imap.old/pkg-plist	Sat Mar 23 03:46:50 2002
+++ courier-imap/pkg-plist	Tue Apr  9 00:05:40 2002
@@ -5,6 +5,7 @@
 etc/courier-imap/authdaemonrc.dist
 %%MYSQLFLAG%%etc/courier-imap/authmysqlrc.dist
 %%PGSQLFLAG%%etc/courier-imap/authpgsqlrc.dist
+%%LDAPFLAG%%etc/courier-imap/authldaprc.dist
 etc/courier-imap/imapd-ssl.dist
 etc/courier-imap/imapd.cnf.dist
 etc/courier-imap/imapd.dist
@@ -18,6 +19,7 @@
 libexec/courier-imap/authlib/authdaemond
 %%MYSQLFLAG%%libexec/courier-imap/authlib/authdaemond.mysql
 %%PGSQLFLAG%%libexec/courier-imap/authlib/authdaemond.pgsql
+%%LDAPFLAG%%libexec/courier-imap/authlib/authdaemond.ldap
 libexec/courier-imap/authlib/authdaemond.plain
 libexec/courier-imap/couriertcpd
 libexec/courier-imap/deliverquota
--- courier-imap.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020409072616.24514D4139>