From garga@galle.com.br  Mon Jul 25 12:17:57 2005
Return-Path: <garga@galle.com.br>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C321416A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Jul 2005 12:17:57 +0000 (GMT)
	(envelope-from garga@galle.com.br)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EC31843D46
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Jul 2005 12:17:54 +0000 (GMT)
	(envelope-from garga@galle.com.br)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by data.galle.com.br (8.13.3/8.13.3) with ESMTP id j6PCASeX062623
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Jul 2005 09:10:28 -0300 (BRST)
	(envelope-from garga@data.galle.com.br)
Received: (from garga@localhost)
	by data.galle.com.br (8.13.3/8.13.3/Submit) id j6PCAMwm062622;
	Mon, 25 Jul 2005 09:10:22 -0300 (BRST)
	(envelope-from garga)
Message-Id: <200507251210.j6PCAMwm062622@data.galle.com.br>
Date: Mon, 25 Jul 2005 09:10:22 -0300 (BRST)
From: Renato Botelho <garga@freebsd.org>
Reply-To: Renato Botelho <garga@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: mail/qmail: Big patch to prevent stale dependencies
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         84053
>Category:       ports
>Synopsis:       mail/qmail: Big patch to prevent stale dependencies
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 25 12:20:01 GMT 2005
>Closed-Date:    Sat Jan 21 19:51:20 GMT 2006
>Last-Modified:  Sat Jan 21 19:51:20 GMT 2006
>Originator:     Renato Botelho
>Release:        FreeBSD 5.4-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD data.galle.com.br 5.4-RELEASE-p3 FreeBSD 5.4-RELEASE-p3 #2: Thu Jun 30 10:57:16 BRST 2005 root@srv1.galle.com.br:/usr/obj/usr/src/sys/GALLE i386
>Description:
Big patch to prevent stale dependencies generated when you install a
qmail slaveport and another port that depends of qmail.

This PR supersedes ports/82791 and ports/82929.

------------------------------------------------------------------------

Port touched			Maintainer			Approval

mail/qmail-contrib		(no maintainer)			APPROVED

mail/qmailadmin-devel		(ale@FreeBSD.org)		APPROVED
mail/qmailmrtg7			(ale@FreeBSD.org)		APPROVED
mail/qscan			(ale@FreeBSD.org)		APPROVED
mail/vpopmail-devel		(ale@FreeBSD.org)		APPROVED

mail/mess822			(drs@rucus.ru.ac.za)

mail/qmail-rblchk		(ehaupt@critical.ch)		APPROVED

mail/qmail-scanner		(freebsd@simplerezo.com)

mail/qmail			(garga@FreeBSD.org)		APPROVED
mail/qmail-ldap			(garga@FreeBSD.org)		APPROVED
mail/qmail-mysql		(garga@FreeBSD.org)		APPROVED
mail/qmail-smtp_auth+tls	(garga@FreeBSD.org)		APPROVED
mail/qmail-spamcontrol		(garga@FreeBSD.org)		APPROVED
mail/qmail-tls			(garga@FreeBSD.org)		APPROVED
mail/qmailanalog		(garga@FreeBSD.org)		APPROVED
mail/queue-fix			(garga@FreeBSD.org)		APPROVED

mail/vqadmin			(oliver@FreeBSD.org)		APPROVED

mail/qsheff			(ozkan@enderunix.org)
mail/zabit			(ozkan@enderunix.org)

mail/vmailmgr			(patrick@rinke-bochum.de)

mail/qmHandle			(petef@FreeBSD.org)

mail/qmail-conf			(roam@FreeBSD.org)
mail/qmailadmin			(roam@FreeBSD.org)
mail/vpopmail			(roam@FreeBSD.org)

mail/ezmlm			(sergei@FreeBSD.org)		APPROVED
mail/ezmlm-idx			(sergei@FreeBSD.org)		APPROVED
mail/mailfront			(sergei@FreeBSD.org)		APPROVED
mail/qtools			(sergei@FreeBSD.org)		APPROVED
mail/queue-repair		(sergei@FreeBSD.org)		APPROVED
mail/serialmail			(sergei@FreeBSD.org)		APPROVED

security/amavis-perl		(svenasse@polaris.ca)

sysutils/dtc			(thomas@goirand.fr)

mail/usendmail			(tmseck@netcologne.de)		APPROVED

mail/simscan			(toxa@toxahost.ru)

>How-To-Repeat:
>Fix:

--- qmail_big_patch.diff begins here ---
diff -ruN --exclude=CVS ../ports.orig/UPDATING ./UPDATING
--- ../ports.orig/UPDATING	Fri Jul 22 14:32:08 2005
+++ ./UPDATING	Mon Jul 25 07:37:32 2005
@@ -7,6 +7,27 @@
 upgrades.
 
 
+20050714:
+  AFFECTS: users of mail/qmail, mail/qmail-ldap, mail/qmail-mysql,
+           mail/qmail-smtp_auth+tls, mail/qmail-spamcontrol,
+           mail/qmail-tls and all ports that depend of it.
+  AUTHOR: garga@FreeBSD.org
+
+  If you use qmail installe don a PREFIX different of /var/qmail,
+  please, set a var on /etc/make.conf named QMAIL_PREFIX with this
+  value. It'll be used for many ports that depends of qmail.
+
+  To prevent stale dependencies, when you use one of qmail slave ports,
+  now you just need to set a var named QMAIL_SLAVEPORT on /etc/make.conf
+  assigning to it the name of slaveport you are using.
+
+  The valid options for now are:
+  * ldap
+  * mysql
+  * smtp_auth+tls
+  * spamcontrol
+  * tls
+
 20050722:
   AFFECTS: All RELENG_6 and HEAD users of ports/packages, maintainers
 	   of ports that interact with the compat libraries.
diff -ruN --exclude=CVS ../ports.orig/mail/ezmlm/Makefile ./mail/ezmlm/Makefile
--- ../ports.orig/mail/ezmlm/Makefile	Fri Oct 24 12:56:39 2003
+++ ./mail/ezmlm/Makefile	Mon Jul 25 07:19:07 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	ezmlm
 PORTVERSION=	0.53
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://cr.yp.to/software/ \
 		ftp://ftp.fu-berlin.de/unix/mail/qmail/ \
@@ -19,15 +20,12 @@
 MAINTAINER=	sergei@FreeBSD.org
 COMMENT=	An easy-to-use, high-speed mailing list manager for qmail
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 CONFLICTS=	ezmlm-idx-*
 
 NO_PACKAGE=	Unsure of DJB license
 
-# QMAIL_DIR is the directory where qmail is installed
-QMAIL_DIR?=	/var/qmail
-
 ALL_TARGET=	it
 
 PROGRAMS=	ezmlm-make ezmlm-manage ezmlm-send ezmlm-reject ezmlm-return \
@@ -38,12 +36,14 @@
 MAN5=		ezmlm.5
 DOCS=		BLURB INSTALL README THANKS TODO
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 post-patch:
 	@${ECHO_CMD} ${PREFIX}/bin > ${WRKSRC}/conf-bin
 	@${ECHO_CMD} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
 	@${ECHO_CMD} ${CC} -s > ${WRKSRC}/conf-ld
 	@${ECHO_CMD} ${PREFIX}/man > ${WRKSRC}/conf-man
-	@${ECHO_CMD} ${QMAIL_DIR} > ${WRKSRC}/conf-qmail
+	@${ECHO_CMD} ${QMAIL_PREFIX} > ${WRKSRC}/conf-qmail
 
 do-install:
 	cd ${WRKSRC} && \
diff -ruN --exclude=CVS ../ports.orig/mail/ezmlm-idx/Makefile ./mail/ezmlm-idx/Makefile
--- ../ports.orig/mail/ezmlm-idx/Makefile	Sun Jan 30 22:35:49 2005
+++ ./mail/ezmlm-idx/Makefile	Mon Jul 25 07:19:23 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	ezmlm-idx
 PORTVERSION=	0.40
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	mail
 MASTER_SITES=	ftp://ftp.ezmlm.org/pub/patches/ \
 		ftp://gd.tuwien.ac.at/infosys/mail/qmail/ezmlm-patches/ \
@@ -22,13 +22,10 @@
 MAINTAINER=	sergei@FreeBSD.org
 COMMENT=	Improved version of the ezmlm mailing list manager
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 CONFLICTS=	ezmlm-0.*
 
-# QMAIL_DIR is the directory where qmail is installed
-QMAIL_DIR?=	/var/qmail
-
 # LANGUAGE is the ISO code for the language to use in ezmlmrc
 LANGUAGE?=	en_US
 
