Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  8 Mar 2004 17:25:55 +0100 (CET)
From:      Xavier Beaudouin <kiwi@oav.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/63932: [MAINTAINER] mail/lmtpd: Use OPTIONS in port
Message-ID:  <20040308162555.AE22F4AC1D@mx2.oav.net>
Resent-Message-ID: <200403081630.i28GUGa6054369@freefall.freebsd.org>

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

>Number:         63932
>Category:       ports
>Synopsis:       [MAINTAINER] mail/lmtpd: Use OPTIONS in port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 08 08:30:16 PST 2004
>Closed-Date:
>Last-Modified:
>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:
- Added OPTIONS to port :
  o Mysql support to all version with USE_MYSQL
  o Choice of DB3 or DB4
  o Choice to include or not PCRE

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

--- lmtpd-0.9.16_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/lmtpd.old/Makefile /usr/ports/mail/lmtpd/Makefile
--- /usr/ports/mail/lmtpd.old/Makefile	Mon Mar  8 17:07:37 2004
+++ /usr/ports/mail/lmtpd/Makefile	Mon Mar  8 17:24:40 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	lmtpd
 PORTVERSION=	0.9.16
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	pll
@@ -14,16 +15,69 @@
 MAINTAINER=	kiwi@oav.net
 COMMENT=	LMTP server compliant with RFC 2033 and Maildir++
 
-LIB_DEPENDS=	mysqlclient:${PORTSDIR}/databases/mysql323-client \
-		pcre:${PORTSDIR}/devel/pcre \
-		iconv:${PORTSDIR}/converters/libiconv \
-		db3.3:${PORTSDIR}/databases/db3
+LIB_DEPENDS=	iconv:${PORTSDIR}/converters/libiconv
 BUILD_DEPENDS=	${LOCALBASE}/lib/libhome.a:${PORTSDIR}/misc/libhome
 
+OPTIONS=	PCRE "Support for PCRE" on
+
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so)
+WITH_MYSQL=yes
+OPTIONS+=	MYSQL "Support for MySQL Queries and Logs" on
+.else
+OPTIONS+=	MYSQL "Support for MySQL Queries and Logs" 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_PCRE)
+LIB_DEPENDS+=	pcre:${PORTSDIR}/devel/pcre
+CONFIGURE_ARGS+=	--with-pcre
+.else
+CONFIGURE_ARGS+=	--without-pcre
+.endif
+
+.if defined(WITH_MYSQL)
+USE_MYSQL=	yes
+CONFIGURE_ARGS+=	--with-mysql=${LOCALBASE}/include/mysql --with-mysqllog
+.else
+CONFIGURE_ARGS+=	--without-mysql --without-mysqllog
+.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_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include"
-CONFIGURE_ARGS=	--with-mysqllog --with-db3 -without-db4 \
-		--with-pcre --without-perl
+CONFIGURE_ARGS+=	--without-perl
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 
 MAN8=		lmtpd.8
@@ -42,4 +96,4 @@
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--- lmtpd-0.9.16_1.patch ends here ---

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



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