Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Jul 2005 18:59:25 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/83145: net/py-ldap2: add WITH_SASL option
Message-ID:  <E1DquK5-000FWx-9c@ns.kfs.ru>
Resent-Message-ID: <200507081500.j68F0hus097090@freefall.freebsd.org>

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

>Number:         83145
>Category:       ports
>Synopsis:       net/py-ldap2: add WITH_SASL option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 08 15:00:42 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Boris Samorodov
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
InPharmTech
>Environment:
System: FreeBSD serv3.int.kfs.ru 5.4-STABLE FreeBSD 5.4-STABLE #1: Mon May 2 12:33:58 MSD 2005 pika@serv3.int.kfs.ru:/usr/obj/usr/src/sys/SERV1 i386


>Description:
	Current port doesn't have an option to compile with SASL-support,
	while sources are capable of.
>How-To-Repeat:
	Look at Makefile. We are erasing sasl support.
>Fix:
	The next patch to Makefile adds option WITH_SASL. Defaults 
	are to build without SASL support. But if one define WANT_OPENLDAP_SASL
	then the port builds by default with SASL support. Explicit declaration
	either WITH_SASL or WITHOUT_SASL does what it should. I hope ;-)

-----
--- Makefile.orig	Fri Jul  1 00:46:35 2005
+++ Makefile	Fri Jul  8 18:37:48 2005
@@ -6,6 +6,7 @@
 
 PORTNAME=	ldap2
 PORTVERSION=	2.0.8
+PORTREVISON=	1
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	python-ldap
@@ -20,10 +21,55 @@
 USE_OPENLDAP=	yes
 USE_REINPLACE=	yes
 
+
+.include <bsd.port.pre.mk>
+
+
+.if defined(WANT_OPENLDAP_SASL) && !defined(WITHOUT_SASL)
+WITH_SASL=	yes
+.endif
+
+
+.if defined(WITH_SASL)
+LIB_DEPENDS=	ldap_r-2.2.7:${PORTSDIR}/net/openldap22-sasl-client
+.endif
+
+
+pre-everything::
+	@${ECHO} "============================================================="
+	@${ECHO}
+	@${ECHO} "You can build ${PKGNAME} with the following options:"
+	@${ECHO}
+.if defined(WANT_OPENLDAP_SASL)
+	@${ECHO} "WITHOUT_SASL             without (Cyrus) SASL2 support"
+.else
+	@${ECHO} "WITH_SASL                with (Cyrus) SASL2 support"
+
+.endif
+	@${ECHO}
+	@${ECHO} "============================================================="
+	@${ECHO}
+
+
 do-configure:
-	@${REINPLACE_CMD} -e "s=/opt/openldap-OPENLDAP_REL_ENG_2_2/lib=${LOCALBASE}/lib=" \
+.if defined(WITH_SASL) && !defined(WITHOUT_SASL)
+	@${ECHO}
+	@${ECHO} Configuring ${PKGNAME} with SASL support
+	@${ECHO}
+	@${REINPLACE_CMD} -e "s=/opt/openldap-OPENLDAP_REL_ENG_2_2/lib=${LOCALBASE}/lib ${LOCALBASE}/lib/sasl2=" \
+		-e "s=/usr/include/sasl=${LOCALBASE}/include/sasl=" \
 		-e "s=/opt/openldap-OPENLDAP_REL_ENG_2_2/include=${LOCALBASE}/include=" \
+		${WRKSRC}/setup.cfg
+.else
+	@${ECHO}
+	@${ECHO} Configuring ${PKGNAME} without SASL support
+	@${ECHO}
+	@${REINPLACE_CMD} -e "s=/opt/openldap-OPENLDAP_REL_ENG_2_2/lib=${LOCALBASE}/lib=" \
 		-e "s=ldap_r lber ssl crypto sasl2=ldap_r lber ssl crypto=" \
+		-e "s=/opt/openldap-OPENLDAP_REL_ENG_2_2/include /usr/include/sasl=${LOCALBASE}/include=" \
 		${WRKSRC}/setup.cfg
+.endif
+
+
+.include <bsd.port.post.mk>
 
-.include <bsd.port.mk>
-----


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1DquK5-000FWx-9c>