@@ -75,6 +72,8 @@
 MAN5=	ezmlm.5 ezmlmglrc.5 ezmlmrc.5 ezmlmsubrc.5
 DOCS=	CHANGES.idx DOWNGRADE.idx FAQ.idx INSTALL.idx README.idx UPGRADE.idx
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 pre-patch:
 	@${MV} -f ${WRKDIR}/ezmlm-idx-${PORTVERSION}/* ${WRKSRC}
 	@cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} < idx.patch
@@ -91,7 +90,7 @@
 	@${ECHO_CMD} ${EXTRACT_LIB} > ${WRKSRC}/sub_pgsql/conf-sqlld
 .endif
 	@${ECHO_CMD} ${PREFIX}/man > ${WRKSRC}/conf-man
-	@${ECHO_CMD} ${QMAIL_DIR} > ${WRKSRC}/conf-qmail
+	@${ECHO_CMD} ${QMAIL_PREFIX} > ${WRKSRC}/conf-qmail
 	@${REINPLACE_CMD} -e 's,/etc/ezmlm/,${PREFIX}/etc/ezmlm/,' \
 		${WRKSRC}/idx.h
 
diff -ruN --exclude=CVS ../ports.orig/mail/mailfront/Makefile ./mail/mailfront/Makefile
--- ../ports.orig/mail/mailfront/Makefile	Thu Nov 18 15:33:42 2004
+++ ./mail/mailfront/Makefile	Mon Jul 25 07:19:32 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	mailfront
 PORTVERSION=	0.92
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://untroubled.org/${PORTNAME}/
 
@@ -16,19 +17,20 @@
 BUILD_DEPENDS=	${LOCALBASE}/lib/libbg.a:${PORTSDIR}/devel/bglibs \
 		${LOCALBASE}/lib/libcvm-client.a:${PORTSDIR}/security/cvm
 
-QMAIL_ROOT?=	/var/qmail
 CFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS?=	-s
 
 DOCS=		NEWS README TODO *.html
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 do-configure:
 	${ECHO_CMD} "${PREFIX}/bin"	> ${WRKSRC}/conf-bin
 	${ECHO_CMD} "${CC} ${CFLAGS}"	> ${WRKSRC}/conf-cc
 	${ECHO_CMD} "${CC} ${LDFLAGS}"	> ${WRKSRC}/conf-ld
 	${ECHO_CMD} "${LOCALBASE}/include/bglibs" > ${WRKSRC}/conf-bgincs
 	${ECHO_CMD} "${LOCALBASE}/lib"	> ${WRKSRC}/conf-bglibs
-	${ECHO_CMD} "${QMAIL_ROOT}"	> ${WRKSRC}/conf-qmail
+	${ECHO_CMD} "${QMAIL_PREFIX}"	> ${WRKSRC}/conf-qmail
 
 do-install:
 	cd ${WRKSRC} && ./installer
diff -ruN --exclude=CVS ../ports.orig/mail/mess822/Makefile ./mail/mess822/Makefile
--- ../ports.orig/mail/mess822/Makefile	Sat Apr 17 19:08:11 2004
+++ ./mail/mess822/Makefile	Mon Jul 25 07:19:40 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	mess822
 PORTVERSION=	0.58
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://cr.yp.to/software/ \
 		ftp://ftp.jp.qmail.org/qmail/ \
@@ -16,7 +17,7 @@
 MAINTAINER=	drs@rucus.ru.ac.za
 COMMENT=	RFC 822 mail message parsing library and rewriting utilities
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 NO_PACKAGE=	Violates djb\'s license
 USE_REINPLACE=	yes
@@ -31,17 +32,13 @@
 MAN5=		rewriting.5
 MAN8=		ofmipd.8 ofmipname.8
 
-.if exists(${PREFIX}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${PREFIX}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
-
 NO_MTREE=	yes
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 post-patch:
 	@${REINPLACE_CMD} -e "s|-O2|${CFLAGS}|" ${WRKSRC}/conf-cc
-	@${REINPLACE_CMD} -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKSRC}/conf-qmail
+	@${REINPLACE_CMD} -e "s|.var.qmail|${QMAIL_PREFIX}|" ${WRKSRC}/conf-qmail
 	@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-home
 
 .include <bsd.port.mk>
diff -ruN --exclude=CVS ../ports.orig/mail/qmHandle/Makefile ./mail/qmHandle/Makefile
--- ../ports.orig/mail/qmHandle/Makefile	Wed Jan 14 02:35:54 2004
+++ ./mail/qmHandle/Makefile	Mon Jul 25 07:19:47 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmHandle
 PORTVERSION=	1.2.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	qmhandle
@@ -16,17 +16,13 @@
 MAINTAINER=	petef@FreeBSD.org
 COMMENT=	Tool to view and manage a qmail queue
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-qstat:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 NO_WRKSUBDIR=	yes
 NO_BUILD=	yes
 USE_PERL5=	yes
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-qstat)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
+.include "${.CURDIR}/../qmail/Makefile.include"
 
 .include <bsd.port.pre.mk>
 
diff -ruN --exclude=CVS ../ports.orig/mail/qmail/Makefile ./mail/qmail/Makefile
--- ../ports.orig/mail/qmail/Makefile	Thu Jul 14 11:50:07 2005
+++ ./mail/qmail/Makefile	Mon Jul 25 07:59:16 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail
 PORTVERSION?=	${QMAIL_VERSION}
-PORTREVISION?=	4
+PORTREVISION?=	5
 CATEGORIES=	mail
 MASTER_SITES+=	${MASTER_SITE_QMAIL}
 DISTNAME=	${PORTNAME}-${QMAIL_VERSION}
@@ -99,10 +99,9 @@
 NO_PACKAGE=	djb's packaging license does not allow non-standard \
 		qmail binary distributions
 
-# A normal qmail installation puts everything into /var/qmail/.
-# If you want to install to /usr/local/, then "/usr/local/qmail" is
-# suggested instead of "/usr/local", but both will work.
-PREFIX?=		/var/qmail
+.include "Makefile.include"
+
+PREFIX?=		${QMAIL_PREFIX}
 QMAIL_VERSION?=		1.03
 
 .if !defined(BARRIER_QMAILQUEUE_PATCH)
@@ -193,6 +192,10 @@
 	qmail-tcpto.8 qmail-pop3d.8 qmail-popup.8 qmail-qmqpc.8 qmail-qmqpd.8 \
 	qmail-qmtpd.8 qmail-smtpd.8 qmail-command.8
 
+.if defined(SLAVE_MYSQL)
+PKGMESSAGE_SUFFIX=	mysql
+.endif
+
 .if defined(SLAVE_SPAMCONTROL)
 EXTRA_MAN8=	qmail-badloadertypes.8 qmail-badmimetypes.8 qmail-recipients.8
 ALL_TARGET+=	${EXTRA_MAN8}
@@ -206,14 +209,14 @@
 .endif
 
 .if defined(SLAVE_LDAP)
-PKGMESSAGE_SUFFIX=	-ldap
+PKGMESSAGE_SUFFIX=	ldap
 PLIST_SUB+=	LDAP="" NOT_LDAP="@comment "
 .else
 PLIST_SUB+=	LDAP="@comment " NOT_LDAP=""
 .endif
 
 .if defined(SLAVE_SMTP_AUTH_TLS)
-PKGMESSAGE_SUFFIX=	-smtp_auth+tls
+PKGMESSAGE_SUFFIX=	smtp_auth+tls
 PLIST_SUB+=	SMTP_AUTH_TLS=""
 .else
 PLIST_SUB+=	SMTP_AUTH_TLS="@comment "
@@ -226,16 +229,27 @@
 .endif
 
 .if defined(SLAVE_TLS)
-PKGMESSAGE_SUFFIX=	-tls
+PKGMESSAGE_SUFFIX=	tls
 PLIST_SUB+=	TLS=""
 .else
 PLIST_SUB+=	TLS="@comment "
 .endif
 
-SUB_FILES+=	pkg-message${PKGMESSAGE_SUFFIX} mailer.conf.sample \
-		bootfiles.sed enable-qmail
+.if defined(PKGMESSAGE_SUFFIX)
+SLAVEPORT_LINE=	${PKGMESSAGE_SUFFIX}
+.elif defined(SLAVE_SPAMCONTROL)
+SLAVEPORT_LINE=	spamcontrol
+.endif
+
+SUB_FILES+=	mailer.conf.sample bootfiles.sed enable-qmail
 PKGINSTALL?=	${WRKDIR}/pkg-install
-PKGMESSAGE?=	${WRKDIR}/pkg-message${PKGMESSAGE_SUFFIX}
+
+.if defined(PKGMESSAGE_SUFFIX)
+SUB_FILES+=	pkg-message-${PKGMESSAGE_SUFFIX}
+PKGMESSAGE?=	${WRKDIR}/pkg-message-${PKGMESSAGE_SUFFIX}
+.else
+SUB_FILES+=	pkg-message
+.endif
 
 CSH?=	/bin/csh
 
@@ -313,10 +327,8 @@
 .endif
 
 .if defined(SLAVE_LDAP)
-PKGNAMESUFFIX:=	${PKGNAMESUFFIX}2
 
 .if !defined(WITHOUT_TLS)
-PKGNAMESUFFIX:=	${PKGNAMESUFFIX}-with_tls
 # we can't use USE_OPENSSL=yes after including bsd.port.pre.mk
 .include "${PORTSDIR}/Mk/bsd.openssl.mk"
 .endif
@@ -472,6 +484,18 @@
 	@${ECHO_MSG} ""
 .endif
 
+.if !defined(QMAIL_PREFIX)
+	@${ECHO_MSG} "QMAIL_PREFIX=PREFIX_PATH"
+	@${ECHO_MSG} "		(default PREFIX_PATH=${PREFIX})"
+	@${ECHO_MSG} "		A normal qmail installation puts"
+	@${ECHO_MSG} "		everything into /var/qmail/."
+	@${ECHO_MSG} "		If you want to install to ${LOCALBASE},"
+	@${ECHO_MSG} "		then \"${LOCALBASE}/qmail\" is suggested"
+	@${ECHO_MSG} "		instead of \"${LOCALBASE}\", but both will"
+	@${ECHO_MSG} "		work."
+ 	@${ECHO_MSG} ""
+.endif
+ 
 post-extract:
 .if defined(SLAVE_SPAMCONTROL)
 	@cd ${WRKSRC} && ${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${SPAMCONTROL_DIST}
@@ -595,6 +619,17 @@
 	@${ECHO_CMD}
 	@${CAT} ${PKGMESSAGE}
 	@${ECHO_CMD}
+.if defined(SLAVEPORT_LINE)
+	@${ECHO_CMD} "============================================="
+	@${ECHO_CMD}
+	@${ECHO_CMD} "ATTENTION"
+	@${ECHO_CMD}
+	@${ECHO_CMD} "Add the following line to your /etc/make.conf"
+	@${ECHO_CMD} "QMAIL_SLAVEPORT=${SLAVEPORT_LINE}"
+	@${ECHO_CMD}
+	@${ECHO_CMD} "============================================="
+	@${ECHO_CMD}
+.endif
 
 certificate:
 .if defined(SLAVE_TLS) || defined(SLAVE_SMTP_AUTH_TLS) || defined(SLAVE_LDAP)
diff -ruN --exclude=CVS ../ports.orig/mail/qmail/Makefile.include ./mail/qmail/Makefile.include
--- ../ports.orig/mail/qmail/Makefile.include	Wed Dec 31 21:00:00 1969
+++ ./mail/qmail/Makefile.include	Mon Jul 25 07:20:03 2005
@@ -0,0 +1,19 @@
+QMAIL_PREFIX?=	/var/qmail
+
+.if defined(DEPEND_QMAIL) || defined(DEPEND_QMAIL_RUN) || defined (DEPEND_QMAIL_BUILD)
+
+.if defined(QMAIL_SLAVEPORT)
+QMAIL_DEPENDS=	${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail-${QMAIL_SLAVEPORT}
+.else
+QMAIL_DEPENDS=	${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
+.endif
+
+.if defined(DEPEND_QMAIL) || defined(DEPEND_QMAIL_RUN)
+RUN_DEPENDS+=	${QMAIL_DEPENDS}
+.endif
+
+.if defined(DEPEND_QMAIL) || defined(DEPEND_QMAIL_BUILD)
+BUILD_DEPENDS+=	${QMAIL_DEPENDS}
+.endif
+
+.endif
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-conf/Makefile ./mail/qmail-conf/Makefile
--- ../ports.orig/mail/qmail-conf/Makefile	Fri Sep  5 04:33:48 2003
+++ ./mail/qmail-conf/Makefile	Mon Jul 25 07:20:10 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail-conf
 PORTVERSION=	0.60
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	http://www.din.or.jp/~ushijima/qmail-conf/ \
 		http://cr.yp.to/djbdns/
@@ -23,9 +23,7 @@
 
 NO_PACKAGE=	"borrows code from djbdns, thus falls under the same restrictions as dns/djbdns"
 
-# Note: this MUST be the same as the directory qmail is installed in!
-QMAIL_DIR?=	/var/qmail
-PREFIX?=	${QMAIL_DIR}
+PREFIX?=	${QMAIL_PREFIX}
 
 NO_MTREE=	yes
 
@@ -33,11 +31,13 @@
 DJBDNS_NAME=	djbdns-${DJBDNS_VER}
 DJBDNS_DIST=	${DJBDNS_NAME}${EXTRACT_SUFX}
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 post-extract:
 		@(cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DJBDNS_DIST} ${EXTRACT_AFTER_ARGS})
 
 post-patch:
-		@${ECHO_CMD} "${QMAIL_DIR}" > ${WRKSRC}/conf-qmail
+		@${ECHO_CMD} "${QMAIL_PREFIX}" > ${WRKSRC}/conf-qmail
 		@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
 		@${ECHO_CMD} "${CC} ${CFLAGS} ${STRIP}" > ${WRKSRC}/conf-ld
 		@${ECHO_CMD} "${LOCALBASE}" > ${WRKSRC}/conf-ucspi-tcp
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-contrib/Makefile ./mail/qmail-contrib/Makefile
--- ../ports.orig/mail/qmail-contrib/Makefile	Thu Mar 25 15:33:22 2004
+++ ./mail/qmail-contrib/Makefile	Mon Jul 25 07:20:20 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	qmail-contrib
 PORTVERSION=	0.1
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	ftp://ftp.qmail.org/pub/software/ \
 		ftp://rucus.ru.ac.za/pub/mail/qmail/src/
@@ -16,7 +17,7 @@
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Contributed programs for qmail
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 NO_PACKAGE=	Unsure of djb\'s license
 
@@ -28,13 +29,7 @@
 
 PLIST_SUB=	DOCDIR=${DOCDIR}
 
-.if exists(${PREFIX}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${PREFIX}/qmail
-PREFIX?=	${PREFIX}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-PREFIX?=	/var/qmail
-.endif
+PREFIX?=	${QMAIL_PREFIX}
 
 .if (${PREFIX} == "/usr/local")
 DOCDIR=		share/doc/qmail
@@ -52,6 +47,8 @@
 NO_MTREE=	yes
 USE_PERL5_BUILD=yes
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 pre-patch:
 	@cd ${WRKFF} \
 	&& ${PATCH} -s <${PATCHDIR}/extra-patch-newaliases
@@ -60,10 +57,10 @@
 
 post-patch:
 	@perl -pi.bak -e "s|-O2|${CFLAGS}|" ${WRKFF}/conf-cc
-	@perl -pi.bak -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKFF}/conf-qmail
+	@perl -pi.bak -e "s|.var.qmail|${QMAIL_PREFIX}|" ${WRKFF}/conf-qmail
 	@perl -pi.bak -e '$$_ = "" if /cat/' ${WRKFF}/hier.c
 	@perl -pi.bak -e "s|-O2|${CFLAGS}|" ${WRKDF}/conf-cc
-	@perl -pi.bak -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKDF}/conf-qmail
+	@perl -pi.bak -e "s|.var.qmail|${QMAIL_PREFIX}|" ${WRKDF}/conf-qmail
 	@perl -pi.bak -e '$$_ = "" if /cat/' ${WRKDF}/hier.c
 
 do-build:
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-ldap/Makefile ./mail/qmail-ldap/Makefile
--- ../ports.orig/mail/qmail-ldap/Makefile	Mon Jul 11 13:47:15 2005
+++ ./mail/qmail-ldap/Makefile	Mon Jul 25 07:58:19 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail
 PORTVERSION=	${QMAIL_VERSION}.${LDAP_PATCH_DATE}
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail
 PKGNAMESUFFIX=	-ldap
 
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-mysql/Makefile ./mail/qmail-mysql/Makefile
--- ../ports.orig/mail/qmail-mysql/Makefile	Mon Jul 11 13:47:15 2005
+++ ./mail/qmail-mysql/Makefile	Mon Jul 25 07:58:24 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail
 PORTVERSION=	${QMAIL_VERSION}.${MYSQL_PATCH_VERSION}
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	mail
 PKGNAMESUFFIX=	-mysql
 
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-rblchk/Makefile ./mail/qmail-rblchk/Makefile
--- ../ports.orig/mail/qmail-rblchk/Makefile	Fri Jul 15 16:19:02 2005
+++ ./mail/qmail-rblchk/Makefile	Mon Jul 25 07:51:48 2005
@@ -7,20 +7,20 @@
 
 PORTNAME=	qmail-rblchk
 PORTVERSION=	2.2
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://morettoni.net/qmail/
 
 MAINTAINER=	ehaupt@critical.ch
 COMMENT=	A qmail RBL filter
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 LDFLAGS?=	-s
 CFLAGS?=	-O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized \
 		-Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
-QMAIL_DIR?=	/var/qmail
 
 ALL_TARGET=	default
 INSTALL_TARGET=	setup
@@ -30,6 +30,8 @@
 PLIST_FILES=	bin/qmail-rblchk %%EXAMPLESDIR%%/spam-report.sh
 PLIST_DIRS=	%%EXAMPLESDIR%%
 MAN1=		qmail-rblchk.1
+
+.include "${.CURDIR}/../qmail/Makefile.include"
 
 post-patch:
 	@${REINPLACE_CMD} 's|02755|0755|g; /"cat/d' ${WRKSRC}/hier.c
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-scanner/Makefile ./mail/qmail-scanner/Makefile
--- ../ports.orig/mail/qmail-scanner/Makefile	Wed Jun  1 16:23:58 2005
+++ ./mail/qmail-scanner/Makefile	Mon Jul 25 07:20:42 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail-scanner
 PORTVERSION=	1.25
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -17,14 +17,10 @@
 MAINTAINER=	freebsd@simplerezo.com
 COMMENT=	Content/Anti-virus Scanner for qmail
 
-BUILD_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail \
-		reformime:${PORTSDIR}/mail/maildrop \
+BUILD_DEPENDS=	reformime:${PORTSDIR}/mail/maildrop \
 		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
 
-# A normal qmail installation puts everything into /var/qmail/.
-# Must match your qmail installation
-QMAIL_DIR?=	/var/qmail
-QMAIL_QUEUE=	${QMAIL_DIR}/bin/qmail-queue
+QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
 
 USE_PERL5=	yes
 NO_BUILD=	yes
@@ -79,12 +75,14 @@
 
 RUN_DEPENDS=	${BUILD_DEPENDS}
 
+DEPEND_QMAIL=	yes
+
 SPOOLDIR=	${PREFIX}/qmailscan
 PLIST_SUB=	SPOOLDIR="${SPOOLDIR:S,${PREFIX}/,,}"
 
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS+=	\
-		--qmaildir "${QMAIL_DIR}" --spooldir "${SPOOLDIR}" \
+		--qmaildir "${QMAIL_PREFIX}" --spooldir "${SPOOLDIR}" \
 		--bindir "${PREFIX}/bin" --qmail-queue-binary "${QMAIL_QUEUE}" \
 		--admin "${QMAILSCAN_ADMIN}" --notify "${QMAILSCAN_NOTIFY}" \
 		--silent-viruses "${QMAILSCAN_SILENTVIRUSES}" \
@@ -93,6 +91,8 @@
 		--log-details syslog --debug no \
 		--batch
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 pre-configure:
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "----------------------------------------"
@@ -137,7 +137,7 @@
 	@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL
 	@if ! ${TEST} -f ${QMAIL_QUEUE}; then \
 		${ECHO_MSG} "Unable to found qmail-queue binary trying '${QMAIL_QUEUE}'.";  \
-		${ECHO_MSG} "Please set QMAIL_DIR to your qmail installation directory !"; \
+		${ECHO_MSG} "Please set QMAIL_PREFIX to your qmail installation directory !"; \
 		exit 1; \
 	fi
 
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-scanner/pkg-plist ./mail/qmail-scanner/pkg-plist
--- ../ports.orig/mail/qmail-scanner/pkg-plist	Mon Feb 28 09:02:10 2005
+++ ./mail/qmail-scanner/pkg-plist	Mon Jul 25 07:20:46 2005
@@ -2,16 +2,22 @@
 bin/qmail-scanner-queue.pl
 bin/qs2mrtg.pl
 share/examples/qs2mrtg/mrtg-qmail-scanner.cfg
+@dirrm share/examples/qs2mrtg
+@unexec if cmp -s %D/%%SPOOLDIR%%/quarantine-attachments.txt %D/%%SPOOLDIR%%/quarantine-attachments.sample; then rm -f %D/%%SPOOLDIR%%/quarantine-attachments.txt && rm -f %D/%%SPOOLDIR%%/quarantine-attachments.db; fi
 %%SPOOLDIR%%/quarantine-attachments.sample
-@unexec if cmp -s %%SPOOLDIR%%/quarantine-attachments.txt %%SPOOLDIR%%/quarantine-attachments.sample; then rm -f %%SPOOLDIR%%/quarantine-attachments.txt; fi
-@unexec rmdir share/examples/qs2mrtg 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/archives/cur 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/archives/new 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/archives/tmp 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/archives 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/quarantine/cur 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/quarantine/new 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/quarantine/tmp 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/quarantine 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%%/tmp 2>/dev/null || true
-@unexec rmdir %%SPOOLDIR%% 2>/dev/null || true
+@exec [ ! -f %D/%%SPOOLDIR%%/quarantine-attachments.txt ] && cp %D/%%SPOOLDIR%%/quarantine-attachments.sample %D/%%SPOOLDIR%%/quarantine-attachments.txt
+%%SPOOLDIR%%/qmail-scanner-queue-version.txt
+@unexec rmdir %D/%%SPOOLDIR%%/archives/cur 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/archives/new 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/archives/tmp 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/archives 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/quarantine/cur 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/quarantine/new 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/quarantine/tmp 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/quarantine 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/working/cur 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/working/new 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/working/tmp 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/working 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%%/tmp 2>/dev/null || true
+@unexec rmdir %D/%%SPOOLDIR%% 2>/dev/null || true
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-smtp_auth+tls/Makefile ./mail/qmail-smtp_auth+tls/Makefile
--- ../ports.orig/mail/qmail-smtp_auth+tls/Makefile	Mon Jul 11 13:47:15 2005
+++ ./mail/qmail-smtp_auth+tls/Makefile	Mon Jul 25 07:58:29 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail
 PORTVERSION=	${QMAIL_VERSION}.${SMTP_AUTH-TLS_PATCH_DATE}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 PKGNAMESUFFIX=	-smtp_auth+tls
 
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-spamcontrol/Makefile ./mail/qmail-spamcontrol/Makefile
--- ../ports.orig/mail/qmail-spamcontrol/Makefile	Wed Jul 13 16:28:45 2005
+++ ./mail/qmail-spamcontrol/Makefile	Mon Jul 25 07:58:35 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail
 PORTVERSION=	${QMAIL_VERSION}.${SPAMCONTROL_VERSION}
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES+=	http://www.fehcom.de/qmail/spamcontrol/:spamcontrol
 PKGNAMESUFFIX=	-spamcontrol
diff -ruN --exclude=CVS ../ports.orig/mail/qmail-tls/Makefile ./mail/qmail-tls/Makefile
--- ../ports.orig/mail/qmail-tls/Makefile	Mon Jul 11 13:47:16 2005
+++ ./mail/qmail-tls/Makefile	Mon Jul 25 07:58:41 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	qmail
 PORTVERSION=	${QMAIL_VERSION}.${TLS_PATCH_DATE}
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	mail
 PKGNAMESUFFIX=	-tls
 
diff -ruN --exclude=CVS ../ports.orig/mail/qmailadmin/Makefile ./mail/qmailadmin/Makefile
--- ../ports.orig/mail/qmailadmin/Makefile	Tue Jun 14 09:48:33 2005
+++ ./mail/qmailadmin/Makefile	Mon Jul 25 07:20:55 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	qmailadmin
 PORTVERSION=	1.2.7
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	mail www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
@@ -70,22 +71,14 @@
 PLIST_SUB+=	CGIBINDIR="${CGIBINDIR}" CGIBINSUBDIR="${CGIBINSUBDIR}" \
 		WEBDATADIR="${WEBDATADIR}" WEBDATASUBDIR="${WEBDATASUBDIR}"
 
-.include <bsd.port.pre.mk>
-
-#
-# QMAIL_DIR     - location of qmail directory
-#
+.include "${.CURDIR}/../qmail/Makefile.include"
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
+.include <bsd.port.pre.mk>
 
 # End of user-configurable variables
 
 CONFIGURE_ARGS+=	\
-	--enable-qmaildir=${QMAIL_DIR} \
+	--enable-qmaildir=${QMAIL_PREFIX} \
 	--enable-htmldir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR} \
 	--enable-imagedir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR}/images \
 	--enable-imageurl=${WEBDATAURL}/${WEBDATASUBDIR}/images \
diff -ruN --exclude=CVS ../ports.orig/mail/qmailadmin-devel/Makefile ./mail/qmailadmin-devel/Makefile
--- ../ports.orig/mail/qmailadmin-devel/Makefile	Mon Mar 14 06:26:52 2005
+++ ./mail/qmailadmin-devel/Makefile	Mon Jul 25 07:21:01 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	qmailadmin
 PORTVERSION=	1.2.7
+PORTREVISION=	1
 CATEGORIES=	mail www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -16,11 +17,9 @@
 COMMENT=	CGI program for administering Qmail with vchkpw/vpopmail
 
 BUILD_DEPENDS=	\
-	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
 	autorespond:${PORTSDIR}/mail/autorespond \
 	${LOCALBASE}/vpopmail/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail-devel
 RUN_DEPENDS=	\
-	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
 	autorespond:${PORTSDIR}/mail/autorespond \
 	${LOCALBASE}/vpopmail/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail-devel
 
@@ -71,22 +70,14 @@
 PLIST_SUB+=	CGIBINDIR="${CGIBINDIR}" CGIBINSUBDIR="${CGIBINSUBDIR}" \
 		WEBDATADIR="${WEBDATADIR}" WEBDATASUBDIR="${WEBDATASUBDIR}"
 
-.include <bsd.port.pre.mk>
-
-#
-# QMAIL_DIR     - location of qmail directory
-#
+.include "${.CURDIR}/../qmail/Makefile.include"
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
+.include <bsd.port.pre.mk>
 
 # End of user-configurable variables
 
 CONFIGURE_ARGS+=	\
-	--enable-qmaildir=${QMAIL_DIR} \
+	--enable-qmaildir=${QMAIL_PREFIX} \
 	--enable-htmldir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR} \
 	--enable-imagedir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR}/images \
 	--enable-imageurl=${WEBDATAURL}/${WEBDATASUBDIR}/images \
diff -ruN --exclude=CVS ../ports.orig/mail/qmailanalog/Makefile ./mail/qmailanalog/Makefile
--- ../ports.orig/mail/qmailanalog/Makefile	Mon Jul 11 19:35:35 2005
+++ ./mail/qmailanalog/Makefile	Mon Jul 25 07:21:08 2005
@@ -7,14 +7,14 @@
 
 PORTNAME=	qmailanalog
 PORTVERSION=	0.70
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	ftp://cr.yp.to/software/
 
 MAINTAINER=	garga@FreeBSD.org
 COMMENT=	A collection of tools to analyze qmail-send's activity
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 ALL_TARGET=	it
 INSTALL_TARGET=	setup
@@ -24,28 +24,24 @@
 
 PLIST_SUB+=	MYSUBDIR=${MYSUBDIR}
 
-.if exists(${PREFIX}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${PREFIX}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
-
 .if !defined(NOSUBDIR)
 MYSUBDIR?=	qmailanalog/
 .else
 MYSUBDIR?=
 .endif
 
-PREFIX?=	${QMAIL_DIR}
+PREFIX?=	${QMAIL_PREFIX}
 QMPREFIX?=	${PREFIX}/${MYSUBDIR}
 
 NO_MTREE=	yes
 USE_REINPLACE=	yes
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 .include <bsd.port.pre.mk>
 
-.if ${PREFIX} != ${QMAIL_DIR}
-BROKEN=	"Cannot Make and Install with different PREFIX or QMAIL_DIR"
+.if ${PREFIX} != ${QMAIL_PREFIX}
+BROKEN=	"Cannot Make and Install with different PREFIX or QMAIL_PREFIX"
 .endif
 
 post-patch:
diff -ruN --exclude=CVS ../ports.orig/mail/qmailmrtg7/Makefile ./mail/qmailmrtg7/Makefile
--- ../ports.orig/mail/qmailmrtg7/Makefile	Tue Jun 14 11:51:42 2005
+++ ./mail/qmailmrtg7/Makefile	Mon Jul 25 07:21:17 2005
@@ -7,29 +7,25 @@
 
 PORTNAME=	qmailmrtg7
 PORTVERSION=	4.2
+PORTREVISION=	1
 CATEGORIES=	mail net-mgmt
 MASTER_SITES=	http://www.inter7.com/qmailmrtg7/
 
 MAINTAINER=	ale@FreeBSD.org
 COMMENT=	A program to create mrtg graphs for qmail activity
 
-BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-queue:${PORTSDIR}/mail/qmail
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-queue:${PORTSDIR}/mail/qmail \
-		mrtg:${PORTSDIR}/net-mgmt/mrtg
+RUN_DEPENDS=	mrtg:${PORTSDIR}/net-mgmt/mrtg
+DEPEND_QMAIL=	yes
 
 USE_REINPLACE=	yes
 
-.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../qmail/Makefile.include"
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
+.include <bsd.port.pre.mk>
 
 post-patch:
 	@${REINPLACE_CMD} "s|cc|${CC}|g;s|-s -O|${CFLAGS}|g" ${WRKSRC}/Makefile
-	@${REINPLACE_CMD} "s|/usr/local|${PREFIX}|g;s|/var/qmail|${QMAIL_DIR}|g" \
+	@${REINPLACE_CMD} "s|/usr/local|${PREFIX}|g;s|/var/qmail|${QMAIL_PREFIX}|g" \
 		${WRKSRC}/checkq.c ${WRKSRC}/qmail.mrtg.cfg
 
 do-install:
diff -ruN --exclude=CVS ../ports.orig/mail/qscan/Makefile ./mail/qscan/Makefile
--- ../ports.orig/mail/qscan/Makefile	Thu Apr  8 12:13:39 2004
+++ ./mail/qscan/Makefile	Mon Jul 25 07:21:27 2005
@@ -7,28 +7,26 @@
 
 PORTNAME=	qscan
 PORTVERSION=	1.5
+PORTREVISION=	1
 CATEGORIES=	mail security
 MASTER_SITES=	ftp://ftp.c9x.org/qscan/
 
 MAINTAINER=	ale@FreeBSD.org
 COMMENT=	A mail filter for Qmail that scans messages with ClamAV
 
-RUN_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail \
-		clamdscan:${PORTSDIR}/security/clamav \
+RUN_DEPENDS=	clamdscan:${PORTSDIR}/security/clamav \
 		ripmime:${PORTSDIR}/mail/ripmime
+DEPEND_QMAIL_RUN=	yes
 
 GNU_CONFIGURE=	yes
 USE_REINPLACE=	yes
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 .include <bsd.port.pre.mk>
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
-QMAIL_QUEUE=	${QMAIL_DIR}/bin/qmail-queue
-QSCAN_VAR?=	${QMAIL_DIR}/${PORTNAME}
+QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
+QSCAN_VAR?=	${QMAIL_PREFIX}/${PORTNAME}
 PLIST_SUB+=	QSCAN_VAR="${QSCAN_VAR}" \
 		QMAIL_QUEUE="${QMAIL_QUEUE}"
 
diff -ruN --exclude=CVS ../ports.orig/mail/qsheff/Makefile ./mail/qsheff/Makefile
--- ../ports.orig/mail/qsheff/Makefile	Wed Jul 20 10:39:35 2005
+++ ./mail/qsheff/Makefile	Mon Jul 25 07:53:47 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	qsheff
 PORTVERSION=	1.0.r1
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://www.enderunix.org/qsheff/
 DISTNAME=	${PORTNAME}-1.0-r1
@@ -14,8 +15,8 @@
 MAINTAINER=	ozkan@enderunix.org
 COMMENT=	A qmail-queue replacement to filter mail traffic
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-queue:${PORTSDIR}/mail/qmail \
-		${LOCALBASE}/bin/ripmime:${PORTSDIR}/mail/ripmime
+RUN_DEPENDS=	${LOCALBASE}/bin/ripmime:${PORTSDIR}/mail/ripmime
+DEPEND_QMAIL_RUN=	yes
 
 USE_REINPLACE=	YES
 GNU_CONFIGURE=	YES
@@ -28,15 +29,11 @@
 
 OPTIONS=	CLAMAV "Integrate with Clam AntiVirus" on
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
+PREFIX?=	${QMAIL_PREFIX}
 
-PREFIX?=	${QMAIL_DIR}
+CONFIGURE_ARGS+=	--with-qmaildir=${QMAIL_PREFIX}
 
-CONFIGURE_ARGS+=	--with-qmaildir=${QMAIL_DIR}
+.include "${.CURDIR}/../qmail/Makefile.include"
 
 .include <bsd.port.pre.mk>
 
diff -ruN --exclude=CVS ../ports.orig/mail/qtools/Makefile ./mail/qtools/Makefile
--- ../ports.orig/mail/qtools/Makefile	Thu Oct 23 03:42:46 2003
+++ ./mail/qtools/Makefile	Mon Jul 25 07:21:35 2005
@@ -7,27 +7,32 @@
 
 PORTNAME=	qtools
 PORTVERSION=	0.56
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	http://www.superscript.com/qtools/
 
 MAINTAINER=	sergei@FreeBSD.org
 COMMENT=	Tools to use in .qmail files
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
-		${EZMLM_DIR}/bin/ezmlm-weed:${PORTSDIR}/mail/ezmlm
+RUN_DEPENDS=	${EZMLM_DIR}/bin/ezmlm-weed:${PORTSDIR}/mail/ezmlm
 
 ALL_TARGET=	it
 INSTALL_TARGET=	setup check
 
-QMAIL_DIR?=	/var/qmail
 EZMLM_DIR?=	${LOCALBASE}
 
+USE_REINPLACE=	yes
+
+.include "${.CURDIR}/../qmail/Makefile.include"
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|02755|0755|g' ${WRKSRC}/hier.c
+
 do-configure:
 	@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
 	@${ECHO_CMD} "${CC} ${STRIP}" > ${WRKSRC}/conf-ld
 	@${ECHO_CMD} "${PREFIX}" > ${WRKSRC}/conf-home
-	@${ECHO_CMD} "${QMAIL_DIR}" > ${WRKSRC}/conf-qmail
+	@${ECHO_CMD} "${QMAIL_PREFIX}" > ${WRKSRC}/conf-qmail
 	@${ECHO_CMD} "${EZMLM_DIR}/bin/ezmlm" > ${WRKSRC}/conf-ezmlm
 
 .include <bsd.port.mk>
diff -ruN --exclude=CVS ../ports.orig/mail/queue-fix/Makefile ./mail/queue-fix/Makefile
--- ../ports.orig/mail/queue-fix/Makefile	Mon Jul 11 19:35:35 2005
+++ ./mail/queue-fix/Makefile	Mon Jul 25 07:21:43 2005
@@ -7,16 +7,16 @@
 
 PORTNAME=	queue-fix
 PORTVERSION=	1.4
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://www.netmeridian.com/e-huss/
 
 MAINTAINER=	garga@FreeBSD.org
 COMMENT=	Repairs or generates a qmail queue structure
 
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
-QMAIL_DIR?=	/var/qmail
-PREFIX?=	${QMAIL_DIR}
+PREFIX?=	${QMAIL_PREFIX}
 
 OPTIONS=	BIG_TODO "Use big_todo patch" off
 
@@ -25,6 +25,8 @@
 
 PLIST_SUB=	DOCDIR=${DOCDIR}
 PLIST_FILES=	bin/queue-fix
+
+.include "${.CURDIR}/../qmail/Makefile.include"
 
 .if !defined(NOPORTDOCS)
 PLIST_FILES+=	%%DOCDIR%%/README
diff -ruN --exclude=CVS ../ports.orig/mail/queue-repair/Makefile ./mail/queue-repair/Makefile
--- ../ports.orig/mail/queue-repair/Makefile	Mon Dec  8 15:09:23 2003
+++ ./mail/queue-repair/Makefile	Mon Jul 25 07:21:58 2005
@@ -7,15 +7,16 @@
 
 PORTNAME=	queue-repair
 PORTVERSION=	0.9.0
+PORTREVISION=	1
 CATEGORIES=	mail python
-MASTER_SITES=	http://www.qcc.ca/~charlesc/software/queue_repair/
+MASTER_SITES=	http://pyropus.ca/software/queue-repair/
 
 MAINTAINER=	sergei@FreeBSD.org
 COMMENT=	A qmail queue diagnostic and repair tool
 
 .if !defined(WITHOUT_QMAIL_PORT)
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
-QMAIL_DIR?=	/var/qmail
+DEPEND_QMAIL_RUN=	yes
+.include "${.CURDIR}/../qmail/Makefile.include"
 .endif
 
 USE_PYTHON=	yes
diff -ruN --exclude=CVS ../ports.orig/mail/serialmail/Makefile ./mail/serialmail/Makefile
--- ../ports.orig/mail/serialmail/Makefile	Tue Oct 12 04:35:40 2004
+++ ./mail/serialmail/Makefile	Mon Jul 25 07:22:28 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	serialmail
 PORTVERSION=	0.75
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	http://cr.yp.to/software/ \
 		ftp://ftp.gbnet.net/pub/qmail/ \
@@ -17,11 +17,8 @@
 MAINTAINER=	sergei@FreeBSD.org
 COMMENT=	Tools for passing mail across serial links
 
-RUN_DEPENDS=	tcpserver:${PORTSDIR}/sysutils/ucspi-tcp \
-		${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
-
-# QMAIL_DIR is the directory where qmail is installed
-QMAIL_DIR?=	/var/qmail
+RUN_DEPENDS=	tcpserver:${PORTSDIR}/sysutils/ucspi-tcp
+DEPEND_QMAIL_RUN=	yes
 
 NO_PACKAGE=	Unsure of DJB license
 
@@ -35,6 +32,8 @@
 		serialsmtp.1 setlock.1
 DOCS=		AUTOTURN BLURB CHANGES FROMISP README TODO TOISP THANKS
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 .include <bsd.port.pre.mk>
 
 .if defined(WITH_AUTH)
@@ -47,7 +46,7 @@
 	@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-home
 	@${ECHO_CMD} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
 	@${ECHO_CMD} ${CC} -s > ${WRKSRC}/conf-ld
-	@${ECHO_CMD} ${QMAIL_DIR} > ${WRKSRC}/conf-qmail
+	@${ECHO_CMD} ${QMAIL_PREFIX} > ${WRKSRC}/conf-qmail
 
 do-install:
 	cd ${WRKSRC} && \
diff -ruN --exclude=CVS ../ports.orig/mail/simscan/Makefile ./mail/simscan/Makefile
--- ../ports.orig/mail/simscan/Makefile	Mon Jul 11 19:35:35 2005
+++ ./mail/simscan/Makefile	Mon Jul 25 07:23:04 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	simscan
 PORTVERSION=	1.1
+PORTREVISION=	1
 CATEGORIES=	mail security
 MASTER_SITES=	http://www.inter7.com/simscan/
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -15,16 +16,13 @@
 MAINTAINER=	toxa@toxahost.ru
 COMMENT=	Fast Content/Anti-virus Scanner for qmail Written in C
 
-BUILD_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_BUILD=	yes
 
 GNU_CONFIGURE=	yes
 
-# A normal qmail installation puts everything into /var/qmail/.
-# Must match your qmail installation
-QMAIL_DIR?=	/var/qmail
-WORKDIR?=	${QMAIL_DIR}/${PORTNAME}
-QMAIL_QUEUE=	${QMAIL_DIR}/bin/qmail-queue
-PLIST_SUB=	QMAIL_DIR=${QMAIL_DIR} \
+WORKDIR?=	${QMAIL_PREFIX}/${PORTNAME}
+QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
+PLIST_SUB=	QMAIL_PREFIX=${QMAIL_PREFIX} \
 		SIMSCAN_DIR=${PORTNAME}
 
 OPTIONS=	CLAMAV "Support for ClamAV Virus Scanning" on \
@@ -37,10 +35,12 @@
 		PASSTHRU "Pass Spam Thru, Do Not Reject (required SPAMD)" off \
 		HEADERS "Add a Received Line With Versions of Scanners" off
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 .include <bsd.port.pre.mk>
 
 CONFIGURE_ARGS=--enable-clamavdb-path=/var/db/clamav \
-		--enable-qmaildir=${QMAIL_DIR} \
+		--enable-qmaildir=${QMAIL_PREFIX} \
 	  	--enable-spamc-user=n \
 		--enable-workdir=${WORKDIR}
 
@@ -107,7 +107,7 @@
 
 if ! ${TEST} -f ${QMAIL_QUEUE}; then \
 	${ECHO_MSG} "Unable to found qmail-queue binary trying '${QMAIL_QUEUE}'.";  \
-	${ECHO_MSG} "Please set QMAIL_DIR to your qmail installation directory !"; \
+	${ECHO_MSG} "Please set QMAIL_PREFIX to your qmail installation directory !"; \
 	exit 1; \
 fi
 
@@ -116,7 +116,7 @@
 	@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
 	@${ECHO_MSG} "You may also use the following build options:"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "QMAIL_DIR		Base qmail directory. Default is /var/qmail"
+	@${ECHO_MSG} "QMAIL_PREFIX		Base qmail directory. Default is /var/qmail"
 	@${ECHO_MSG} "WORKDIR		Directory to unpack emails. Default is /var/qmail/simscan"
 	@${ECHO_MSG} "QMAIL_QUEUE		Define full path and name of the qmail-queue program"
 	@${ECHO_MSG} "			Incoming mail is passed to this program after being"
@@ -131,8 +131,8 @@
 	@${ECHO_MSG} ""
 
 post-install:
-	@${CHMOD} 04711 ${QMAIL_DIR}/bin/simscan
-	@${CHOWN} simscan:simscan ${QMAIL_DIR}/bin/simscan ${QMAIL_DIR}/bin/simscanmk
+	@${CHMOD} 04711 ${QMAIL_PREFIX}/bin/simscan
+	@${CHOWN} simscan:simscan ${QMAIL_PREFIX}/bin/simscan ${QMAIL_PREFIX}/bin/simscanmk
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 .for i in ${PORTDOCS}
diff -ruN --exclude=CVS ../ports.orig/mail/simscan/pkg-plist ./mail/simscan/pkg-plist
--- ../ports.orig/mail/simscan/pkg-plist	Sun Apr  3 13:04:21 2005
+++ ./mail/simscan/pkg-plist	Mon Jul 25 07:23:09 2005
@@ -1,7 +1,7 @@
-@cwd %%QMAIL_DIR%%
+@cwd %%QMAIL_PREFIX%%
 bin/simscanmk
 bin/simscan
-@unexec rmdir %%QMAIL_DIR%%/%%SIMSCAN_DIR%% || true
+@unexec rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true
 @unexec echo ""
-@unexec echo "If you're not updating this port, you can delete %%QMAIL_DIR%%/%%SIMSCAN_DIR%% directory"
+@unexec echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory"
 @unexec echo ""
diff -ruN --exclude=CVS ../ports.orig/mail/usendmail/Makefile ./mail/usendmail/Makefile
--- ../ports.orig/mail/usendmail/Makefile	Mon Jul 25 07:12:32 2005
+++ ./mail/usendmail/Makefile	Mon Jul 25 07:54:51 2005
@@ -4,20 +4,17 @@
 #
 # $FreeBSD: ports/mail/usendmail/Makefile,v 1.4 2005/07/21 11:56:46 garga Exp $
 #
-# Tunables: QMAIL_DIR: Where qmail resides (default: /var/qmail)
 
 PORTNAME=	usendmail
 PORTVERSION=	0.1.6
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://www.ohse.de/uwe/usendmail/
 
 MAINTAINER=	tmseck@netcologne.de
 COMMENT=	A replacement for qmail's sendmail drop-in
 
-BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
-
-QMAIL_DIR?=	/var/qmail
+DEPEND_QMAIL=	yes
 
 NO_SIZE=	yes
 USE_REINPLACE=	yes
@@ -26,10 +23,12 @@
 PLIST_FILES=	sbin/usendmail
 PORTDOCS=	NEWS README
 SUB_FILES=	pkg-message
-SUB_LIST=	QMAIL_DIR=${QMAIL_DIR}
+SUB_LIST=	QMAIL_PREFIX=${QMAIL_PREFIX}
+
+.include "${.CURDIR}/../qmail/Makefile.include"
 
 post-patch:
-	@${REINPLACE_CMD} -e 's,/var/qmail,${QMAIL_DIR},' \
+	@${REINPLACE_CMD} -e 's,/var/qmail,${QMAIL_PREFIX},' \
 	    ${WRKSRC}/src/usendmail.c
 	@${REINPLACE_CMD} -e 's,^CC=,CC\?=,' \
 	    ${WRKSRC}/src/Makefile
diff -ruN --exclude=CVS ../ports.orig/mail/usendmail/files/pkg-message.in ./mail/usendmail/files/pkg-message.in
--- ../ports.orig/mail/usendmail/files/pkg-message.in	Thu Jul 21 08:56:47 2005
+++ ./mail/usendmail/files/pkg-message.in	Mon Jul 25 07:42:39 2005
@@ -7,8 +7,8 @@
 
 in /etc/mail/mailer.conf replace the lines
 
-sendmail	%%QMAIL_DIR%%/bin/sendmail
-send-mail	%%QMAIL_DIR%%/bin/sendmail
+sendmail	%%QMAIL_PREFIX%%/bin/sendmail
+send-mail	%%QMAIL_PREFIX%%/bin/sendmail
 
 with
 
@@ -16,5 +16,5 @@
 send-mail	%%PREFIX%%/sbin/usendmail
 
 Otherwise replace the link from /usr/sbin/sendmail to
-%%QMAIL_DIR%%/bin/sendmail with one to %%PREFIX%%/sbin/usendmail.
+%%QMAIL_PREFIX%%/bin/sendmail with one to %%PREFIX%%/sbin/usendmail.
 
diff -ruN --exclude=CVS ../ports.orig/mail/vmailmgr/Makefile ./mail/vmailmgr/Makefile
--- ../ports.orig/mail/vmailmgr/Makefile	Sun Jan 30 09:28:50 2005
+++ ./mail/vmailmgr/Makefile	Mon Jul 25 07:24:42 2005
@@ -7,26 +7,38 @@
 
 PORTNAME=	vmailmgr
 PORTVERSION=	0.96.9
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	http://www.vmailmgr.org/current/
 
 MAINTAINER=	patrick@rinke-bochum.de
 COMMENT=	Virtual MAIL ManaGeR for virtual mailboxes and domains
 
-RUN_DEPENDS=	/var/qmail/bin/qmail-start:${PORTSDIR}/mail/qmail \
-		unixserver:${PORTSDIR}/sysutils/ucspi-unix
+USE_APACHE=	yes
+DEPEND_QMAIL_RUN=	yes
 
-HAS_CONFIGURE=yes
+HAS_CONFIGURE=	yes
+USE_REINPLACE=	yes
 
-SVC_DIR=	"/var/qmail/service/vmailmgrd"
+SVC_DIR=	"${QMAIL_PREFIX}/service/vmailmgrd"
+PHP_DIR=	${PREFIX}/www/data-dist/${PORTNAME}
+CGI_DIR=	${PREFIX}/www/cgi-bin-dist
+
+PLIST_SUB+=	PHP_DIR=${PHP_DIR} CGI_DIR=${CGI_DIR}
 
 MAN1=		checkvpw.1 vauthenticate.1 vpasswd2cdb.1 vrehash.1 \
 		listvdomain.1 vadduser.1 vchattr.1 vchforwards.1 \
-		vcheckquota.1 vdeliver.1 vdeluser.1 vpasswd.1
+		vcheckquota.1 vdeliver.1 vdeluser.1 vpasswd.1 \
+		vpasswd2db.1 vpasswds.1 vpopbull.1 vsetup.1
 MAN7=		vmailmgr.7
 MAN8=		vmailmgrd.8
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|phpdir=".home.httpd.php"|phpdir="${PHP_DIR}"|g' \
+			  -e 's|cgidir=...prefix./cgi-bin.|cgidir="${CGI_DIR}"|g' \
+		${WRKSRC}/configure ${WRKSRC}/configure.in
 post-install:
 	${MKDIR} ${PREFIX}/etc/vmailmgr
 	${CP} ${WRKSRC}/scripts/autoresponder.sh ${PREFIX}/etc/vmailmgr/vdeliver-postdeliver
diff -ruN --exclude=CVS ../ports.orig/mail/vmailmgr/pkg-plist ./mail/vmailmgr/pkg-plist
--- ../ports.orig/mail/vmailmgr/pkg-plist	Tue Oct 14 12:04:01 2003
+++ ./mail/vmailmgr/pkg-plist	Mon Jul 25 07:24:46 2005
@@ -19,18 +19,24 @@
 bin/vauthenticate
 bin/checkvpw
 bin/showvconfig
-cgi-bin/vpasswd
-cgi-bin/vadduser
-cgi-bin/vdeluser
-cgi-bin/vaddalias
-cgi-bin/vchattr
-cgi-bin/vchforwards
-cgi-bin/listvdomain
+%%CGI_DIR%%/vpasswd
+%%CGI_DIR%%/vadduser
+%%CGI_DIR%%/vdeluser
+%%CGI_DIR%%/vaddalias
+%%CGI_DIR%%/vchattr
+%%CGI_DIR%%/vchforwards
+%%CGI_DIR%%/listvdomain
+@unexec rmdir %D/%%CGI_DIR%% 2>/dev/null || true
 etc/vmailmgr/default-username
 etc/vmailmgr/vdeliver-postdeliver
 lib/courier-imap/libexec/authlib/authvmailmgr
+@dirrm lib/courier-imap/libexec/authlib
+@dirrm lib/courier-imap/libexec
+@dirrm lib/courier-imap
 sbin/vmailmgrd
 @dirrm etc/vmailmgr
+%%PHP_DIR%%/vmail.inc
+@dirrm %%PHP_DIR%%
 @cwd /var/qmail/service
 vmailmgrd/log/run
 vmailmgrd/run
diff -ruN --exclude=CVS ../ports.orig/mail/vpopmail/Makefile ./mail/vpopmail/Makefile
--- ../ports.orig/mail/vpopmail/Makefile	Mon Jul 11 19:35:35 2005
+++ ./mail/vpopmail/Makefile	Mon Jul 25 07:55:36 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	vpopmail
 PORTVERSION=	5.4.10
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -15,10 +15,9 @@
 MAINTAINER=	roam@FreeBSD.org
 COMMENT=	Easy virtual domain and authentication package for use with qmail
 
-BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
-		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
-		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
+BUILD_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
+RUN_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
+DEPEND_QMAIL=	yes
 
 CONFLICTS=	vpopmail-devel-5.*
 
@@ -31,7 +30,7 @@
 VCFGFILES?=	inc_deps lib_deps tcp.smtp
 
 CONFIGURE_ENV+=	VCFGDIR="${VCFGDIR}"
-CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_DIR} \
+CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_PREFIX} \
 		--enable-tcprules-prog=${LOCALBASE}/bin/tcprules \
 		--enable-tcpserver-file=${PREFIX}/vpopmail/etc/tcp.smtp
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -76,7 +75,7 @@
 # WITH_MYSQL_LOG - enable auth logging to a MySQL database [deprecateed]
 # WITH_PGSQL_LOG - enable auth logging to a PostgreSQL database [deprecated]
 # WITH_SQL_LOG  - enable auth logging to the selected SQL database
-# QMAIL_DIR     - location of qmail directory
+# QMAIL_PREFIX  - location of qmail directory
 # PREFIX	- installation area for vpopmail (see comment below)
 # VCHKPW_GID	- the group ID of the new vchkpw group (89)
 # VPOPMAIL_UID	- the user ID of the new vpopmail user (89)
@@ -189,13 +188,9 @@
 CONFIGURE_ARGS+=	--enable-sql-logging
 .endif
 
-.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../qmail/Makefile.include"
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
+.include <bsd.port.pre.mk>
 
 # Uncomment this, or set PREFIX to /home if you have an existing
 # vpopmail install with the vpopmail users' home directory set to
diff -ruN --exclude=CVS ../ports.orig/mail/vpopmail-devel/Makefile ./mail/vpopmail-devel/Makefile
--- ../ports.orig/mail/vpopmail-devel/Makefile	Sun Jan 30 22:35:50 2005
+++ ./mail/vpopmail-devel/Makefile	Mon Jul 25 07:26:41 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	vpopmail
 PORTVERSION=	5.5.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -16,23 +16,22 @@
 MAINTAINER=	ale@FreeBSD.org
 COMMENT=	Easy virtual domain and authentication package for use with qmail
 
-BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
-		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
-RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
-		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
+BUILD_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
+RUN_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
+DEPEND_QMAIL=	yes
 
 CONFLICTS=	vpopmail-5.*
 
 GNU_CONFIGURE=	YES
 USE_GMAKE=	YES
 USE_REINPLACE=	YES
-USE_PERL5_BUILD=	YES
+USE_PERL5=	YES
 
 VCFGDIR?=	${WRKDIR}/vcfg
 VCFGFILES?=	inc_deps lib_deps tcp.smtp
 
 CONFIGURE_ENV+=	VCFGDIR="${VCFGDIR}"
-CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_DIR} \
+CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_PREFIX} \
 		--enable-tcprules-prog=${LOCALBASE}/bin/tcprules \
 		--enable-tcpserver-file=${PREFIX}/vpopmail/etc/tcp.smtp
 
@@ -74,7 +73,7 @@
 # WITHOUT_AUTH_LOG - disables authentication logging
 # WITH_MYSQL_LOG - enable logging to a MySQL database
 # WITH_PGSQL_LOG - enable logging to a PostgreSQL database
-# QMAIL_DIR     - location of qmail directory
+# QMAIL_PREFIX   - location of qmail directory
 # PREFIX	- installation area for vpopmail (see comment below)
 # VCHKPW_GID	- the group ID of the new vchkpw group (89)
 # VPOPMAIL_UID	- the user ID of the new vpopmail user (89)
@@ -168,13 +167,9 @@
 .endif
 .endif
 
-.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../qmail/Makefile.include"
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
+.include <bsd.port.pre.mk>
 
 # Uncomment this, or set PREFIX to /home if you have an existing
 # vpopmail install with the vpopmail users' home directory set to
@@ -327,10 +322,11 @@
 	${MKDIR} ${PREFIX}/vpopmail/etc
 	if [ ! -e "${PREFIX}/vpopmail/etc/tcp.smtp" ]; then \
 		if [ -e "${VCFGDIR}/tcp.smtp" ]; then \
-			${INSTALL_DATA} ${VCFGDIR}/tcp.smtp ${PREFIX}/vpopmail/etc/; \
+			${INSTALL_DATA} ${VCFGDIR}/tcp.smtp ${PREFIX}/vpopmail/etc/tcp.smtp-dist; \
 		else \
-			${TOUCH} ${PREFIX}/vpopmail/etc/tcp.smtp; \
+			${TOUCH} ${PREFIX}/vpopmail/etc/tcp.smtp-dist; \
 		fi; \
+		${CP} -p ${PREFIX}/vpopmail/etc/tcp.smtp-dist ${PREFIX}/vpopmail/etc/tcp.smtp; \
 	fi
 .if defined(DEFAULT_DOMAIN)
 	${ECHO_CMD} ${DEFAULT_DOMAIN} > ${PREFIX}/vpopmail/etc/defaultdomain
diff -ruN --exclude=CVS ../ports.orig/mail/vpopmail-devel/pkg-plist ./mail/vpopmail-devel/pkg-plist
--- ../ports.orig/mail/vpopmail-devel/pkg-plist	Thu Feb 26 10:49:13 2004
+++ ./mail/vpopmail-devel/pkg-plist	Mon Jul 25 07:26:47 2005
@@ -41,7 +41,9 @@
 @unexec if [ -f %D/vpopmail/etc/defaultdomain ]; then rm -f %D/vpopmail/etc/defaultdomain; fi
 vpopmail/etc/inc_deps
 vpopmail/etc/lib_deps
-@unexec if [ -f %D/vpopmail/etc/tcp.smtp -a ! -s %D/vpopmail/etc/tcp.smtp ]; then rm -f %D/vpopmail/etc/tcp.smtp; fi
+@unexec if cmp -s %D/vpopmail/etc/tcp.smtp %D/vpopmail/etc/tcp.smtp-dist; then rm -f %D/vpopmail/etc/tcp.smtp; fi
+vpopmail/etc/tcp.smtp-dist
+@exec if [ ! -f %D/vpopmail/etc/tcp.smtp ] ; then cp -p %D/%F %B/tcp.smtp; fi
 @unexec if cmp -s %D/vpopmail/etc/vlimits.default %D/vpopmail/etc/vlimits.default-dist; then rm -f %D/vpopmail/etc/vlimits.default; fi
 vpopmail/etc/vlimits.default-dist
 @unexec if [ -f %D/vpopmail/etc/vpopmail.mysql ]; then rm -f %D/vpopmail/etc/vpopmail.mysql; fi
diff -ruN --exclude=CVS ../ports.orig/mail/vqadmin/Makefile ./mail/vqadmin/Makefile
--- ../ports.orig/mail/vqadmin/Makefile	Thu May 19 13:28:42 2005
+++ ./mail/vqadmin/Makefile	Mon Jul 25 07:27:19 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	vqadmin
 PORTVERSION=	2.3.6
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	vqadmin
@@ -24,11 +25,12 @@
 
 CGIBINDIR?=	www/cgi-bin-dist
 WEBDATADIR?=	www/data-dist
-QMAIL_DIR?=	/var/qmail
 
 CONFIGURE_ARGS=	--enable-cgibindir=${PREFIX}/${CGIBINDIR} \
 		--enable-htmldir=${PREFIX}/${WEBDATADIR} \
-		--enable-qmaildir=${QMAIL_DIR}
+		--enable-qmaildir=${QMAIL_PREFIX}
+
+.include "${.CURDIR}/../qmail/Makefile.include"
 
 .include <bsd.port.pre.mk>
 
diff -ruN --exclude=CVS ../ports.orig/mail/zabit/Makefile ./mail/zabit/Makefile
--- ../ports.orig/mail/zabit/Makefile	Fri May 20 17:23:47 2005
+++ ./mail/zabit/Makefile	Mon Jul 25 07:27:41 2005
@@ -7,24 +7,22 @@
 
 PORTNAME=	zabit
 PORTVERSION=	0.7.1
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://www.enderunix.org/zabit/
 
 MAINTAINER=	ozkan@enderunix.org
 COMMENT=	Zabit is a content/attachment filter for qmail
 
-RUN_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail
+DEPEND_QMAIL_RUN=	yes
 
 HAS_CONFIGURE=	yes
 
+.include "${.CURDIR}/../qmail/Makefile.include"
+
 .include <bsd.port.pre.mk>
 
-.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
-QMAIL_DIR?=     ${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=     /var/qmail
-.endif
-QMAIL_QUEUE=    ${QMAIL_DIR}/bin/qmail-queue
+QMAIL_QUEUE=    ${QMAIL_PREFIX}/bin/qmail-queue
 
 pre-build:
 .if !defined(BATCH)
diff -ruN --exclude=CVS ../ports.orig/security/amavis-perl/Makefile ./security/amavis-perl/Makefile
--- ../ports.orig/security/amavis-perl/Makefile	Mon May 24 21:04:30 2004
+++ ./security/amavis-perl/Makefile	Mon Jul 25 07:35:47 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	amavis-perl
 PORTVERSION=	11
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=	amavis
@@ -57,13 +58,8 @@
 MTA?=	qmail
 DIROWNER?=	qmailq:qmail
 CONFIGURE_ARGS+=	--enable-qmail
-.if exists(${LOCALBASE}/qmail/bin/qmail-send)
-QMAIL_DIR?=	${LOCALBASE}/qmail
-.else
-QMAIL_DIR?=	/var/qmail
-.endif
-BUILD_DEPENDS+=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
-RUN_DEPENDS=	${BUILD_DEPENDS}
+DEPEND_QMAIL=	yes
+.include "${.CURDIR}/../../mail/qmail/Makefile.include"
 .endif
 
 .if defined(MTA)
diff -ruN --exclude=CVS ../ports.orig/sysutils/dtc/Makefile ./sysutils/dtc/Makefile
--- ../ports.orig/sysutils/dtc/Makefile	Tue Feb  8 11:47:14 2005
+++ ./sysutils/dtc/Makefile	Mon Jul 25 07:36:43 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	dtc
 PORTVERSION=	0.12.0.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	ftp://ftp.gplhost.com/pub/dtc/bsd/
 
@@ -15,13 +15,11 @@
 COMMENT=	A hosting web GUI for admin and accounting apache/named/proftpd/qmail
 
 RUN_DEPENDS=	${LOCALBASE}/share/pear/Crypt/CBC.php:${PORTSDIR}/security/pear-Crypt_CBC \
-		${LOCALBASE}/libexec/proftpd:${PORTSDIR}/ftp/proftpd-mysql \
-		${LOCALBASE}/libexec/apache2/mod_log_sql.so:${PORTSDIR}/www/mod_log_sql2 \
+		${LOCALBASE}/sbin/proftpd:${PORTSDIR}/ftp/proftpd-mysql \
+		${LOCALBASE}/libexec/apache/mod_log_sql.so:${PORTSDIR}/www/mod_log_sql2 \
 		${LOCALBASE}/bin/webalizer:${PORTSDIR}/www/webalizer \
-		${QMAIL_DIR}/bin/qmail-start:${PORTSDIR}/mail/qmail
 
 USE_PHP=	session mysql sockets gd
-QMAIL_DIR?=	/var/qmail
 
 DTCROOT?=	www/dtc
 DTCDIR=		${PREFIX}/${DTCROOT}
@@ -34,14 +32,17 @@
 NO_BUILD=	yes
 USE_MYSQL=	yes
 
+DEPEND_QMAIL_RUN=	yes
+.include "${.CURDIR}/../../mail/qmail/Makefile.include"
+
 do-configure:
 	@${SED} -e 's,%%PREFIX%%,${PREFIX},;\
 		s,%%LOCALBASE%%,${LOCALBASE},;\
-		s,%%QMAIL_DIR%%,${QMAIL_DIR},' \
+		s,%%QMAIL_PREFIX%%,${QMAIL_PREFIX},' \
 		${FILESDIR}/dtc-install.in > ${WRKDIR}/dtc-install
 	@${SED} -e 's,%%PREFIX%%,${PREFIX},;\
 		s,%%LOCALBASE%%,${LOCALBASE},;\
-		s,%%QMAIL_DIR%%,${QMAIL_DIR},' \
+		s,%%QMAIL_PREFIX%%,${QMAIL_PREFIX},' \
 		${FILESDIR}/dtc-deinstall.in > ${WRKDIR}/dtc-deinstall
 
 do-install:
diff -ruN --exclude=CVS ../ports.orig/sysutils/dtc/files/dtc-deinstall.in ./sysutils/dtc/files/dtc-deinstall.in
--- ../ports.orig/sysutils/dtc/files/dtc-deinstall.in	Mon May 24 21:54:02 2004
+++ ./sysutils/dtc/files/dtc-deinstall.in	Mon Jul 25 07:36:39 2005
@@ -8,13 +8,13 @@
 
 PREFIX=%%PREFIX%%
 LOCALBASE=%%LOCALBASE%%
-QMAIL_DIR=%%QMAIL_DIR%%
+QMAIL_PREFIX=%%QMAIL_PREFIX%%
 
 echo "### DEAMON PATH CONFIGURATION ###"
 PATH_HTTPD_CONF="${LOCALBASE}/etc/apache/httpd.conf"
 PATH_NAMED_CONF="/etc/namedb/named.conf"
 PATH_PROFTPD_CONF="${LOCALBASE}/etc/proftpd.conf"
-PATH_QMAIL_CTRL="${QMAIL_DIR}/control"
+PATH_QMAIL_CTRL="${QMAIL_PREFIX}/control"
 
 # Multi OS (Unix system) uninstall sh script for DTC
 # Written by Thomas GOIRAND <thomas@goirand.fr>
diff -ruN --exclude=CVS ../ports.orig/sysutils/dtc/files/dtc-install.in ./sysutils/dtc/files/dtc-install.in
--- ../ports.orig/sysutils/dtc/files/dtc-install.in	Mon May 24 21:54:02 2004
+++ ./sysutils/dtc/files/dtc-install.in	Mon Jul 25 07:36:41 2005
@@ -7,7 +7,7 @@
 
 PREFIX=%%PREFIX%%
 LOCALBASE=%%LOCALBASE%%
-QMAIL_DIR=%%QMAIL_DIR%%
+QMAIL_PREFIX=%%QMAIL_PREFIX%%
 
 UNIX_TYPE=freebsd
 
@@ -128,7 +128,7 @@
 	cp ${LOCALBASE}/etc/proftpd.conf.default ${LOCALBASE}/etc/proftpd.conf
 fi
 PATH_PROFTPD_CONF="${LOCALBASE}/etc/proftpd.conf"
-PATH_QMAIL_CTRL="${QMAIL_DIR}/control"
+PATH_QMAIL_CTRL="${QMAIL_PREFIX}/control"
 PATH_PHP_CGI="${LOCALBASE}/bin/php"
 PATH_DTC_SHARED="${PREFIX}/www/dtc"
 
--- qmail_big_patch.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: garga 
Responsible-Changed-When: Mon Jul 25 12:20:32 GMT 2005 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84053 
State-Changed-From-To: open->feedback 
State-Changed-By: garga 
State-Changed-When: Mon Jul 25 12:31:05 GMT 2005 
State-Changed-Why:  
Request maintainers approval 

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

From: Renato Botelho <garga@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: ale@FreeBSD.org, drs@rucus.ru.ac.za, ehaupt@critical.ch,
        freebsd@simplerezo.com, oliver@FreeBSD.org, ozkan@enderunix.org,
        patrick@rinke-bochum.de, petef@FreeBSD.org, roam@FreeBSD.org,
        sergei@FreeBSD.org, svenasse@polaris.ca, thomas@goirand.fr,
        tmseck@netcologne.de, toxa@toxahost.ru
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Mon, 25 Jul 2005 09:23:30 -0300

 I'm the qmail's maintainer and made a patch to prevent stale
 dependencies. This port affects one or more ports that you maintain.
 
 You can take a look on changes here:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/84053
 
 Do you approve the changes?
 
 Best Regards
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://people.freebsd.org/~garga/pubkey.asc
 
 "To vacillate or not to vacillate, that is the question ... or is it?"

From: Sergei Kolobov <sergei@FreeBSD.org>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org, ale@FreeBSD.org, drs@rucus.ru.ac.za,
  ehaupt@critical.ch, freebsd@simplerezo.com, oliver@FreeBSD.org,
  ozkan@enderunix.org, patrick@rinke-bochum.de, petef@FreeBSD.org,
  roam@FreeBSD.org, svenasse@polaris.ca, thomas@goirand.fr,
  tmseck@netcologne.de, toxa@toxahost.ru
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Mon, 25 Jul 2005 18:23:32 +0400

 Renato,
 
 On 2005-07-25 at 09:23 -0300, Renato Botelho wrote:
 > I'm the qmail's maintainer and made a patch to prevent stale
 > dependencies. This port affects one or more ports that you maintain.
 
 I do not object to your idea in principle, but perhaps it is time to
 introduce USE_QMAIL[_RUN]=yes knob int bsd.port.mk infrastructure 
 instead of explicitly including Makefile from qmail's port directory?
 
 Sergei

From: Renato Botelho <garga@FreeBSD.org>
To: bug-followup@FreeBSD.org, ale@FreeBSD.org, drs@rucus.ru.ac.za,
        ehaupt@critical.ch, freebsd@simplerezo.com, oliver@FreeBSD.org,
        ozkan@enderunix.org, patrick@rinke-bochum.de, petef@FreeBSD.org,
        roam@FreeBSD.org, svenasse@polaris.ca, thomas@goirand.fr,
        tmseck@netcologne.de, toxa@toxahost.ru
Cc:  
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Mon, 25 Jul 2005 11:51:06 -0300

 On Mon, Jul 25, 2005 at 06:23:32PM +0400, Sergei Kolobov wrote:
 > Renato,
 > 
 > On 2005-07-25 at 09:23 -0300, Renato Botelho wrote:
 > > I'm the qmail's maintainer and made a patch to prevent stale
 > > dependencies. This port affects one or more ports that you maintain.
 > 
 > I do not object to your idea in principle, but perhaps it is time to
 > introduce USE_QMAIL[_RUN]=yes knob int bsd.port.mk infrastructure 
 > instead of explicitly including Makefile from qmail's port directory?
 
 I've discussed about it before start my work, and a lot of other
 commiters told me that was the best way to do.
 
 IMO, adding it on bsd.port.mk is more clean. I can do this work and
 propose it to portmgr. Bu, I'll still asking approvals here, because if
 it's approved by portmgr, the change on ports will be almost the same.
 
 Thanks
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://people.freebsd.org/~garga/pubkey.asc
 
 Fuch's Warning:
 	If you actually look like your passport photo, you aren't well
 enough to travel.

From: Alex Dupre <ale@FreeBSD.org>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org,  drs@rucus.ru.ac.za,  ehaupt@critical.ch, 
 freebsd@simplerezo.com,  oliver@FreeBSD.org,  ozkan@enderunix.org, 
 patrick@rinke-bochum.de,  petef@FreeBSD.org,  roam@FreeBSD.org, 
 svenasse@polaris.ca,  thomas@goirand.fr,  tmseck@netcologne.de, 
 toxa@toxahost.ru
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Tue, 26 Jul 2005 07:45:22 +0200

 Renato Botelho wrote:
 > I've discussed about it before start my work, and a lot of other
 > commiters told me that was the best way to do.
 
 Yup, I agree with them.
 
 > IMO, adding it on bsd.port.mk is more clean. I can do this work and
 > propose it to portmgr. Bu, I'll still asking approvals here, because if
 > it's approved by portmgr, the change on ports will be almost the same.
 
 Approved.
 
 -- 
 Alex Dupre

From: Thomas-Martin Seck <tmseck@netcologne.de>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Tue, 26 Jul 2005 18:38:41 +0200

 * Renato Botelho (garga@FreeBSD.org):
 
 > Do you approve the changes?
 
 changes to mail/usendmail: approved
Responsible-Changed-From-To: garga->portmgr 
Responsible-Changed-By: garga 
Responsible-Changed-When: Wed Aug 17 16:30:51 GMT 2005 
Responsible-Changed-Why:  
portmgr territory. 

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

From: Renato Botelho <garga@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: portmgr <portmgr@FreeBSD.org>
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Wed, 17 Aug 2005 13:30:31 -0300

 Following krion's suggestion, here is a new patch that creates a
 Mk/bsd.mail.mk that would be used to other MTA's and MUA's.
 
 Dear portmgr team, do you approve it?
 
 --- qmail_big_patch begins here ---
 diff -ruN --exclude=CVS ../ports.orig/Mk/bsd.mail.mk ./Mk/bsd.mail.mk
 --- ../ports.orig/Mk/bsd.mail.mk	Wed Dec 31 21:00:00 1969
 +++ ./Mk/bsd.mail.mk	Wed Aug 17 13:01:41 2005
 @@ -0,0 +1,69 @@
 +#-*- mode: Fundamental; tab-width: 4; -*-
 +# ex:ts=4
 +#
 +# $FreeBSD$
 +#
 +# Please view me with 4 column tabs!
 +
 +.if !defined(_POSTMKINCLUDED) && !defined(Mail_Pre_Include)
 +
 +# Please make sure all changes to this file are passed through the maintainer.
 +# Do not commit them yourself (unless of course you're the Port's Wraith ;).
 +Mail_Include_MAINTAINER=	garga@FreeBSD.org
 +Mail_Pre_Include=			bsd.mail.mk
 +
 +
 +## Begin QMAIL Stuff
 +
 +# Ports can use the following vars:
 +#
 +# QMAIL_PREFIX		- Define it if qmail is installed in a different PREFIX.
 +#			  Default: /var/qmail
 +#
 +# QMAIL_SLAVEPORT	- Define it if you install a slaveport of qmail, to
 +#			  prevent stale dependencies. Valid slaveports are:
 +#			  ldap, mysql, smtp_auth+tls, spamcontrol and tls.
 +#
 +# USE_QMAIL_BUILD	- Add qmail or qmail slaveport to BUILD_DEPENDS.
 +#
 +# USE_QMAIL_RUN		- Add qmail or qmail slaveport to RUN_DEPENDS.
 +#
 +# USE_QMAIL		- Add qmail or qmail slaveport to RUN and BUILD_DEPENDS.
 +
 +QMAIL_PREFIX?=	/var/qmail
 +
 +_QMAIL_VALID_SLAVEPORTS=	ldap mysql smtp_auth+tls spamcontrol tls
 +
 +.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN) || defined (USE_QMAIL_BUILD)
 +
 +.if defined(QMAIL_SLAVEPORT)
 +.	for slave in ${_QMAIL_VALID_SLAVEPORTS}
 +.		if ${QMAIL_SLAVEPORT:L} == ${slave}
 +_QMAIL_SLAVEPORT_OKAY=	true
 +.		endif
 +.	endfor
 +
 +.	if !defined(_QMAIL_SLAVEPORT_OKAY)
 +IGNORE=	"Invalid QMAIL_SLAVEPORT value. Only one can be set, valid values are: ${_QMAIL_VALID_SLAVEPORTS}"
 +.	endif
 +.endif
 +
 +.if defined(QMAIL_SLAVEPORT)
 +QMAIL_DEPENDS=	${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail-${QMAIL_SLAVEPORT:L}
 +.else
 +QMAIL_DEPENDS=	${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +.endif
 +
 +.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN)
 +RUN_DEPENDS+=	${QMAIL_DEPENDS}
 +.endif
 +
 +.if defined(USE_QMAIL) || defined(USE_QMAIL_BUILD)
 +BUILD_DEPENDS+=	${QMAIL_DEPENDS}
 +.endif
 +
 +.endif
 +
 +## End QMAIL Stuff
 +
 +.endif
 diff -ruN --exclude=CVS ../ports.orig/Mk/bsd.port.mk ./Mk/bsd.port.mk
 --- ../ports.orig/Mk/bsd.port.mk	Wed Aug 17 13:05:18 2005
 +++ ./Mk/bsd.port.mk	Wed Aug 17 13:01:55 2005
 @@ -1355,6 +1355,10 @@
  .include "${PORTSDIR}/Mk/bsd.sdl.mk"
  .endif
  
 +.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN) || defined(USE_QMAIL_BUILD)
 +.include "${PORTSDIR}/Mk/bsd.mail.mk"
 +.endif
 +
  .if ${OSVERSION} >= 502123
  X_WINDOW_SYSTEM ?= xorg
  .elif (${OSVERSION} >= 450005 && !defined(XFREE86_VERSION)) || \
 diff -ruN --exclude=CVS ../ports.orig/UPDATING ./UPDATING
 --- ../ports.orig/UPDATING	Mon Aug 15 12:13:58 2005
 +++ ./UPDATING	Wed Aug 17 13:11:55 2005
 @@ -61,6 +61,27 @@
  
    Update inetd.conf/xinetd.conf to reflect new location of "fb_inet_server".
  
 +20050714:
 +  AFFECTS: users of mail/qmail, mail/qmail-ldap, mail/qmail-mysql,
 +           mail/qmail-smtp_auth+tls, mail/qmail-spamcontrol,
 +           mail/qmail-tls and all ports that depend of it.
 +  AUTHOR: garga@FreeBSD.org
 +
 +  If you use qmail installe don a PREFIX different of /var/qmail,
 +  please, set a var on /etc/make.conf named QMAIL_PREFIX with this
 +  value. It'll be used for many ports that depends of qmail.
 +
 +  To prevent stale dependencies, when you use one of qmail slave ports,
 +  now you just need to set a var named QMAIL_SLAVEPORT on /etc/make.conf
 +  assigning to it the name of slaveport you are using.
 +
 +  The valid options for now are:
 +  * ldap
 +  * mysql
 +  * smtp_auth+tls
 +  * spamcontrol
 +  * tls
 +
  20050722:
    AFFECTS: All RELENG_6 and HEAD users of ports/packages, maintainers
  	   of ports that interact with the compat libraries.
 diff -ruN --exclude=CVS ../ports.orig/mail/ezmlm/Makefile ./mail/ezmlm/Makefile
 --- ../ports.orig/mail/ezmlm/Makefile	Fri Oct 24 12:56:39 2003
 +++ ./mail/ezmlm/Makefile	Wed Aug 17 13:02:06 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	ezmlm
  PORTVERSION=	0.53
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	http://cr.yp.to/software/ \
  		ftp://ftp.fu-berlin.de/unix/mail/qmail/ \
 @@ -19,15 +20,12 @@
  MAINTAINER=	sergei@FreeBSD.org
  COMMENT=	An easy-to-use, high-speed mailing list manager for qmail
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  CONFLICTS=	ezmlm-idx-*
  
  NO_PACKAGE=	Unsure of DJB license
  
 -# QMAIL_DIR is the directory where qmail is installed
 -QMAIL_DIR?=	/var/qmail
 -
  ALL_TARGET=	it
  
  PROGRAMS=	ezmlm-make ezmlm-manage ezmlm-send ezmlm-reject ezmlm-return \
 @@ -43,7 +41,7 @@
  	@${ECHO_CMD} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
  	@${ECHO_CMD} ${CC} -s > ${WRKSRC}/conf-ld
  	@${ECHO_CMD} ${PREFIX}/man > ${WRKSRC}/conf-man
 -	@${ECHO_CMD} ${QMAIL_DIR} > ${WRKSRC}/conf-qmail
 +	@${ECHO_CMD} ${QMAIL_PREFIX} > ${WRKSRC}/conf-qmail
  
  do-install:
  	cd ${WRKSRC} && \
 diff -ruN --exclude=CVS ../ports.orig/mail/ezmlm-idx/Makefile ./mail/ezmlm-idx/Makefile
 --- ../ports.orig/mail/ezmlm-idx/Makefile	Sun Jan 30 22:35:49 2005
 +++ ./mail/ezmlm-idx/Makefile	Wed Aug 17 13:02:10 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	ezmlm-idx
  PORTVERSION=	0.40
 -PORTREVISION=	3
 +PORTREVISION=	4
  CATEGORIES=	mail
  MASTER_SITES=	ftp://ftp.ezmlm.org/pub/patches/ \
  		ftp://gd.tuwien.ac.at/infosys/mail/qmail/ezmlm-patches/ \
 @@ -22,13 +22,10 @@
  MAINTAINER=	sergei@FreeBSD.org
  COMMENT=	Improved version of the ezmlm mailing list manager
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  CONFLICTS=	ezmlm-0.*
  
 -# QMAIL_DIR is the directory where qmail is installed
 -QMAIL_DIR?=	/var/qmail
 -
  # LANGUAGE is the ISO code for the language to use in ezmlmrc
  LANGUAGE?=	en_US
  
 @@ -91,7 +88,7 @@
  	@${ECHO_CMD} ${EXTRACT_LIB} > ${WRKSRC}/sub_pgsql/conf-sqlld
  .endif
  	@${ECHO_CMD} ${PREFIX}/man > ${WRKSRC}/conf-man
 -	@${ECHO_CMD} ${QMAIL_DIR} > ${WRKSRC}/conf-qmail
 +	@${ECHO_CMD} ${QMAIL_PREFIX} > ${WRKSRC}/conf-qmail
  	@${REINPLACE_CMD} -e 's,/etc/ezmlm/,${PREFIX}/etc/ezmlm/,' \
  		${WRKSRC}/idx.h
  
 diff -ruN --exclude=CVS ../ports.orig/mail/mailfront/Makefile ./mail/mailfront/Makefile
 --- ../ports.orig/mail/mailfront/Makefile	Thu Nov 18 15:33:42 2004
 +++ ./mail/mailfront/Makefile	Wed Aug 17 13:02:12 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	mailfront
  PORTVERSION=	0.92
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	http://untroubled.org/${PORTNAME}/
  
 @@ -16,19 +17,20 @@
  BUILD_DEPENDS=	${LOCALBASE}/lib/libbg.a:${PORTSDIR}/devel/bglibs \
  		${LOCALBASE}/lib/libcvm-client.a:${PORTSDIR}/security/cvm
  
 -QMAIL_ROOT?=	/var/qmail
  CFLAGS+=	-I${LOCALBASE}/include
  LDFLAGS?=	-s
  
  DOCS=		NEWS README TODO *.html
  
 +.include "${.CURDIR}/../../Mk/bsd.mail.mk"
 +
  do-configure:
  	${ECHO_CMD} "${PREFIX}/bin"	> ${WRKSRC}/conf-bin
  	${ECHO_CMD} "${CC} ${CFLAGS}"	> ${WRKSRC}/conf-cc
  	${ECHO_CMD} "${CC} ${LDFLAGS}"	> ${WRKSRC}/conf-ld
  	${ECHO_CMD} "${LOCALBASE}/include/bglibs" > ${WRKSRC}/conf-bgincs
  	${ECHO_CMD} "${LOCALBASE}/lib"	> ${WRKSRC}/conf-bglibs
 -	${ECHO_CMD} "${QMAIL_ROOT}"	> ${WRKSRC}/conf-qmail
 +	${ECHO_CMD} "${QMAIL_PREFIX}"	> ${WRKSRC}/conf-qmail
  
  do-install:
  	cd ${WRKSRC} && ./installer
 diff -ruN --exclude=CVS ../ports.orig/mail/mess822/Makefile ./mail/mess822/Makefile
 --- ../ports.orig/mail/mess822/Makefile	Sat Apr 17 19:08:11 2004
 +++ ./mail/mess822/Makefile	Wed Aug 17 13:02:15 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	mess822
  PORTVERSION=	0.58
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	http://cr.yp.to/software/ \
  		ftp://ftp.jp.qmail.org/qmail/ \
 @@ -16,7 +17,7 @@
  MAINTAINER=	drs@rucus.ru.ac.za
  COMMENT=	RFC 822 mail message parsing library and rewriting utilities
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  NO_PACKAGE=	Violates djb\'s license
  USE_REINPLACE=	yes
 @@ -31,17 +32,11 @@
  MAN5=		rewriting.5
  MAN8=		ofmipd.8 ofmipname.8
  
 -.if exists(${PREFIX}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${PREFIX}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 -
  NO_MTREE=	yes
  
  post-patch:
  	@${REINPLACE_CMD} -e "s|-O2|${CFLAGS}|" ${WRKSRC}/conf-cc
 -	@${REINPLACE_CMD} -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKSRC}/conf-qmail
 +	@${REINPLACE_CMD} -e "s|.var.qmail|${QMAIL_PREFIX}|" ${WRKSRC}/conf-qmail
  	@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-home
  
  .include <bsd.port.mk>
 diff -ruN --exclude=CVS ../ports.orig/mail/qmHandle/Makefile ./mail/qmHandle/Makefile
 --- ../ports.orig/mail/qmHandle/Makefile	Wed Jan 14 02:35:54 2004
 +++ ./mail/qmHandle/Makefile	Wed Aug 17 13:02:19 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmHandle
  PORTVERSION=	1.2.0
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	qmhandle
 @@ -16,17 +16,11 @@
  MAINTAINER=	petef@FreeBSD.org
  COMMENT=	Tool to view and manage a qmail queue
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-qstat:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  NO_WRKSUBDIR=	yes
  NO_BUILD=	yes
  USE_PERL5=	yes
 -
 -.if exists(${LOCALBASE}/qmail/bin/qmail-qstat)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
  
  .include <bsd.port.pre.mk>
  
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail/Makefile ./mail/qmail/Makefile
 --- ../ports.orig/mail/qmail/Makefile	Thu Jul 14 11:50:07 2005
 +++ ./mail/qmail/Makefile	Wed Aug 17 13:02:28 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail
  PORTVERSION?=	${QMAIL_VERSION}
 -PORTREVISION?=	4
 +PORTREVISION?=	5
  CATEGORIES=	mail
  MASTER_SITES+=	${MASTER_SITE_QMAIL}
  DISTNAME=	${PORTNAME}-${QMAIL_VERSION}
 @@ -99,10 +99,9 @@
  NO_PACKAGE=	djb's packaging license does not allow non-standard \
  		qmail binary distributions
  
 -# A normal qmail installation puts everything into /var/qmail/.
 -# If you want to install to /usr/local/, then "/usr/local/qmail" is
 -# suggested instead of "/usr/local", but both will work.
 -PREFIX?=		/var/qmail
 +.include "${.CURDIR}/../../Mk/bsd.mail.mk"
 +
 +PREFIX?=		${QMAIL_PREFIX}
  QMAIL_VERSION?=		1.03
  
  .if !defined(BARRIER_QMAILQUEUE_PATCH)
 @@ -193,6 +192,10 @@
  	qmail-tcpto.8 qmail-pop3d.8 qmail-popup.8 qmail-qmqpc.8 qmail-qmqpd.8 \
  	qmail-qmtpd.8 qmail-smtpd.8 qmail-command.8
  
 +.if defined(SLAVE_MYSQL)
 +PKGMESSAGE_SUFFIX=	mysql
 +.endif
 +
  .if defined(SLAVE_SPAMCONTROL)
  EXTRA_MAN8=	qmail-badloadertypes.8 qmail-badmimetypes.8 qmail-recipients.8
  ALL_TARGET+=	${EXTRA_MAN8}
 @@ -206,14 +209,14 @@
  .endif
  
  .if defined(SLAVE_LDAP)
 -PKGMESSAGE_SUFFIX=	-ldap
 +PKGMESSAGE_SUFFIX=	ldap
  PLIST_SUB+=	LDAP="" NOT_LDAP="@comment "
  .else
  PLIST_SUB+=	LDAP="@comment " NOT_LDAP=""
  .endif
  
  .if defined(SLAVE_SMTP_AUTH_TLS)
 -PKGMESSAGE_SUFFIX=	-smtp_auth+tls
 +PKGMESSAGE_SUFFIX=	smtp_auth+tls
  PLIST_SUB+=	SMTP_AUTH_TLS=""
  .else
  PLIST_SUB+=	SMTP_AUTH_TLS="@comment "
 @@ -226,16 +229,27 @@
  .endif
  
  .if defined(SLAVE_TLS)
 -PKGMESSAGE_SUFFIX=	-tls
 +PKGMESSAGE_SUFFIX=	tls
  PLIST_SUB+=	TLS=""
  .else
  PLIST_SUB+=	TLS="@comment "
  .endif
  
 -SUB_FILES+=	pkg-message${PKGMESSAGE_SUFFIX} mailer.conf.sample \
 -		bootfiles.sed enable-qmail
 +.if defined(PKGMESSAGE_SUFFIX)
 +SLAVEPORT_LINE=	${PKGMESSAGE_SUFFIX}
 +.elif defined(SLAVE_SPAMCONTROL)
 +SLAVEPORT_LINE=	spamcontrol
 +.endif
 +
 +SUB_FILES+=	mailer.conf.sample bootfiles.sed enable-qmail
  PKGINSTALL?=	${WRKDIR}/pkg-install
 -PKGMESSAGE?=	${WRKDIR}/pkg-message${PKGMESSAGE_SUFFIX}
 +
 +.if defined(PKGMESSAGE_SUFFIX)
 +SUB_FILES+=	pkg-message-${PKGMESSAGE_SUFFIX}
 +PKGMESSAGE?=	${WRKDIR}/pkg-message-${PKGMESSAGE_SUFFIX}
 +.else
 +SUB_FILES+=	pkg-message
 +.endif
  
  CSH?=	/bin/csh
  
 @@ -313,10 +327,8 @@
  .endif
  
  .if defined(SLAVE_LDAP)
 -PKGNAMESUFFIX:=	${PKGNAMESUFFIX}2
  
  .if !defined(WITHOUT_TLS)
 -PKGNAMESUFFIX:=	${PKGNAMESUFFIX}-with_tls
  # we can't use USE_OPENSSL=yes after including bsd.port.pre.mk
  .include "${PORTSDIR}/Mk/bsd.openssl.mk"
  .endif
 @@ -472,6 +484,18 @@
  	@${ECHO_MSG} ""
  .endif
  
 +.if !defined(QMAIL_PREFIX)
 +	@${ECHO_MSG} "QMAIL_PREFIX=PREFIX_PATH"
 +	@${ECHO_MSG} "		(default PREFIX_PATH=${PREFIX})"
 +	@${ECHO_MSG} "		A normal qmail installation puts"
 +	@${ECHO_MSG} "		everything into /var/qmail/."
 +	@${ECHO_MSG} "		If you want to install to ${LOCALBASE},"
 +	@${ECHO_MSG} "		then \"${LOCALBASE}/qmail\" is suggested"
 +	@${ECHO_MSG} "		instead of \"${LOCALBASE}\", but both will"
 +	@${ECHO_MSG} "		work."
 + 	@${ECHO_MSG} ""
 +.endif
 + 
  post-extract:
  .if defined(SLAVE_SPAMCONTROL)
  	@cd ${WRKSRC} && ${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${SPAMCONTROL_DIST}
 @@ -595,6 +619,17 @@
  	@${ECHO_CMD}
  	@${CAT} ${PKGMESSAGE}
  	@${ECHO_CMD}
 +.if defined(SLAVEPORT_LINE)
 +	@${ECHO_CMD} "============================================="
 +	@${ECHO_CMD}
 +	@${ECHO_CMD} "ATTENTION"
 +	@${ECHO_CMD}
 +	@${ECHO_CMD} "Add the following line to your /etc/make.conf"
 +	@${ECHO_CMD} "QMAIL_SLAVEPORT=${SLAVEPORT_LINE}"
 +	@${ECHO_CMD}
 +	@${ECHO_CMD} "============================================="
 +	@${ECHO_CMD}
 +.endif
  
  certificate:
  .if defined(SLAVE_TLS) || defined(SLAVE_SMTP_AUTH_TLS) || defined(SLAVE_LDAP)
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-conf/Makefile ./mail/qmail-conf/Makefile
 --- ../ports.orig/mail/qmail-conf/Makefile	Fri Sep  5 04:33:48 2003
 +++ ./mail/qmail-conf/Makefile	Wed Aug 17 13:02:32 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail-conf
  PORTVERSION=	0.60
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  MASTER_SITES=	http://www.din.or.jp/~ushijima/qmail-conf/ \
  		http://cr.yp.to/djbdns/
 @@ -23,9 +23,7 @@
  
  NO_PACKAGE=	"borrows code from djbdns, thus falls under the same restrictions as dns/djbdns"
  
 -# Note: this MUST be the same as the directory qmail is installed in!
 -QMAIL_DIR?=	/var/qmail
 -PREFIX?=	${QMAIL_DIR}
 +PREFIX?=	${QMAIL_PREFIX}
  
  NO_MTREE=	yes
  
 @@ -33,11 +31,15 @@
  DJBDNS_NAME=	djbdns-${DJBDNS_VER}
  DJBDNS_DIST=	${DJBDNS_NAME}${EXTRACT_SUFX}
  
 +.include <bsd.port.pre.mk>
 +
 +.include "${.CURDIR}/../../Mk/bsd.mail.mk"
 +
  post-extract:
  		@(cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DJBDNS_DIST} ${EXTRACT_AFTER_ARGS})
  
  post-patch:
 -		@${ECHO_CMD} "${QMAIL_DIR}" > ${WRKSRC}/conf-qmail
 +		@${ECHO_CMD} "${QMAIL_PREFIX}" > ${WRKSRC}/conf-qmail
  		@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
  		@${ECHO_CMD} "${CC} ${CFLAGS} ${STRIP}" > ${WRKSRC}/conf-ld
  		@${ECHO_CMD} "${LOCALBASE}" > ${WRKSRC}/conf-ucspi-tcp
 @@ -45,4 +47,4 @@
  pre-build:
  		@(cd ${WRKSRC} && ${MAKE} djbdns=${DJBDNS_NAME} -f Makefile.ini)
  
 -.include <bsd.port.mk>
 +.include <bsd.port.post.mk>
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-contrib/Makefile ./mail/qmail-contrib/Makefile
 --- ../ports.orig/mail/qmail-contrib/Makefile	Thu Mar 25 15:33:22 2004
 +++ ./mail/qmail-contrib/Makefile	Wed Aug 17 13:02:35 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	qmail-contrib
  PORTVERSION=	0.1
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	ftp://ftp.qmail.org/pub/software/ \
  		ftp://rucus.ru.ac.za/pub/mail/qmail/src/
 @@ -16,7 +17,7 @@
  MAINTAINER=	ports@FreeBSD.org
  COMMENT=	Contributed programs for qmail
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  NO_PACKAGE=	Unsure of djb\'s license
  
 @@ -28,13 +29,7 @@
  
  PLIST_SUB=	DOCDIR=${DOCDIR}
  
 -.if exists(${PREFIX}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${PREFIX}/qmail
 -PREFIX?=	${PREFIX}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -PREFIX?=	/var/qmail
 -.endif
 +PREFIX?=	${QMAIL_PREFIX}
  
  .if (${PREFIX} == "/usr/local")
  DOCDIR=		share/doc/qmail
 @@ -60,10 +55,10 @@
  
  post-patch:
  	@perl -pi.bak -e "s|-O2|${CFLAGS}|" ${WRKFF}/conf-cc
 -	@perl -pi.bak -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKFF}/conf-qmail
 +	@perl -pi.bak -e "s|.var.qmail|${QMAIL_PREFIX}|" ${WRKFF}/conf-qmail
  	@perl -pi.bak -e '$$_ = "" if /cat/' ${WRKFF}/hier.c
  	@perl -pi.bak -e "s|-O2|${CFLAGS}|" ${WRKDF}/conf-cc
 -	@perl -pi.bak -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKDF}/conf-qmail
 +	@perl -pi.bak -e "s|.var.qmail|${QMAIL_PREFIX}|" ${WRKDF}/conf-qmail
  	@perl -pi.bak -e '$$_ = "" if /cat/' ${WRKDF}/hier.c
  
  do-build:
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-ldap/Makefile ./mail/qmail-ldap/Makefile
 --- ../ports.orig/mail/qmail-ldap/Makefile	Mon Jul 11 13:47:15 2005
 +++ ./mail/qmail-ldap/Makefile	Wed Aug 17 13:02:39 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail
  PORTVERSION=	${QMAIL_VERSION}.${LDAP_PATCH_DATE}
 -PORTREVISION=	2
 +PORTREVISION=	3
  CATEGORIES=	mail
  PKGNAMESUFFIX=	-ldap
  
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-mysql/Makefile ./mail/qmail-mysql/Makefile
 --- ../ports.orig/mail/qmail-mysql/Makefile	Mon Jul 11 13:47:15 2005
 +++ ./mail/qmail-mysql/Makefile	Wed Aug 17 13:02:41 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail
  PORTVERSION=	${QMAIL_VERSION}.${MYSQL_PATCH_VERSION}
 -PORTREVISION=	0
 +PORTREVISION=	1
  CATEGORIES=	mail
  PKGNAMESUFFIX=	-mysql
  
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-rblchk/Makefile ./mail/qmail-rblchk/Makefile
 --- ../ports.orig/mail/qmail-rblchk/Makefile	Fri Jul 15 16:19:02 2005
 +++ ./mail/qmail-rblchk/Makefile	Wed Aug 17 13:21:50 2005
 @@ -7,20 +7,20 @@
  
  PORTNAME=	qmail-rblchk
  PORTVERSION=	2.2
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	http://morettoni.net/qmail/
  
  MAINTAINER=	ehaupt@critical.ch
  COMMENT=	A qmail RBL filter
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  LDFLAGS?=	-s
  CFLAGS?=	-O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized \
  		-Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
  
  WRKSRC=		${WRKDIR}/${PORTNAME}
 -QMAIL_DIR?=	/var/qmail
  
  ALL_TARGET=	default
  INSTALL_TARGET=	setup
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-scanner/Makefile ./mail/qmail-scanner/Makefile
 --- ../ports.orig/mail/qmail-scanner/Makefile	Wed Jun  1 16:23:58 2005
 +++ ./mail/qmail-scanner/Makefile	Wed Aug 17 13:02:47 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail-scanner
  PORTVERSION=	1.25
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail security
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	${PORTNAME}
 @@ -17,14 +17,10 @@
  MAINTAINER=	freebsd@simplerezo.com
  COMMENT=	Content/Anti-virus Scanner for qmail
  
 -BUILD_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail \
 -		reformime:${PORTSDIR}/mail/maildrop \
 +BUILD_DEPENDS=	reformime:${PORTSDIR}/mail/maildrop \
  		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
  
 -# A normal qmail installation puts everything into /var/qmail/.
 -# Must match your qmail installation
 -QMAIL_DIR?=	/var/qmail
 -QMAIL_QUEUE=	${QMAIL_DIR}/bin/qmail-queue
 +QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
  
  USE_PERL5=	yes
  NO_BUILD=	yes
 @@ -79,12 +75,14 @@
  
  RUN_DEPENDS=	${BUILD_DEPENDS}
  
 +USE_QMAIL=	yes
 +
  SPOOLDIR=	${PREFIX}/qmailscan
  PLIST_SUB=	SPOOLDIR="${SPOOLDIR:S,${PREFIX}/,,}"
  
  HAS_CONFIGURE=	yes
  CONFIGURE_ARGS+=	\
 -		--qmaildir "${QMAIL_DIR}" --spooldir "${SPOOLDIR}" \
 +		--qmaildir "${QMAIL_PREFIX}" --spooldir "${SPOOLDIR}" \
  		--bindir "${PREFIX}/bin" --qmail-queue-binary "${QMAIL_QUEUE}" \
  		--admin "${QMAILSCAN_ADMIN}" --notify "${QMAILSCAN_NOTIFY}" \
  		--silent-viruses "${QMAILSCAN_SILENTVIRUSES}" \
 @@ -137,7 +135,7 @@
  	@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL
  	@if ! ${TEST} -f ${QMAIL_QUEUE}; then \
  		${ECHO_MSG} "Unable to found qmail-queue binary trying '${QMAIL_QUEUE}'.";  \
 -		${ECHO_MSG} "Please set QMAIL_DIR to your qmail installation directory !"; \
 +		${ECHO_MSG} "Please set QMAIL_PREFIX to your qmail installation directory !"; \
  		exit 1; \
  	fi
  
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-scanner/pkg-plist ./mail/qmail-scanner/pkg-plist
 --- ../ports.orig/mail/qmail-scanner/pkg-plist	Mon Feb 28 09:02:10 2005
 +++ ./mail/qmail-scanner/pkg-plist	Wed Aug 17 13:02:46 2005
 @@ -2,16 +2,22 @@
  bin/qmail-scanner-queue.pl
  bin/qs2mrtg.pl
  share/examples/qs2mrtg/mrtg-qmail-scanner.cfg
 +@dirrm share/examples/qs2mrtg
 +@unexec if cmp -s %D/%%SPOOLDIR%%/quarantine-attachments.txt %D/%%SPOOLDIR%%/quarantine-attachments.sample; then rm -f %D/%%SPOOLDIR%%/quarantine-attachments.txt && rm -f %D/%%SPOOLDIR%%/quarantine-attachments.db; fi
  %%SPOOLDIR%%/quarantine-attachments.sample
 -@unexec if cmp -s %%SPOOLDIR%%/quarantine-attachments.txt %%SPOOLDIR%%/quarantine-attachments.sample; then rm -f %%SPOOLDIR%%/quarantine-attachments.txt; fi
 -@unexec rmdir share/examples/qs2mrtg 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/archives/cur 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/archives/new 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/archives/tmp 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/archives 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/quarantine/cur 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/quarantine/new 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/quarantine/tmp 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/quarantine 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%%/tmp 2>/dev/null || true
 -@unexec rmdir %%SPOOLDIR%% 2>/dev/null || true
 +@exec [ ! -f %D/%%SPOOLDIR%%/quarantine-attachments.txt ] && cp %D/%%SPOOLDIR%%/quarantine-attachments.sample %D/%%SPOOLDIR%%/quarantine-attachments.txt
 +%%SPOOLDIR%%/qmail-scanner-queue-version.txt
 +@unexec rmdir %D/%%SPOOLDIR%%/archives/cur 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/archives/new 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/archives/tmp 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/archives 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/quarantine/cur 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/quarantine/new 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/quarantine/tmp 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/quarantine 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/working/cur 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/working/new 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/working/tmp 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/working 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%%/tmp 2>/dev/null || true
 +@unexec rmdir %D/%%SPOOLDIR%% 2>/dev/null || true
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-smtp_auth+tls/Makefile ./mail/qmail-smtp_auth+tls/Makefile
 --- ../ports.orig/mail/qmail-smtp_auth+tls/Makefile	Mon Jul 11 13:47:15 2005
 +++ ./mail/qmail-smtp_auth+tls/Makefile	Wed Aug 17 13:02:49 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail
  PORTVERSION=	${QMAIL_VERSION}.${SMTP_AUTH-TLS_PATCH_DATE}
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  PKGNAMESUFFIX=	-smtp_auth+tls
  
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-spamcontrol/Makefile ./mail/qmail-spamcontrol/Makefile
 --- ../ports.orig/mail/qmail-spamcontrol/Makefile	Wed Jul 13 16:28:45 2005
 +++ ./mail/qmail-spamcontrol/Makefile	Wed Aug 17 13:02:52 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail
  PORTVERSION=	${QMAIL_VERSION}.${SPAMCONTROL_VERSION}
 -PORTREVISION=	0
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES+=	http://www.fehcom.de/qmail/spamcontrol/:spamcontrol
  PKGNAMESUFFIX=	-spamcontrol
 diff -ruN --exclude=CVS ../ports.orig/mail/qmail-tls/Makefile ./mail/qmail-tls/Makefile
 --- ../ports.orig/mail/qmail-tls/Makefile	Mon Jul 11 13:47:16 2005
 +++ ./mail/qmail-tls/Makefile	Wed Aug 17 13:02:54 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	qmail
  PORTVERSION=	${QMAIL_VERSION}.${TLS_PATCH_DATE}
 -PORTREVISION=	0
 +PORTREVISION=	1
  CATEGORIES=	mail
  PKGNAMESUFFIX=	-tls
  
 diff -ruN --exclude=CVS ../ports.orig/mail/qmailadmin/Makefile ./mail/qmailadmin/Makefile
 --- ../ports.orig/mail/qmailadmin/Makefile	Tue Jun 14 09:48:33 2005
 +++ ./mail/qmailadmin/Makefile	Wed Aug 17 13:02:56 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	qmailadmin
  PORTVERSION=	1.2.7
 +PORTREVISION=	1
  PORTEPOCH=	1
  CATEGORIES=	mail www
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 @@ -70,22 +71,14 @@
  PLIST_SUB+=	CGIBINDIR="${CGIBINDIR}" CGIBINSUBDIR="${CGIBINSUBDIR}" \
  		WEBDATADIR="${WEBDATADIR}" WEBDATASUBDIR="${WEBDATASUBDIR}"
  
 -.include <bsd.port.pre.mk>
 -
 -#
 -# QMAIL_DIR     - location of qmail directory
 -#
 +.include "${.CURDIR}/../../Mk/bsd.mail.mk"
  
 -.if exists(${LOCALBASE}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 +.include <bsd.port.pre.mk>
  
  # End of user-configurable variables
  
  CONFIGURE_ARGS+=	\
 -	--enable-qmaildir=${QMAIL_DIR} \
 +	--enable-qmaildir=${QMAIL_PREFIX} \
  	--enable-htmldir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR} \
  	--enable-imagedir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR}/images \
  	--enable-imageurl=${WEBDATAURL}/${WEBDATASUBDIR}/images \
 diff -ruN --exclude=CVS ../ports.orig/mail/qmailadmin-devel/Makefile ./mail/qmailadmin-devel/Makefile
 --- ../ports.orig/mail/qmailadmin-devel/Makefile	Mon Mar 14 06:26:52 2005
 +++ ./mail/qmailadmin-devel/Makefile	Wed Aug 17 13:02:59 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	qmailadmin
  PORTVERSION=	1.2.7
 +PORTREVISION=	1
  CATEGORIES=	mail www
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	${PORTNAME}
 @@ -16,11 +17,9 @@
  COMMENT=	CGI program for administering Qmail with vchkpw/vpopmail
  
  BUILD_DEPENDS=	\
 -	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
  	autorespond:${PORTSDIR}/mail/autorespond \
  	${LOCALBASE}/vpopmail/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail-devel
  RUN_DEPENDS=	\
 -	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
  	autorespond:${PORTSDIR}/mail/autorespond \
  	${LOCALBASE}/vpopmail/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail-devel
  
 @@ -71,22 +70,14 @@
  PLIST_SUB+=	CGIBINDIR="${CGIBINDIR}" CGIBINSUBDIR="${CGIBINSUBDIR}" \
  		WEBDATADIR="${WEBDATADIR}" WEBDATASUBDIR="${WEBDATASUBDIR}"
  
 -.include <bsd.port.pre.mk>
 -
 -#
 -# QMAIL_DIR     - location of qmail directory
 -#
 +.include "${.CURDIR}/../../Mk/bsd.mail.mk"
  
 -.if exists(${LOCALBASE}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 +.include <bsd.port.pre.mk>
  
  # End of user-configurable variables
  
  CONFIGURE_ARGS+=	\
 -	--enable-qmaildir=${QMAIL_DIR} \
 +	--enable-qmaildir=${QMAIL_PREFIX} \
  	--enable-htmldir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR} \
  	--enable-imagedir=${PREFIX}/${WEBDATADIR}/${WEBDATASUBDIR}/images \
  	--enable-imageurl=${WEBDATAURL}/${WEBDATASUBDIR}/images \
 diff -ruN --exclude=CVS ../ports.orig/mail/qmailanalog/Makefile ./mail/qmailanalog/Makefile
 --- ../ports.orig/mail/qmailanalog/Makefile	Mon Jul 11 19:35:35 2005
 +++ ./mail/qmailanalog/Makefile	Wed Aug 17 13:03:01 2005
 @@ -7,14 +7,14 @@
  
  PORTNAME=	qmailanalog
  PORTVERSION=	0.70
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  MASTER_SITES=	ftp://cr.yp.to/software/
  
  MAINTAINER=	garga@FreeBSD.org
  COMMENT=	A collection of tools to analyze qmail-send's activity
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  ALL_TARGET=	it
  INSTALL_TARGET=	setup
 @@ -24,19 +24,13 @@
  
  PLIST_SUB+=	MYSUBDIR=${MYSUBDIR}
  
 -.if exists(${PREFIX}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${PREFIX}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 -
  .if !defined(NOSUBDIR)
  MYSUBDIR?=	qmailanalog/
  .else
  MYSUBDIR?=
  .endif
  
 -PREFIX?=	${QMAIL_DIR}
 +PREFIX?=	${QMAIL_PREFIX}
  QMPREFIX?=	${PREFIX}/${MYSUBDIR}
  
  NO_MTREE=	yes
 @@ -44,8 +38,8 @@
  
  .include <bsd.port.pre.mk>
  
 -.if ${PREFIX} != ${QMAIL_DIR}
 -BROKEN=	"Cannot Make and Install with different PREFIX or QMAIL_DIR"
 +.if ${PREFIX} != ${QMAIL_PREFIX}
 +BROKEN=	"Cannot Make and Install with different PREFIX or QMAIL_PREFIX"
  .endif
  
  post-patch:
 diff -ruN --exclude=CVS ../ports.orig/mail/qmailmrtg7/Makefile ./mail/qmailmrtg7/Makefile
 --- ../ports.orig/mail/qmailmrtg7/Makefile	Tue Jun 14 11:51:42 2005
 +++ ./mail/qmailmrtg7/Makefile	Wed Aug 17 13:03:03 2005
 @@ -7,29 +7,23 @@
  
  PORTNAME=	qmailmrtg7
  PORTVERSION=	4.2
 +PORTREVISION=	1
  CATEGORIES=	mail net-mgmt
  MASTER_SITES=	http://www.inter7.com/qmailmrtg7/
  
  MAINTAINER=	ale@FreeBSD.org
  COMMENT=	A program to create mrtg graphs for qmail activity
  
 -BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-queue:${PORTSDIR}/mail/qmail
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-queue:${PORTSDIR}/mail/qmail \
 -		mrtg:${PORTSDIR}/net-mgmt/mrtg
 +RUN_DEPENDS=	mrtg:${PORTSDIR}/net-mgmt/mrtg
 +USE_QMAIL=	yes
  
  USE_REINPLACE=	yes
  
  .include <bsd.port.pre.mk>
  
 -.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 -
  post-patch:
  	@${REINPLACE_CMD} "s|cc|${CC}|g;s|-s -O|${CFLAGS}|g" ${WRKSRC}/Makefile
 -	@${REINPLACE_CMD} "s|/usr/local|${PREFIX}|g;s|/var/qmail|${QMAIL_DIR}|g" \
 +	@${REINPLACE_CMD} "s|/usr/local|${PREFIX}|g;s|/var/qmail|${QMAIL_PREFIX}|g" \
  		${WRKSRC}/checkq.c ${WRKSRC}/qmail.mrtg.cfg
  
  do-install:
 diff -ruN --exclude=CVS ../ports.orig/mail/qscan/Makefile ./mail/qscan/Makefile
 --- ../ports.orig/mail/qscan/Makefile	Thu Apr  8 12:13:39 2004
 +++ ./mail/qscan/Makefile	Wed Aug 17 13:03:07 2005
 @@ -7,28 +7,24 @@
  
  PORTNAME=	qscan
  PORTVERSION=	1.5
 +PORTREVISION=	1
  CATEGORIES=	mail security
  MASTER_SITES=	ftp://ftp.c9x.org/qscan/
  
  MAINTAINER=	ale@FreeBSD.org
  COMMENT=	A mail filter for Qmail that scans messages with ClamAV
  
 -RUN_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail \
 -		clamdscan:${PORTSDIR}/security/clamav \
 +RUN_DEPENDS=	clamdscan:${PORTSDIR}/security/clamav \
  		ripmime:${PORTSDIR}/mail/ripmime
 +USE_QMAIL_RUN=	yes
  
  GNU_CONFIGURE=	yes
  USE_REINPLACE=	yes
  
  .include <bsd.port.pre.mk>
  
 -.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 -QMAIL_QUEUE=	${QMAIL_DIR}/bin/qmail-queue
 -QSCAN_VAR?=	${QMAIL_DIR}/${PORTNAME}
 +QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
 +QSCAN_VAR?=	${QMAIL_PREFIX}/${PORTNAME}
  PLIST_SUB+=	QSCAN_VAR="${QSCAN_VAR}" \
  		QMAIL_QUEUE="${QMAIL_QUEUE}"
  
 diff -ruN --exclude=CVS ../ports.orig/mail/qsheff/Makefile ./mail/qsheff/Makefile
 --- ../ports.orig/mail/qsheff/Makefile	Wed Jul 20 10:39:35 2005
 +++ ./mail/qsheff/Makefile	Wed Aug 17 13:03:10 2005
 @@ -6,16 +6,17 @@
  #
  
  PORTNAME=	qsheff
 -PORTVERSION=	1.0.r1
 +PORTVERSION=	1.0.r3
  CATEGORIES=	mail
  MASTER_SITES=	http://www.enderunix.org/qsheff/
 -DISTNAME=	${PORTNAME}-1.0-r1
 +DISTNAME=	${PORTNAME}-${PORTVERSION:S/.r/-r/}
  
  MAINTAINER=	ozkan@enderunix.org
  COMMENT=	A qmail-queue replacement to filter mail traffic
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-queue:${PORTSDIR}/mail/qmail \
 -		${LOCALBASE}/bin/ripmime:${PORTSDIR}/mail/ripmime
 +BUILD_DEPENDS=	${LOCALBASE}/bin/ripmime:${PORTSDIR}/mail/ripmime
 +RUN_DEPENDS=	${BUILD_DEPENDS}
 +USE_QMAIL_RUN=	yes
  
  USE_REINPLACE=	YES
  GNU_CONFIGURE=	YES
 @@ -24,28 +25,15 @@
  PORTDOCS=	spamass-qsheff.en.html README COPYING AUTHORS ChangeLog \
  		INSTALL UPGRADE THANKS TODO
  
 -SUB_FILES=	pkg-message
 -
  OPTIONS=	CLAMAV "Integrate with Clam AntiVirus" on
  
 -.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 -
 -PREFIX?=	${QMAIL_DIR}
 -
 -CONFIGURE_ARGS+=	--with-qmaildir=${QMAIL_DIR}
 +CONFIGURE_ARGS+=	--with-qmaildir=${QMAIL_PREFIX}
  
  .include <bsd.port.pre.mk>
  
  .if !defined(WITHOUT_CLAMAV)
  RUN_DEPENDS+=	${LOCALBASE}/bin/clamdscan:${PORTSDIR}/security/clamav
  .endif
 -.if !defined(WITHOUT_FPROT) & defined(WITHOUT_CLAMAV)
 -RUN_DEPENDS+=	${LOCALBASE}/bin/f-prot:${PORTSDIR}/security/f-prot
 -.endif
  
  post-patch:
  .if defined(NOPORTDOCS)
 @@ -59,8 +47,5 @@
  	@${REINPLACE_CMD} -e 's|enable_virus_prog = 1|enable_virus_prog = 0|g' \
  		${WRKSRC}/etc/qsheff.conf-default
  .endif
 -
 -post-install:
 -	@${CAT} ${PKGMESSAGE}
  
  .include <bsd.port.post.mk>
 diff -ruN --exclude=CVS ../ports.orig/mail/qsheff/distinfo ./mail/qsheff/distinfo
 --- ../ports.orig/mail/qsheff/distinfo	Wed Jul 20 10:39:35 2005
 +++ ./mail/qsheff/distinfo	Wed Aug 17 13:03:10 2005
 @@ -1,2 +1,2 @@
 -MD5 (qsheff-1.0-r1.tar.gz) = fa9e21cbf2a9014beb05d8a7e55a46d8
 -SIZE (qsheff-1.0-r1.tar.gz) = 105460
 +MD5 (qsheff-1.0-r3.tar.gz) = 8b38b725c4ebf38764d4660d87d67391
 +SIZE (qsheff-1.0-r3.tar.gz) = 106959
 diff -ruN --exclude=CVS ../ports.orig/mail/qsheff/files/patch-Makefile.in ./mail/qsheff/files/patch-Makefile.in
 --- ../ports.orig/mail/qsheff/files/patch-Makefile.in	Wed Jul 20 10:39:35 2005
 +++ ./mail/qsheff/files/patch-Makefile.in	Wed Dec 31 21:00:00 1969
 @@ -1,11 +0,0 @@
 ---- Makefile.in.orig	Wed Jul 20 08:33:16 2005
 -+++ Makefile.in	Wed Jul 20 08:33:21 2005
 -@@ -734,8 +734,6 @@
 - 	mkdir -p /var/tmp/qsheffq
 - 	touch /var/log/qsheff.log
 - 	chmod 755 /var/tmp/qsheffq /var/spool/qsheffq
 --	if [ -x @QMAILDIR@/bin/qmail-queue ]; then cp -pf @QMAILDIR@/bin/qmail-queue @QMAILDIR@/bin/qmail-queue.orig; rm -f @QMAILDIR@/bin/qmail-queue; fi
 --	ln -s @QMAILDIR@/bin/qmail-qsheff @QMAILDIR@/bin/qmail-queue
 - # Tell versions [3.59,3.63) of GNU make to not export all variables.
 - # Otherwise a system limit (for SysV at least) may be exceeded.
 - .NOEXPORT:
 diff -ruN --exclude=CVS ../ports.orig/mail/qsheff/files/pkg-message.in ./mail/qsheff/files/pkg-message.in
 --- ../ports.orig/mail/qsheff/files/pkg-message.in	Wed Jul 20 10:39:35 2005
 +++ ./mail/qsheff/files/pkg-message.in	Wed Dec 31 21:00:00 1969
 @@ -1,9 +0,0 @@
 -
 -ATTENTION:
 -
 -To start to use qmail-qsheff you need to overwrite qmail-queue program.
 -Make a backup before do it.
 -
 -> cp %%PREFIX%%/bin/qmail-queue  %%PREFIX%%/bin/qmail-queue.orig
 -> cp %%PREFIX%%/bin/qmail-qsheff  %%PREFIX%%/bin/qmail-queue
 -
 diff -ruN --exclude=CVS ../ports.orig/mail/qsheff/pkg-plist ./mail/qsheff/pkg-plist
 --- ../ports.orig/mail/qsheff/pkg-plist	Wed Jul 20 10:39:35 2005
 +++ ./mail/qsheff/pkg-plist	Wed Aug 17 13:03:10 2005
 @@ -11,14 +11,15 @@
  @unexec if cmp -s %D/etc/qsheff/qsheff.wblist %D/etc/qsheff/qsheff.wblist-default; then rm -f %D/etc/qsheff/qsheff.wblist; fi
  etc/qsheff/qsheff.wblist-default
  @exec [ -f %B/qsheff.wblist ] || cp %B/%f %B/qsheff.attach
 +etc/qsheff/install-wrapper.sh
 +etc/qsheff/uninstall-wrapper.sh
  %%DATADIR%%/developer.notes
  %%DATADIR%%/eicar.com.txt
  %%DATADIR%%/sample-OK.msg
  %%DATADIR%%/sample-SPAM.msg
  %%DATADIR%%/sample-VIRUS.msg
 -%%DATADIR%%/uninstall.sh
  @unexec rmdir %D/etc/qsheff 2>/dev/null || true
  @dirrm %%DATADIR%%
 -@unexec echo "ATTENTION:"
 -@unexec echo "1) Remember to restore your qmail-queue program on %%PREFIX%%/bin"
 -@unexec echo "2) Quarantina directory (/var/spool/qsheffq) not removed. You can remove it manually."
 +@unexec echo
 +@unexec echo "Type '%%PREFIX%%/etc/qsheff/uninstall-wrapper.sh' to uninstall qSheff completely."
 +@unexec echo
 diff -ruN --exclude=CVS ../ports.orig/mail/qtools/Makefile ./mail/qtools/Makefile
 --- ../ports.orig/mail/qtools/Makefile	Thu Oct 23 03:42:46 2003
 +++ ./mail/qtools/Makefile	Wed Aug 17 13:03:12 2005
 @@ -7,27 +7,32 @@
  
  PORTNAME=	qtools
  PORTVERSION=	0.56
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  MASTER_SITES=	http://www.superscript.com/qtools/
  
  MAINTAINER=	sergei@FreeBSD.org
  COMMENT=	Tools to use in .qmail files
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
 -		${EZMLM_DIR}/bin/ezmlm-weed:${PORTSDIR}/mail/ezmlm
 +RUN_DEPENDS=	${EZMLM_DIR}/bin/ezmlm-weed:${PORTSDIR}/mail/ezmlm
  
  ALL_TARGET=	it
  INSTALL_TARGET=	setup check
  
 -QMAIL_DIR?=	/var/qmail
  EZMLM_DIR?=	${LOCALBASE}
  
 +USE_REINPLACE=	yes
 +
 +.include "${.CURDIR}/../../Mk/bsd.mail.mk"
 +
 +post-patch:
 +	@${REINPLACE_CMD} -e 's|02755|0755|g' ${WRKSRC}/hier.c
 +
  do-configure:
  	@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
  	@${ECHO_CMD} "${CC} ${STRIP}" > ${WRKSRC}/conf-ld
  	@${ECHO_CMD} "${PREFIX}" > ${WRKSRC}/conf-home
 -	@${ECHO_CMD} "${QMAIL_DIR}" > ${WRKSRC}/conf-qmail
 +	@${ECHO_CMD} "${QMAIL_PREFIX}" > ${WRKSRC}/conf-qmail
  	@${ECHO_CMD} "${EZMLM_DIR}/bin/ezmlm" > ${WRKSRC}/conf-ezmlm
  
  .include <bsd.port.mk>
 diff -ruN --exclude=CVS ../ports.orig/mail/queue-fix/Makefile ./mail/queue-fix/Makefile
 --- ../ports.orig/mail/queue-fix/Makefile	Mon Jul 11 19:35:35 2005
 +++ ./mail/queue-fix/Makefile	Wed Aug 17 13:03:14 2005
 @@ -7,16 +7,16 @@
  
  PORTNAME=	queue-fix
  PORTVERSION=	1.4
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	http://www.netmeridian.com/e-huss/
  
  MAINTAINER=	garga@FreeBSD.org
  COMMENT=	Repairs or generates a qmail queue structure
  
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
 -QMAIL_DIR?=	/var/qmail
 -PREFIX?=	${QMAIL_DIR}
 +PREFIX?=	${QMAIL_PREFIX}
  
  OPTIONS=	BIG_TODO "Use big_todo patch" off
  
 @@ -31,13 +31,13 @@
  PLIST_DIRS+=	%%DOCDIR%%
  .endif
  
 +.include <bsd.port.pre.mk>
 +
  .if (${PREFIX} == ${LOCALBASE})
  DOCDIR=	share/doc/qmail/queue-fix
  .else
  DOCDIR=	doc/queue-fix
  .endif
 -
 -.include <bsd.port.pre.mk>
  
  .if defined(WITH_BIG_TODO)
  PATCH_SITES+=		http://www.qmail.org/
 diff -ruN --exclude=CVS ../ports.orig/mail/queue-repair/Makefile ./mail/queue-repair/Makefile
 --- ../ports.orig/mail/queue-repair/Makefile	Mon Dec  8 15:09:23 2003
 +++ ./mail/queue-repair/Makefile	Wed Aug 17 13:03:16 2005
 @@ -7,15 +7,15 @@
  
  PORTNAME=	queue-repair
  PORTVERSION=	0.9.0
 +PORTREVISION=	1
  CATEGORIES=	mail python
 -MASTER_SITES=	http://www.qcc.ca/~charlesc/software/queue_repair/
 +MASTER_SITES=	http://pyropus.ca/software/queue-repair/
  
  MAINTAINER=	sergei@FreeBSD.org
  COMMENT=	A qmail queue diagnostic and repair tool
  
  .if !defined(WITHOUT_QMAIL_PORT)
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 -QMAIL_DIR?=	/var/qmail
 +USE_QMAIL_RUN=	yes
  .endif
  
  USE_PYTHON=	yes
 diff -ruN --exclude=CVS ../ports.orig/mail/serialmail/Makefile ./mail/serialmail/Makefile
 --- ../ports.orig/mail/serialmail/Makefile	Tue Oct 12 04:35:40 2004
 +++ ./mail/serialmail/Makefile	Wed Aug 17 13:03:19 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	serialmail
  PORTVERSION=	0.75
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  MASTER_SITES=	http://cr.yp.to/software/ \
  		ftp://ftp.gbnet.net/pub/qmail/ \
 @@ -17,11 +17,8 @@
  MAINTAINER=	sergei@FreeBSD.org
  COMMENT=	Tools for passing mail across serial links
  
 -RUN_DEPENDS=	tcpserver:${PORTSDIR}/sysutils/ucspi-tcp \
 -		${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 -
 -# QMAIL_DIR is the directory where qmail is installed
 -QMAIL_DIR?=	/var/qmail
 +RUN_DEPENDS=	tcpserver:${PORTSDIR}/sysutils/ucspi-tcp
 +USE_QMAIL_RUN=	yes
  
  NO_PACKAGE=	Unsure of DJB license
  
 @@ -47,7 +44,7 @@
  	@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-home
  	@${ECHO_CMD} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
  	@${ECHO_CMD} ${CC} -s > ${WRKSRC}/conf-ld
 -	@${ECHO_CMD} ${QMAIL_DIR} > ${WRKSRC}/conf-qmail
 +	@${ECHO_CMD} ${QMAIL_PREFIX} > ${WRKSRC}/conf-qmail
  
  do-install:
  	cd ${WRKSRC} && \
 diff -ruN --exclude=CVS ../ports.orig/mail/simscan/Makefile ./mail/simscan/Makefile
 --- ../ports.orig/mail/simscan/Makefile	Mon Aug 15 12:13:59 2005
 +++ ./mail/simscan/Makefile	Wed Aug 17 13:03:22 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	simscan
  PORTVERSION=	1.1
 +PORTREVISION=	1
  CATEGORIES=	mail security
  MASTER_SITES=	http://www.inter7.com/simscan/
  MASTER_SITE_SUBDIR=	${PORTNAME}
 @@ -15,17 +16,14 @@
  MAINTAINER=	toxa@toxahost.ru
  COMMENT=	Fast Content/Anti-virus Scanner for qmail Written in C
  
 -BUILD_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail
 +USE_QMAIL_BUILD=	yes
  
  GNU_CONFIGURE=	yes
  USE_REINPLACE=	yes
  
 -# A normal qmail installation puts everything into /var/qmail/.
 -# Must match your qmail installation
 -QMAIL_DIR?=	/var/qmail
 -WORKDIR?=	${QMAIL_DIR}/${PORTNAME}
 -QMAIL_QUEUE=	${QMAIL_DIR}/bin/qmail-queue
 -PLIST_SUB=	QMAIL_DIR=${QMAIL_DIR} \
 +WORKDIR?=	${QMAIL_PREFIX}/${PORTNAME}
 +QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
 +PLIST_SUB=	QMAIL_PREFIX=${QMAIL_PREFIX} \
  		SIMSCAN_DIR=${PORTNAME}
  
  OPTIONS=	CLAMAV "Support for ClamAV Virus Scanning" on \
 @@ -41,7 +39,7 @@
  .include <bsd.port.pre.mk>
  
  CONFIGURE_ARGS=--enable-clamavdb-path=/var/db/clamav \
 -		--enable-qmaildir=${QMAIL_DIR} \
 +		--enable-qmaildir=${QMAIL_PREFIX} \
  	  	--enable-spamc-user=n \
  		--enable-workdir=${WORKDIR} \
  		--enable-user=nobody
 @@ -109,7 +107,7 @@
  
  if ! ${TEST} -f ${QMAIL_QUEUE}; then \
  	${ECHO_MSG} "Unable to found qmail-queue binary trying '${QMAIL_QUEUE}'.";  \
 -	${ECHO_MSG} "Please set QMAIL_DIR to your qmail installation directory !"; \
 +	${ECHO_MSG} "Please set QMAIL_PREFIX to your qmail installation directory !"; \
  	exit 1; \
  fi
  
 @@ -118,7 +116,7 @@
  	@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
  	@${ECHO_MSG} "You may also use the following build options:"
  	@${ECHO_MSG} ""
 -	@${ECHO_MSG} "QMAIL_DIR		Base qmail directory. Default is /var/qmail"
 +	@${ECHO_MSG} "QMAIL_PREFIX		Base qmail directory. Default is /var/qmail"
  	@${ECHO_MSG} "WORKDIR		Directory to unpack emails. Default is /var/qmail/simscan"
  	@${ECHO_MSG} "QMAIL_QUEUE		Define full path and name of the qmail-queue program"
  	@${ECHO_MSG} "			Incoming mail is passed to this program after being"
 diff -ruN --exclude=CVS ../ports.orig/mail/simscan/pkg-plist ./mail/simscan/pkg-plist
 --- ../ports.orig/mail/simscan/pkg-plist	Sun Apr  3 13:04:21 2005
 +++ ./mail/simscan/pkg-plist	Wed Aug 17 13:03:24 2005
 @@ -1,7 +1,7 @@
 -@cwd %%QMAIL_DIR%%
 +@cwd %%QMAIL_PREFIX%%
  bin/simscanmk
  bin/simscan
 -@unexec rmdir %%QMAIL_DIR%%/%%SIMSCAN_DIR%% || true
 +@unexec rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true
  @unexec echo ""
 -@unexec echo "If you're not updating this port, you can delete %%QMAIL_DIR%%/%%SIMSCAN_DIR%% directory"
 +@unexec echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory"
  @unexec echo ""
 diff -ruN --exclude=CVS ../ports.orig/mail/usendmail/Makefile ./mail/usendmail/Makefile
 --- ../ports.orig/mail/usendmail/Makefile	Mon Jul 25 07:12:32 2005
 +++ ./mail/usendmail/Makefile	Wed Aug 17 13:03:28 2005
 @@ -4,20 +4,17 @@
  #
  # $FreeBSD: ports/mail/usendmail/Makefile,v 1.4 2005/07/21 11:56:46 garga Exp $
  #
 -# Tunables: QMAIL_DIR: Where qmail resides (default: /var/qmail)
  
  PORTNAME=	usendmail
  PORTVERSION=	0.1.6
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	http://www.ohse.de/uwe/usendmail/
  
  MAINTAINER=	tmseck@netcologne.de
  COMMENT=	A replacement for qmail's sendmail drop-in
  
 -BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 -
 -QMAIL_DIR?=	/var/qmail
 +USE_QMAIL=	yes
  
  NO_SIZE=	yes
  USE_REINPLACE=	yes
 @@ -26,10 +23,10 @@
  PLIST_FILES=	sbin/usendmail
  PORTDOCS=	NEWS README
  SUB_FILES=	pkg-message
 -SUB_LIST=	QMAIL_DIR=${QMAIL_DIR}
 +SUB_LIST=	QMAIL_PREFIX=${QMAIL_PREFIX}
  
  post-patch:
 -	@${REINPLACE_CMD} -e 's,/var/qmail,${QMAIL_DIR},' \
 +	@${REINPLACE_CMD} -e 's,/var/qmail,${QMAIL_PREFIX},' \
  	    ${WRKSRC}/src/usendmail.c
  	@${REINPLACE_CMD} -e 's,^CC=,CC\?=,' \
  	    ${WRKSRC}/src/Makefile
 diff -ruN --exclude=CVS ../ports.orig/mail/usendmail/files/pkg-message.in ./mail/usendmail/files/pkg-message.in
 --- ../ports.orig/mail/usendmail/files/pkg-message.in	Thu Jul 21 08:56:47 2005
 +++ ./mail/usendmail/files/pkg-message.in	Wed Aug 17 13:03:27 2005
 @@ -7,8 +7,8 @@
  
  in /etc/mail/mailer.conf replace the lines
  
 -sendmail	%%QMAIL_DIR%%/bin/sendmail
 -send-mail	%%QMAIL_DIR%%/bin/sendmail
 +sendmail	%%QMAIL_PREFIX%%/bin/sendmail
 +send-mail	%%QMAIL_PREFIX%%/bin/sendmail
  
  with
  
 @@ -16,5 +16,5 @@
  send-mail	%%PREFIX%%/sbin/usendmail
  
  Otherwise replace the link from /usr/sbin/sendmail to
 -%%QMAIL_DIR%%/bin/sendmail with one to %%PREFIX%%/sbin/usendmail.
 +%%QMAIL_PREFIX%%/bin/sendmail with one to %%PREFIX%%/sbin/usendmail.
  
 diff -ruN --exclude=CVS ../ports.orig/mail/vmailmgr/Makefile ./mail/vmailmgr/Makefile
 --- ../ports.orig/mail/vmailmgr/Makefile	Sun Jan 30 09:28:50 2005
 +++ ./mail/vmailmgr/Makefile	Wed Aug 17 13:03:35 2005
 @@ -7,26 +7,36 @@
  
  PORTNAME=	vmailmgr
  PORTVERSION=	0.96.9
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  MASTER_SITES=	http://www.vmailmgr.org/current/
  
  MAINTAINER=	patrick@rinke-bochum.de
  COMMENT=	Virtual MAIL ManaGeR for virtual mailboxes and domains
  
 -RUN_DEPENDS=	/var/qmail/bin/qmail-start:${PORTSDIR}/mail/qmail \
 -		unixserver:${PORTSDIR}/sysutils/ucspi-unix
 +USE_APACHE=	yes
 +USE_QMAIL_RUN=	yes
  
 -HAS_CONFIGURE=yes
 +HAS_CONFIGURE=	yes
 +USE_REINPLACE=	yes
  
 -SVC_DIR=	"/var/qmail/service/vmailmgrd"
 +SVC_DIR=	"${QMAIL_PREFIX}/service/vmailmgrd"
 +PHP_DIR=	${PREFIX}/www/data-dist/${PORTNAME}
 +CGI_DIR=	${PREFIX}/www/cgi-bin-dist
 +
 +PLIST_SUB+=	PHP_DIR=${PHP_DIR} CGI_DIR=${CGI_DIR}
  
  MAN1=		checkvpw.1 vauthenticate.1 vpasswd2cdb.1 vrehash.1 \
  		listvdomain.1 vadduser.1 vchattr.1 vchforwards.1 \
 -		vcheckquota.1 vdeliver.1 vdeluser.1 vpasswd.1
 +		vcheckquota.1 vdeliver.1 vdeluser.1 vpasswd.1 \
 +		vpasswd2db.1 vpasswds.1 vpopbull.1 vsetup.1
  MAN7=		vmailmgr.7
  MAN8=		vmailmgrd.8
  
 +post-patch:
 +	@${REINPLACE_CMD} -e 's|phpdir=".home.httpd.php"|phpdir="${PHP_DIR}"|g' \
 +			  -e 's|cgidir=...prefix./cgi-bin.|cgidir="${CGI_DIR}"|g' \
 +		${WRKSRC}/configure ${WRKSRC}/configure.in
  post-install:
  	${MKDIR} ${PREFIX}/etc/vmailmgr
  	${CP} ${WRKSRC}/scripts/autoresponder.sh ${PREFIX}/etc/vmailmgr/vdeliver-postdeliver
 diff -ruN --exclude=CVS ../ports.orig/mail/vmailmgr/pkg-plist ./mail/vmailmgr/pkg-plist
 --- ../ports.orig/mail/vmailmgr/pkg-plist	Tue Oct 14 12:04:01 2003
 +++ ./mail/vmailmgr/pkg-plist	Wed Aug 17 13:03:36 2005
 @@ -19,18 +19,24 @@
  bin/vauthenticate
  bin/checkvpw
  bin/showvconfig
 -cgi-bin/vpasswd
 -cgi-bin/vadduser
 -cgi-bin/vdeluser
 -cgi-bin/vaddalias
 -cgi-bin/vchattr
 -cgi-bin/vchforwards
 -cgi-bin/listvdomain
 +%%CGI_DIR%%/vpasswd
 +%%CGI_DIR%%/vadduser
 +%%CGI_DIR%%/vdeluser
 +%%CGI_DIR%%/vaddalias
 +%%CGI_DIR%%/vchattr
 +%%CGI_DIR%%/vchforwards
 +%%CGI_DIR%%/listvdomain
 +@unexec rmdir %D/%%CGI_DIR%% 2>/dev/null || true
  etc/vmailmgr/default-username
  etc/vmailmgr/vdeliver-postdeliver
  lib/courier-imap/libexec/authlib/authvmailmgr
 +@dirrm lib/courier-imap/libexec/authlib
 +@dirrm lib/courier-imap/libexec
 +@dirrm lib/courier-imap
  sbin/vmailmgrd
  @dirrm etc/vmailmgr
 +%%PHP_DIR%%/vmail.inc
 +@dirrm %%PHP_DIR%%
  @cwd /var/qmail/service
  vmailmgrd/log/run
  vmailmgrd/run
 diff -ruN --exclude=CVS ../ports.orig/mail/vpopmail/Makefile ./mail/vpopmail/Makefile
 --- ../ports.orig/mail/vpopmail/Makefile	Mon Jul 11 19:35:35 2005
 +++ ./mail/vpopmail/Makefile	Wed Aug 17 13:03:41 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	vpopmail
  PORTVERSION=	5.4.10
 -PORTREVISION=	3
 +PORTREVISION=	4
  CATEGORIES=	mail
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	${PORTNAME}
 @@ -15,10 +15,9 @@
  MAINTAINER=	roam@FreeBSD.org
  COMMENT=	Easy virtual domain and authentication package for use with qmail
  
 -BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
 -		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
 -		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 +BUILD_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 +RUN_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 +USE_QMAIL=	yes
  
  CONFLICTS=	vpopmail-devel-5.*
  
 @@ -31,7 +30,7 @@
  VCFGFILES?=	inc_deps lib_deps tcp.smtp
  
  CONFIGURE_ENV+=	VCFGDIR="${VCFGDIR}"
 -CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_DIR} \
 +CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_PREFIX} \
  		--enable-tcprules-prog=${LOCALBASE}/bin/tcprules \
  		--enable-tcpserver-file=${PREFIX}/vpopmail/etc/tcp.smtp
  CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 @@ -76,7 +75,7 @@
  # WITH_MYSQL_LOG - enable auth logging to a MySQL database [deprecateed]
  # WITH_PGSQL_LOG - enable auth logging to a PostgreSQL database [deprecated]
  # WITH_SQL_LOG  - enable auth logging to the selected SQL database
 -# QMAIL_DIR     - location of qmail directory
 +# QMAIL_PREFIX  - location of qmail directory
  # PREFIX	- installation area for vpopmail (see comment below)
  # VCHKPW_GID	- the group ID of the new vchkpw group (89)
  # VPOPMAIL_UID	- the user ID of the new vpopmail user (89)
 @@ -190,12 +189,6 @@
  .endif
  
  .include <bsd.port.pre.mk>
 -
 -.if exists(${LOCALBASE}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
  
  # Uncomment this, or set PREFIX to /home if you have an existing
  # vpopmail install with the vpopmail users' home directory set to
 diff -ruN --exclude=CVS ../ports.orig/mail/vpopmail-devel/Makefile ./mail/vpopmail-devel/Makefile
 --- ../ports.orig/mail/vpopmail-devel/Makefile	Sun Jan 30 22:35:50 2005
 +++ ./mail/vpopmail-devel/Makefile	Wed Aug 17 13:03:48 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	vpopmail
  PORTVERSION=	5.5.0
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	mail
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
  MASTER_SITE_SUBDIR=	${PORTNAME}
 @@ -16,23 +16,22 @@
  MAINTAINER=	ale@FreeBSD.org
  COMMENT=	Easy virtual domain and authentication package for use with qmail
  
 -BUILD_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
 -		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 -RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \
 -		${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 +BUILD_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 +RUN_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
 +USE_QMAIL=	yes
  
  CONFLICTS=	vpopmail-5.*
  
  GNU_CONFIGURE=	YES
  USE_GMAKE=	YES
  USE_REINPLACE=	YES
 -USE_PERL5_BUILD=	YES
 +USE_PERL5=	YES
  
  VCFGDIR?=	${WRKDIR}/vcfg
  VCFGFILES?=	inc_deps lib_deps tcp.smtp
  
  CONFIGURE_ENV+=	VCFGDIR="${VCFGDIR}"
 -CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_DIR} \
 +CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_PREFIX} \
  		--enable-tcprules-prog=${LOCALBASE}/bin/tcprules \
  		--enable-tcpserver-file=${PREFIX}/vpopmail/etc/tcp.smtp
  
 @@ -74,7 +73,7 @@
  # WITHOUT_AUTH_LOG - disables authentication logging
  # WITH_MYSQL_LOG - enable logging to a MySQL database
  # WITH_PGSQL_LOG - enable logging to a PostgreSQL database
 -# QMAIL_DIR     - location of qmail directory
 +# QMAIL_PREFIX   - location of qmail directory
  # PREFIX	- installation area for vpopmail (see comment below)
  # VCHKPW_GID	- the group ID of the new vchkpw group (89)
  # VPOPMAIL_UID	- the user ID of the new vpopmail user (89)
 @@ -170,12 +169,6 @@
  
  .include <bsd.port.pre.mk>
  
 -.if exists(${LOCALBASE}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 -
  # Uncomment this, or set PREFIX to /home if you have an existing
  # vpopmail install with the vpopmail users' home directory set to
  # /home/vpopmail - package rules dictate we default to /usr/local/vpopmail
 @@ -327,10 +320,11 @@
  	${MKDIR} ${PREFIX}/vpopmail/etc
  	if [ ! -e "${PREFIX}/vpopmail/etc/tcp.smtp" ]; then \
  		if [ -e "${VCFGDIR}/tcp.smtp" ]; then \
 -			${INSTALL_DATA} ${VCFGDIR}/tcp.smtp ${PREFIX}/vpopmail/etc/; \
 +			${INSTALL_DATA} ${VCFGDIR}/tcp.smtp ${PREFIX}/vpopmail/etc/tcp.smtp-dist; \
  		else \
 -			${TOUCH} ${PREFIX}/vpopmail/etc/tcp.smtp; \
 +			${TOUCH} ${PREFIX}/vpopmail/etc/tcp.smtp-dist; \
  		fi; \
 +		${CP} -p ${PREFIX}/vpopmail/etc/tcp.smtp-dist ${PREFIX}/vpopmail/etc/tcp.smtp; \
  	fi
  .if defined(DEFAULT_DOMAIN)
  	${ECHO_CMD} ${DEFAULT_DOMAIN} > ${PREFIX}/vpopmail/etc/defaultdomain
 diff -ruN --exclude=CVS ../ports.orig/mail/vpopmail-devel/pkg-plist ./mail/vpopmail-devel/pkg-plist
 --- ../ports.orig/mail/vpopmail-devel/pkg-plist	Thu Feb 26 10:49:13 2004
 +++ ./mail/vpopmail-devel/pkg-plist	Wed Aug 17 13:03:47 2005
 @@ -41,7 +41,9 @@
  @unexec if [ -f %D/vpopmail/etc/defaultdomain ]; then rm -f %D/vpopmail/etc/defaultdomain; fi
  vpopmail/etc/inc_deps
  vpopmail/etc/lib_deps
 -@unexec if [ -f %D/vpopmail/etc/tcp.smtp -a ! -s %D/vpopmail/etc/tcp.smtp ]; then rm -f %D/vpopmail/etc/tcp.smtp; fi
 +@unexec if cmp -s %D/vpopmail/etc/tcp.smtp %D/vpopmail/etc/tcp.smtp-dist; then rm -f %D/vpopmail/etc/tcp.smtp; fi
 +vpopmail/etc/tcp.smtp-dist
 +@exec if [ ! -f %D/vpopmail/etc/tcp.smtp ] ; then cp -p %D/%F %B/tcp.smtp; fi
  @unexec if cmp -s %D/vpopmail/etc/vlimits.default %D/vpopmail/etc/vlimits.default-dist; then rm -f %D/vpopmail/etc/vlimits.default; fi
  vpopmail/etc/vlimits.default-dist
  @unexec if [ -f %D/vpopmail/etc/vpopmail.mysql ]; then rm -f %D/vpopmail/etc/vpopmail.mysql; fi
 diff -ruN --exclude=CVS ../ports.orig/mail/vqadmin/Makefile ./mail/vqadmin/Makefile
 --- ../ports.orig/mail/vqadmin/Makefile	Thu May 19 13:28:42 2005
 +++ ./mail/vqadmin/Makefile	Wed Aug 17 13:03:52 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	vqadmin
  PORTVERSION=	2.3.6
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	vqadmin
 @@ -24,11 +25,12 @@
  
  CGIBINDIR?=	www/cgi-bin-dist
  WEBDATADIR?=	www/data-dist
 -QMAIL_DIR?=	/var/qmail
  
  CONFIGURE_ARGS=	--enable-cgibindir=${PREFIX}/${CGIBINDIR} \
  		--enable-htmldir=${PREFIX}/${WEBDATADIR} \
 -		--enable-qmaildir=${QMAIL_DIR}
 +		--enable-qmaildir=${QMAIL_PREFIX}
 +
 +.include "${.CURDIR}/../../Mk/bsd.mail.mk"
  
  .include <bsd.port.pre.mk>
  
 diff -ruN --exclude=CVS ../ports.orig/mail/zabit/Makefile ./mail/zabit/Makefile
 --- ../ports.orig/mail/zabit/Makefile	Fri May 20 17:23:47 2005
 +++ ./mail/zabit/Makefile	Wed Aug 17 13:03:55 2005
 @@ -7,24 +7,20 @@
  
  PORTNAME=	zabit
  PORTVERSION=	0.7.1
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	http://www.enderunix.org/zabit/
  
  MAINTAINER=	ozkan@enderunix.org
  COMMENT=	Zabit is a content/attachment filter for qmail
  
 -RUN_DEPENDS=	${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail
 +USE_QMAIL_RUN=	yes
  
  HAS_CONFIGURE=	yes
  
  .include <bsd.port.pre.mk>
  
 -.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
 -QMAIL_DIR?=     ${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=     /var/qmail
 -.endif
 -QMAIL_QUEUE=    ${QMAIL_DIR}/bin/qmail-queue
 +QMAIL_QUEUE=    ${QMAIL_PREFIX}/bin/qmail-queue
  
  pre-build:
  .if !defined(BATCH)
 diff -ruN --exclude=CVS ../ports.orig/security/amavis-perl/Makefile ./security/amavis-perl/Makefile
 --- ../ports.orig/security/amavis-perl/Makefile	Mon May 24 21:04:30 2004
 +++ ./security/amavis-perl/Makefile	Wed Aug 17 13:01:38 2005
 @@ -7,6 +7,7 @@
  
  PORTNAME=	amavis-perl
  PORTVERSION=	11
 +PORTREVISION=	1
  CATEGORIES=	security
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
  MASTER_SITE_SUBDIR=	amavis
 @@ -57,13 +58,7 @@
  MTA?=	qmail
  DIROWNER?=	qmailq:qmail
  CONFIGURE_ARGS+=	--enable-qmail
 -.if exists(${LOCALBASE}/qmail/bin/qmail-send)
 -QMAIL_DIR?=	${LOCALBASE}/qmail
 -.else
 -QMAIL_DIR?=	/var/qmail
 -.endif
 -BUILD_DEPENDS+=	${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
 -RUN_DEPENDS=	${BUILD_DEPENDS}
 +USE_QMAIL=	yes
  .endif
  
  .if defined(MTA)
 diff -ruN --exclude=CVS ../ports.orig/sysutils/dtc/Makefile ./sysutils/dtc/Makefile
 --- ../ports.orig/sysutils/dtc/Makefile	Tue Feb  8 11:47:14 2005
 +++ ./sysutils/dtc/Makefile	Wed Aug 17 13:01:32 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME=	dtc
  PORTVERSION=	0.12.0.6
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	sysutils
  MASTER_SITES=	ftp://ftp.gplhost.com/pub/dtc/bsd/
  
 @@ -15,13 +15,11 @@
  COMMENT=	A hosting web GUI for admin and accounting apache/named/proftpd/qmail
  
  RUN_DEPENDS=	${LOCALBASE}/share/pear/Crypt/CBC.php:${PORTSDIR}/security/pear-Crypt_CBC \
 -		${LOCALBASE}/libexec/proftpd:${PORTSDIR}/ftp/proftpd-mysql \
 -		${LOCALBASE}/libexec/apache2/mod_log_sql.so:${PORTSDIR}/www/mod_log_sql2 \
 +		${LOCALBASE}/sbin/proftpd:${PORTSDIR}/ftp/proftpd-mysql \
 +		${LOCALBASE}/libexec/apache/mod_log_sql.so:${PORTSDIR}/www/mod_log_sql2 \
  		${LOCALBASE}/bin/webalizer:${PORTSDIR}/www/webalizer \
 -		${QMAIL_DIR}/bin/qmail-start:${PORTSDIR}/mail/qmail
  
  USE_PHP=	session mysql sockets gd
 -QMAIL_DIR?=	/var/qmail
  
  DTCROOT?=	www/dtc
  DTCDIR=		${PREFIX}/${DTCROOT}
 @@ -34,14 +32,16 @@
  NO_BUILD=	yes
  USE_MYSQL=	yes
  
 +USE_QMAIL_RUN=	yes
 +
  do-configure:
  	@${SED} -e 's,%%PREFIX%%,${PREFIX},;\
  		s,%%LOCALBASE%%,${LOCALBASE},;\
 -		s,%%QMAIL_DIR%%,${QMAIL_DIR},' \
 +		s,%%QMAIL_PREFIX%%,${QMAIL_PREFIX},' \
  		${FILESDIR}/dtc-install.in > ${WRKDIR}/dtc-install
  	@${SED} -e 's,%%PREFIX%%,${PREFIX},;\
  		s,%%LOCALBASE%%,${LOCALBASE},;\
 -		s,%%QMAIL_DIR%%,${QMAIL_DIR},' \
 +		s,%%QMAIL_PREFIX%%,${QMAIL_PREFIX},' \
  		${FILESDIR}/dtc-deinstall.in > ${WRKDIR}/dtc-deinstall
  
  do-install:
 diff -ruN --exclude=CVS ../ports.orig/sysutils/dtc/files/dtc-deinstall.in ./sysutils/dtc/files/dtc-deinstall.in
 --- ../ports.orig/sysutils/dtc/files/dtc-deinstall.in	Mon May 24 21:54:02 2004
 +++ ./sysutils/dtc/files/dtc-deinstall.in	Wed Aug 17 13:01:27 2005
 @@ -8,13 +8,13 @@
  
  PREFIX=%%PREFIX%%
  LOCALBASE=%%LOCALBASE%%
 -QMAIL_DIR=%%QMAIL_DIR%%
 +QMAIL_PREFIX=%%QMAIL_PREFIX%%
  
  echo "### DEAMON PATH CONFIGURATION ###"
  PATH_HTTPD_CONF="${LOCALBASE}/etc/apache/httpd.conf"
  PATH_NAMED_CONF="/etc/namedb/named.conf"
  PATH_PROFTPD_CONF="${LOCALBASE}/etc/proftpd.conf"
 -PATH_QMAIL_CTRL="${QMAIL_DIR}/control"
 +PATH_QMAIL_CTRL="${QMAIL_PREFIX}/control"
  
  # Multi OS (Unix system) uninstall sh script for DTC
  # Written by Thomas GOIRAND <thomas@goirand.fr>
 diff -ruN --exclude=CVS ../ports.orig/sysutils/dtc/files/dtc-install.in ./sysutils/dtc/files/dtc-install.in
 --- ../ports.orig/sysutils/dtc/files/dtc-install.in	Mon May 24 21:54:02 2004
 +++ ./sysutils/dtc/files/dtc-install.in	Wed Aug 17 13:01:29 2005
 @@ -7,7 +7,7 @@
  
  PREFIX=%%PREFIX%%
  LOCALBASE=%%LOCALBASE%%
 -QMAIL_DIR=%%QMAIL_DIR%%
 +QMAIL_PREFIX=%%QMAIL_PREFIX%%
  
  UNIX_TYPE=freebsd
  
 @@ -128,7 +128,7 @@
  	cp ${LOCALBASE}/etc/proftpd.conf.default ${LOCALBASE}/etc/proftpd.conf
  fi
  PATH_PROFTPD_CONF="${LOCALBASE}/etc/proftpd.conf"
 -PATH_QMAIL_CTRL="${QMAIL_DIR}/control"
 +PATH_QMAIL_CTRL="${QMAIL_PREFIX}/control"
  PATH_PHP_CGI="${LOCALBASE}/bin/php"
  PATH_DTC_SHARED="${PREFIX}/www/dtc"
  
 --- qmail_big_patch ends here ---
 
 Thanks
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc
 
 Science is what happens when preconception meets verification.

From: Renato Botelho <garga@FreeBSD.org>
To: bug-followup@FreeBSD.org,  portmgr@FreeBSD.org
Cc:  
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Thu, 10 Nov 2005 08:26:22 -0200

 Here is an updated version of the port:
 
 http://people.freebsd.org/~garga/qmail_big_patch.diff
 
 Please, let me know if the patch doesn't apply when next exp build
 will start, and I can update it again.
 
 Thanks
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc
State-Changed-From-To: feedback->analyzed 
State-Changed-By: linimon 
State-Changed-When: Sat Dec 17 22:33:43 UTC 2005 
State-Changed-Why:  
Indeed a few of the patches are not applying right now.  AFAICT some of 
these are just failing on PORTREVISION but at least one is more complicated. 
Is it possible that you can update the patch? 

Also, since the patch was created, mail/qmail-smtp_auth+tls was deleted. 

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

From: Renato Botelho <garga@FreeBSD.org>
To: portmgr@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/84053: mail/qmail: Big patch to prevent stale dependencies
Date: Mon, 19 Dec 2005 07:55:17 -0200

 Here is the newest version of the patch:
 
 http://people.freebsd.org/~garga/qmail_big_patch.diff
 
 Regards
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc
 
 Hummingbirds never remember the words to songs.
State-Changed-From-To: analyzed->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Jan 21 19:51:12 UTC 2006 
State-Changed-Why:  
Committed, thanks. 

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