From kiwi@mx2.oav.net  Mon Mar  8 08:05:31 2004
Return-Path: <kiwi@mx2.oav.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1387916A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Mar 2004 08:05:31 -0800 (PST)
Received: from mx2.oav.net (domu.oav.net [195.154.253.10])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A56FB43D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Mar 2004 08:05:30 -0800 (PST)
	(envelope-from kiwi@mx2.oav.net)
Received: by mx2.oav.net (Postfix, from userid 1000)
	id 083724AC1D; Mon,  8 Mar 2004 17:05:33 +0100 (CET)
Message-Id: <20040308160533.083724AC1D@mx2.oav.net>
Date: Mon,  8 Mar 2004 17:05:33 +0100 (CET)
From: Xavier Beaudouin <kiwi@oav.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [MAINTAINER] misc/libhome: Add OPTIONS to port
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         63930
>Category:       ports
>Synopsis:       [MAINTAINER] misc/libhome: Add OPTIONS to port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 08 08:10:09 PST 2004
>Closed-Date:    Mon Apr 19 07:15:25 PDT 2004
>Last-Modified:  Mon Apr 19 07:15:25 PDT 2004
>Originator:     Xavier Beaudouin
>Release:        FreeBSD 5.2.1-RELEASE-p1 i386
>Organization:
The Caudium Group / Association Kazar
>Environment:
System: FreeBSD domu.oav.net 5.2.1-RELEASE-p1 FreeBSD 5.2.1-RELEASE-p1 #0: Fri Mar  5 10:21:57 CET
>Description:

- Add OPTIONS to port
- Added support to all OpenLDAP versions by usage of USE_OPENLDAP
- Added support to all MySQL versions by usage of USE_MYSQL
- Added support to DB4 as well.

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- libhome-0.7.1_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/misc/libhome.old/Makefile /usr/ports/misc/libhome/Makefile
--- /usr/ports/misc/libhome.old/Makefile	Mon Mar  8 16:37:06 2004
+++ /usr/ports/misc/libhome/Makefile	Mon Mar  8 17:03:25 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	libhome
 PORTVERSION=	0.7.1
+PORTREVISION=	1
 CATEGORIES=	misc
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	pll
@@ -14,14 +15,69 @@
 MAINTAINER=	kiwi@oav.net
 COMMENT=	Library providing a getpwname() emulation
 
-LIB_DEPENDS+=	ldap:${PORTSDIR}/net/openldap21-client \
-		mysqlclient:${PORTSDIR}/databases/mysql323-client \
-		db3.3:${PORTSDIR}/databases/db3
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/lib/libldap.so)
+WITH_LDAP=	yes
+OPTIONS+=	LDAP "Support for LDAP queries" on
+.else
+OPTIONS+=	LDAP "Support for LDAP queries" off
+.endif
+
+.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so)
+WITH_MYSQL=	yes
+OPTIONS+=	MYSQL "Support for MySQL queries" on
+.else
+OPTIONS+=	MYSQL "Support for MySQL queries" off
+.endif
+
+.if exists(${LOCALBASE}/lib/libdb3.so)
+WITH_DB3=	yes
+OPTIONS+=	DB3 "Support for DB3" on
+.else
+OPTIONS+=	DB3 "Support for DB3" off
+.endif
+
+.if exists(${LOCALBASE}/lib/libdb4.so)
+WITH_DB4=	yes
+OPTIONS+=	DB3 "Support for DB4" on
+.else
+OPTIONS+=	DB3 "Support for DB4" off
+.endif
+
+.if defined(WITH_DB3) && defined(WITH_DB4)
+.error You cannot use DB3 and DB4 in the same time.
+.endif
+
+.if defined(WITH_LDAP)
+USE_OPENLDAP=	yes
+CONFIGURE_ARGS+=	--with-ldap=${LOCALBASE}/include
+.else
+CONFIGURE_ARGS+=	--without-ldap
+.endif
+
+.if defined(WITH_MYSQL)
+USE_MYSQL=	yes
+CONFIGURE_ARGS+=	--with-mysql=${LOCALBASE}/include/mysql
+.else
+CONFIGURE_ARGS+=	--without-mysql
+.endif
+
+.if defined(WITH_DB3)
+LIB_DEPENDS+=	db3.3:${PORTSDIR}/databases/db3
+CONFIGURE_ARGS+=	--with-db3=${LOCALBASE}/include/db3 --without-db4
+.else
+CONFIGURE_ARGS+=	--without-db3
+.endif
+
+.if defined(WITH_DB4)
+LIB_DEPENDS+=	db4:${PORTSDIR}/databases/db4
+CONFIGURE_ARGS+=	--with-db4=${LOCALBASE}/include/db4 --without-db3
+.else
+CONFIGURE_ARGS+=	--without-db4
+.endif
 
 GNU_CONFIGURE=	YES
-CONFIGURE_ARGS=	--with-db3=${LOCALBASE}/include/db3 --without-db4 \
-		--with-ldap=${LOCALBASE}/include \
-		--with-mysql=${LOCALBASE}/include/mysql
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS}" prefix="${PREFIX}" home_finger
 
@@ -31,4 +87,4 @@
 	${INSTALL_PROGRAM} ${WRKSRC}/home_finger ${PREFIX}/bin
 	${INSTALL_DATA} ${WRKSRC}/home.conf ${PREFIX}/etc/home.conf.dist
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--- libhome-0.7.1_1.patch ends here ---

>Release-Note:
>Audit-Trail:

From: Xavier Beaudouin <kiwi@oav.net>
To: freebsd-ports-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/63930: [MAINTAINER] misc/libhome: Add OPTIONS to port
Date: Thu, 8 Apr 2004 17:05:11 +0200

 Hello,
 
 Can someone look around this port ? It is more than one month old ?
 
 Thanks,
 /Xavier
 --
 Xavier Beaudouin - Unix System Administrator & Projects Leader.
 President of Kazar Organization : http://www.kazar.net/
 Please visit http://caudium.net/, home of Caudium & Camas projects
 
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Tue Apr 13 14:32:15 PDT 2004 
State-Changed-Why:  
Clarification wrt auto-tuning needed. 

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

From: Volker Stolz <vs@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, kiwi@oav.net
Cc:  
Subject: Re: ports/63930: [MAINTAINER] misc/libhome: Add OPTIONS to port
Date: Tue, 13 Apr 2004 23:32:44 +0200

 Your port uses so called "auto-tuning", see 
 http://marc.theaimsgroup.com/?l=freebsd-ports&m=108041775217705&w=2 for 
 details. The current consent seems to be that you should't do this. 
 Could you rework your patch without this feature?
 
 Volker
 

From: Xavier Beaudouin <kiwi@oav.net>
To: Volker Stolz <vs@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/63930: [MAINTAINER] misc/libhome: Add OPTIONS to port
Date: Mon, 19 Apr 2004 14:43:26 +0200

 Hello,
 
 Le 13 avr. 04, =E0 23:32, Volker Stolz a =E9crit :
 
 > Your port uses so called "auto-tuning", see=20
 > http://marc.theaimsgroup.com/?l=3Dfreebsd-ports&m=3D108041775217705&w=3D=
 2=20
 > for details. The current consent seems to be that you should't do=20
 > this. Could you rework your patch without this feature?
 
 I think this is stupid, but since libhome 0.8 is out I will make " not=20=
 
 autotunning " port.
 
 But I'd prefer that because sometime some autoconfigure software=20
 doesn't honnor --without-<feature> functions...
 
 Please close this port until I will update to 0.8.
 
 /Xavier
 
 --
 Xavier Beaudouin - Unix System Administrator & Projects Leader.
 President of Kazar Organization : http://www.kazar.net/
 Please visit http://caudium.net/, home of Caudium & Camas projects
 
State-Changed-From-To: feedback->closed 
State-Changed-By: vs 
State-Changed-When: Mon Apr 19 07:14:57 PDT 2004 
State-Changed-Why:  
Closed on submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63930 
>Unformatted:
