Subject: pkg/9760: Enable ldap support in pine pkg
To: None <netbsd-bugs@netbsd.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 04/06/2000 09:17:17
Date: Mon, 3 Apr 2000 12:12:30 -0500 (CDT)
From: John.P.Darrow@wheaton.edu
Reply-To: John.P.Darrow@wheaton.edu
To: gnats-bugs@gnats.netbsd.org
Cc: John.P.Darrow@wheaton.edu
Subject: Enable ldap support in pine pkg


>Number:         9760
>Category:       pkg
>Synopsis:       Enable ldap support in pine pkg
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 03 10:15:00 PDT 2000
>Closed-Date:    
>Last-Modified:  
>Originator:     John Darrow
>Release:        pkgsrc 2000-03-31
>Organization:
Computing Services, Wheaton College, Wheaton, IL
>Environment:
System: NetBSD jdarrowpiii.wheaton.edu 1.4V NetBSD 1.4V (JDARROW) #0: Tue Mar 21 15:04:28 CST 2000 jdarrow@jdarrowpiii.wheaton.edu:/var/src/sys/arch/i386/compile/JDARROW i386




>Description:
	pine is capable of building in support for doing ldap-based
	directory lookups.  This is very useful at a site using imap, as
	it enables the admins to create a single address directory
	accessible from a number of different imap clients.


	However, our pine package does not compile in the support for
	ldap.  This is probably because, at first, the process looks quite
	convoluted, requiring dropping ldap sources into the pine build
	tree.  However, a little experimentation shows it's much simpler
	than it appears.
>How-To-Repeat:
	Build pine.  Look at help pages, see section on LDAP, try to add
	an ldap address book, be completely unable to find the setup screen
	listed in the help pages, go back to pine sources.
>Fix:
	I've added support for using openldap for the ldap support.  I
	was also going to add support for using ldapsdk, but found that
	that package wouldn't allow pine to link (see pr pkg/9759).


	For now I've left the ldap stuff conditionalized on PINE_USE_LDAP.


	It would help if the openldap package could be split into server
	and client parts, as the intention is simply to allow pine to
	access an ldap server elsewhere, and we don't really want all the
	ldap server programs installed on this system, only the includes
	and libraries are needed.  (And there is already precedence for
	this sort of thing, e.g. mysql-client and -server packages.)


cvs diff: Diffing /source/NetBSD-current/pkgsrc/mail/pine
Index: /source/NetBSD-current/pkgsrc/mail/pine/Makefile
===================================================================
RCS file: /source/cvs/netbsd/current/pkgsrc/mail/pine/Makefile,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 Makefile
--- Makefile	2000/02/10 21:43:00	1.1.1.8
+++ Makefile	2000/04/03 16:49:38
@@ -11,9 +11,19 @@
 MAINTAINER=	packages@netbsd.org
 HOMEPAGE=	http://www.washington.edu/pine/

 
+BUILD_DEFS+=	PINE_USE_LDAP
+
 # This pkg doesn't build pico or libpico; the pico pkg does that part.
 DEPENDS=	pico-3.7:../../editors/pico

 
+.include "../../mk/bsd.prefs.mk"
+
+.if defined(PINE_USE_LDAP) && ${PINE_USE_LDAP} == YES
+DEPENDS+=	openldap-*:../../databases/openldap
+LDAPCFLAGS=	LDAPCFLAGS="-DENABLE_LDAP -I${PREFIX}/include"
+LDAPLIBS=	LDAPLIBS="-lldap -llber"
+.endif
+
 do-configure:
 	${CP} -f ${WRKSRC}/pine/osdep/os-neb.h ${WRKSRC}/pine/osdep/os-neb.h.orig
 	${SED} -e 's@/usr/local/lib/@${PREFIX}/etc/@' \
@@ -22,7 +32,7 @@
 	@${LN} -sf ${LOCALBASE}/include/pico ${WRKSRC}/pico

 
 do-build:
-	cd ${WRKSRC} && ./build ${BUILDNAME} PREFIX=${PREFIX}
+	cd ${WRKSRC} && ./build ${BUILDNAME} ${LDAPCFLAGS} ${LDAPLIBS} PREFIX=${PREFIX}

 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/pine ${PREFIX}/bin/
>Release-Note:
>Audit-Trail:
>Unformatted: