From brix@fangorn.brixandersen.dk  Thu Nov 30 12:42:57 2006
Return-Path: <brix@fangorn.brixandersen.dk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 5827816A50A;
	Thu, 30 Nov 2006 12:42:57 +0000 (UTC)
	(envelope-from brix@fangorn.brixandersen.dk)
Received: from ns2.pil.dk (ns2.pil.dk [195.41.47.38])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4F1B743CA6;
	Thu, 30 Nov 2006 12:42:48 +0000 (GMT)
	(envelope-from brix@fangorn.brixandersen.dk)
Received: from fangorn.brixandersen.dk (fw2.pil.dk [83.90.227.58])
	by ns2.pil.dk (Postfix) with ESMTP id 6F8B67BBB0F;
	Thu, 30 Nov 2006 13:42:55 +0100 (CET)
Received: by fangorn.brixandersen.dk (Postfix, from userid 1001)
	id 1CD1C2E026; Thu, 30 Nov 2006 13:42:55 +0100 (CET)
Message-Id: <20061130124255.1CD1C2E026@fangorn.brixandersen.dk>
Date: Thu, 30 Nov 2006 13:42:55 +0100 (CET)
From: Henrik Brix Andersen <henrik@brixandersen.dk>
Reply-To: Henrik Brix Andersen <henrik@brixandersen.dk>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sumikawa@FreeBSD.org
Subject: Optional LDAP and PGSQL support in echoping
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         106060
>Category:       ports
>Synopsis:       Optional LDAP and PGSQL support in echoping
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sumikawa
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 30 12:50:10 GMT 2006
>Closed-Date:    Thu Nov 30 22:06:31 JST 2006
>Last-Modified:  Thu Nov 30 13:10:15 GMT 2006
>Originator:     Henrik Brix Andersen
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
pil.dk
>Environment:
System: FreeBSD fangorn.brixandersen.dk 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #32: Tue Nov 28 13:27:57 CET 2006 root@fangorn.brixandersen.dk:/usr/obj/usr/src/sys/FANGORN i386


	
>Description:
The current net/echoping port has a hard dependency on OpenLDAP
although the LDAP plug-in is optional.

Also, the PostgreSQL plug-in is not enabled in the current port.
	
>How-To-Repeat:
'portinstall net/echoping' and notice that it depends on OpenLDAP -
also notice that the PostgreSQL plug-in is not compiled/installed.

	
>Fix:
Below patch fixes these two issues by adding LDAP and PGSQL OPTIONS,
thus allowing the end-user to enable these plug-ins at will.

	

--- echoping.diff begins here ---
diff -urp /usr/ports/net/echoping/Makefile ports/net/echoping/Makefile
--- /usr/ports/net/echoping/Makefile	Thu Nov  9 03:50:02 2006
+++ ports/net/echoping/Makefile	Thu Nov 30 13:20:32 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	echoping
 PORTVERSION=	5.99.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net ipv6
 MASTER_SITES=	ftp://ftp.internatif.org/pub/unix/echoping/
 MASTER_SITE_SUBDIR=		${PORTNAME}
@@ -19,12 +19,38 @@ COMMENT=	A ping-like program that uses t
 LIB_DEPENDS=	popt.0:${PORTSDIR}/devel/popt \
 		idn.16:${PORTSDIR}/dns/libidn
 
-USE_OPENLDAP=	yes
 USE_OPENSSL=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-http --enable-icp --enable-smtp --with-ssl \
 		--enable-ttcp --enable-tos --with-libidn=${LOCALBASE}
 
-MAN1=		echoping.1 echoping_dns.1 echoping_random.1 echoping_whois.1 echoping_ldap.1
+PING_PLUGINS=	dns random whois
+
+MAN1=		echoping.1 echoping_dns.1 echoping_random.1 echoping_whois.1
+
+OPTIONS=	LDAP "Enable LDAP plug-in" on \
+		PGSQL "Enable PostgreSQL plug-in" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_LDAP)
+USE_OPENLDAP=	yes
+MAN1+=		echoping_ldap.1
+PING_PLUGINS+=	ldap
+PLIST_SUB=	WITH_LDAP=""
+.else
+PLIST_SUB=	WITH_LDAP="@comment "
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PGSQL=	yes
+MAN1+=		echoping_postgresql.1
+PING_PLUGINS+=	postgresql
+PLIST_SUB+=	WITH_PGSQL=""
+.else
+PLIST_SUB+=	WITH_PGSQL="@comment "
+.endif
+
+CONFIGURE_ARGS+=--enable-plugin="${PING_PLUGINS}"
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urp /usr/ports/net/echoping/pkg-plist ports/net/echoping/pkg-plist
--- /usr/ports/net/echoping/pkg-plist	Thu Jun 15 08:40:44 2006
+++ ports/net/echoping/pkg-plist	Thu Nov 30 12:28:10 2006
@@ -3,10 +3,14 @@ lib/echoping/dns.a
 lib/echoping/dns.la
 lib/echoping/dns.so
 lib/echoping/dns.so.0
-lib/echoping/ldap.a
-lib/echoping/ldap.la
-lib/echoping/ldap.so
-lib/echoping/ldap.so.0
+%%WITH_LDAP%%lib/echoping/ldap.a
+%%WITH_LDAP%%lib/echoping/ldap.la
+%%WITH_LDAP%%lib/echoping/ldap.so
+%%WITH_LDAP%%lib/echoping/ldap.so.0
+%%WITH_PGSQL%%lib/echoping/postgresql.a
+%%WITH_PGSQL%%lib/echoping/postgresql.la
+%%WITH_PGSQL%%lib/echoping/postgresql.so
+%%WITH_PGSQL%%lib/echoping/postgresql.so.0
 lib/echoping/random.a
 lib/echoping/random.la
 lib/echoping/random.so
--- echoping.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sumikawa 
State-Changed-When: Thu Nov 30 22:06:16 JST 2006 
State-Changed-Why:  
Commited, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106060 
Responsible-Changed-From-To: freebsd-ports-bugs->sumikawa 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Nov 30 13:07:21 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106060 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/106060: commit references a PR
Date: Thu, 30 Nov 2006 13:06:16 +0000 (UTC)

 sumikawa    2006-11-30 13:05:52 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/echoping         Makefile pkg-plist 
   Log:
   Make OPTIONify.
   
   PR:             ports/106060
   Submitted by:   Henrik Brix Andersen <henrik@brixandersen.dk>
   
   Revision  Changes    Path
   1.26      +30 -4     ports/net/echoping/Makefile
   1.6       +8 -4      ports/net/echoping/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
