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 + +.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 +.include