From mad@micro.madpilot.net  Tue Nov  5 23:17:19 2013
Return-Path: <mad@micro.madpilot.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 15D15419;
	Tue,  5 Nov 2013 23:17:19 +0000 (UTC)
	(envelope-from mad@micro.madpilot.net)
Received: from micro.madpilot.net (micro.madpilot.net [88.149.173.206])
	by mx1.freebsd.org (Postfix) with ESMTP id 723C12E94;
	Tue,  5 Nov 2013 23:17:18 +0000 (UTC)
Received: from micro.madpilot.net (localhost [127.0.0.1])
	by micro.madpilot.net (Postfix) with ESMTP id 3dDmx943xdzHm;
	Wed,  6 Nov 2013 00:17:17 +0100 (CET)
Received: from micro.madpilot.net ([127.0.0.1])
	by micro.madpilot.net (micro.madpilot.net [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id aKLEvBI3HooU; Wed,  6 Nov 2013 00:17:14 +0100 (CET)
Received: by micro.madpilot.net (Postfix, from userid 1000)
	id 3dDmx64nvwzHl; Wed,  6 Nov 2013 00:17:14 +0100 (CET)
Message-Id: <3dDmx64nvwzHl@micro.madpilot.net>
Date: Wed,  6 Nov 2013 00:17:14 +0100 (CET)
From: Guido Falsi <madpilot@FreeBSD.org>
Reply-To: Guido Falsi <madpilot@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: oliver@FreeBSD.org
Subject: [PATCH] mail/courier-imap: Add GNUTLS option
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         183705
>Category:       ports
>Synopsis:       [PATCH] mail/courier-imap: Add GNUTLS option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    oliver
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 05 23:20:01 UTC 2013
>Closed-Date:    Sat Mar 01 16:09:51 UTC 2014
>Last-Modified:  Sat Mar  1 16:10:00 UTC 2014
>Originator:     Guido Falsi
>Release:        FreeBSD 9.2-STABLE amd64
>Organization:
none
>Environment:
System: FreeBSD micro.madpilot.net 9.2-STABLE FreeBSD 9.2-STABLE #22 r255995: Wed Oct 2 22:15:55 CEST 2013 root@micro.madpilot.net:/usr/obj/usr/src/sys/MICRO amd64

>Description:

- Add GNUTLS option, to compile against gnutls, enabling SNI support

NOTE: GNUTLS option needs to be handled before bsd.port.pre.mk
      because it defines USES=pkgconfig

While here:

- Convert to staging
- Convert to new LIB_DEPENDS format
- Use space iin pkg-descr WWW line
- Remove unneeded dirrmtry from pkg-plist

>How-To-Repeat:
>Fix:

Index: Makefile
===================================================================
--- Makefile	(revision 332925)
+++ Makefile	(working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=	courier-imap
 PORTVERSION=	4.14
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	mail ipv6
 MASTER_SITES=	SF/courier/imap/${PORTVERSION}
@@ -26,15 +27,15 @@
 MAKE_ENV:=	${CONFIGURE_ENV}
 
 #
-NO_STAGE=	yes
 # options available:
 #
 # WITH_SYSLOG_FACILITY:         The syslogfacility to use
 #
 
-OPTIONS_DEFINE=	FAM TRASHQUOTA GDBM IPV6
+OPTIONS_DEFINE=	FAM TRASHQUOTA GDBM IPV6 GNUTLS
 FAM_DESC=	Fam support for IDLE command
 TRASHQUOTA_DESC=	Include deleted mails in the quota
+GNUTLS_DESC=	Use GnuTLS instead of OpenSSL (Enables SNI)
 
 .if exists(${.CURDIR}/../../security/courier-authlib/Makefile.opt)
 .include "${.CURDIR}/../../security/courier-authlib/Makefile.opt"
@@ -56,6 +57,14 @@
 		--with-locking-method=fcntl \
 		COURIERAUTHCONFIG=${PREFIX}/bin/courierauthconfig
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGNUTLS}
+CONFIGURE_ARGS+=--with-gnutls
+LIB_DEPENDS+=	libgnutls.so:${PORTSDIR}/security/gnutls
+USES+=		pkgconfig
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if exists(${.CURDIR}/../../security/courier-authlib/Makefile.dep)
@@ -69,7 +78,7 @@
 .if ${PORT_OPTIONS:MAUTH_USERDB}
 .if ${PORT_OPTIONS:MGDBM}
 CONFIGURE_ARGS+=--with-db=gdbm --with-userdb=${USERDB}
-LIB_DEPENDS+=	gdbm.4:${PORTSDIR}/databases/gdbm
+LIB_DEPENDS+=	libgdbm.so.4:${PORTSDIR}/databases/gdbm
 .else
 CONFIGURE_ARGS+=--with-db=db  --with-userdb=${USERDB}
 .endif
@@ -89,11 +98,6 @@
 USE_FAM=	yes
 .endif
 
-MAN1=		couriertcpd.1 maildiracl.1 maildirkw.1 \
-		maildirmake.1
-
-MAN8=		deliverquota.8 imapd.8 mkimapdcert.8 mkpop3dcert.8
-
 EXTRA_DOCS=	AUTHORS INSTALL NEWS \
 		libs/imap/ChangeLog \
 		libs/imap/README \
@@ -121,16 +125,15 @@
 
 post-install:
 .for i in imapd pop3d
-	${INSTALL_DATA} ${WRKSRC}/libs/imap/${i}.cnf ${CONFDIR}/${i}.cnf.dist
+	${INSTALL_DATA} ${WRKSRC}/libs/imap/${i}.cnf ${STAGEDIR}${CONFDIR}/${i}.cnf.dist
 .endfor
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for a in ${EXTRA_DOCS}
-	${INSTALL_DATA} ${WRKSRC}/${a} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${a} ${STAGEDIR}${DOCSDIR}
 .endfor
-.endif
 
-	cd ${WRKSRC} && ( ${GMAKE} install-configure ; cd - )
+	cd ${WRKSRC} && ( ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} \
+		install-configure ; cd - )
 
 	@${ECHO_MSG} "In case you use authpam, you should put the following lines"
 	@${ECHO_MSG} "in your /etc/pam.d/imap"
Index: pkg-descr
===================================================================
--- pkg-descr	(revision 332925)
+++ pkg-descr	(working copy)
@@ -16,4 +16,4 @@
      * Virtual mailbox support.
      * Pop3 daemon.
 
-WWW:	http://www.courier-mta.org/imap/
+WWW: http://www.courier-mta.org/imap/
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 332925)
+++ pkg-plist	(working copy)
@@ -28,6 +28,14 @@
 %%LIBEXECDIR%%/makedatprog
 %%LIBEXECDIR%%/pop3d-ssl.rc
 %%LIBEXECDIR%%/pop3d.rc
+man/man1/couriertcpd.1.gz
+man/man1/maildiracl.1.gz
+man/man1/maildirkw.1.gz
+man/man1/maildirmake.1.gz
+man/man8/deliverquota.8.gz
+man/man8/imapd.8.gz
+man/man8/mkimapdcert.8.gz
+man/man8/mkpop3dcert.8.gz
 sbin/imaplogin
 sbin/mkimapdcert
 sbin/mkpop3dcert
@@ -52,7 +60,6 @@
 @dirrmtry var
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm share/courier-imap
-@dirrmtry %%LIBEXECDIR%%/authlib
 @dirrm %%LIBEXECDIR%%
 @dirrm %%CONFDIR%%/shared
 @dirrm %%CONFDIR%%/shared.tmp
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->oliver 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Nov 5 23:20:16 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Guido Falsi <madpilot@FreeBSD.org>
To: bug-followup@FreeBSD.org, oliver@FreeBSD.org
Cc:  
Subject: Re: ports/183705: [PATCH] mail/courier-imap: Add GNUTLS option
Date: Sat, 01 Mar 2014 10:35:39 +0100

 This is a multi-part message in MIME format.
 --------------060804000001090107010405
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 I'm attaching a revised patch which applies to the present ports tree.
 
 I've been using this version of the port successfully all this time on
 my own email servers.
 
 Is it possible to have this approved or committed?
 
 Thanks in advance.
 
 -- 
 Guido Falsi <madpilot@FreeBSD.org>
 
 --------------060804000001090107010405
 Content-Type: text/x-patch;
  name="courier-imap.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="courier-imap.diff"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 346606)
 +++ Makefile	(working copy)
 @@ -3,6 +3,7 @@
  
  PORTNAME=	courier-imap
  PORTVERSION=	4.15
 +PORTREVISION=	1
  PORTEPOCH=	2
  CATEGORIES=	mail ipv6
  MASTER_SITES=	SF/courier/imap/${PORTVERSION}
 @@ -26,15 +27,15 @@
  MAKE_ENV:=	${CONFIGURE_ENV}
  
  #
 -NO_STAGE=	yes
  # options available:
  #
  # WITH_SYSLOG_FACILITY:         The syslogfacility to use
  #
  
 -OPTIONS_DEFINE=	FAM TRASHQUOTA GDBM IPV6
 +OPTIONS_DEFINE=	FAM TRASHQUOTA GDBM IPV6 GNUTLS
  FAM_DESC=	Fam support for IDLE command
  TRASHQUOTA_DESC=	Include deleted mails in the quota
 +GNUTLS_DESC=	Use GnuTLS instead of OpenSSL (Enables SNI)
  FAM_USES=	fam
  
  .if exists(${.CURDIR}/../../security/courier-authlib/Makefile.opt)
 @@ -57,6 +58,14 @@
  		--with-locking-method=fcntl \
  		COURIERAUTHCONFIG=${PREFIX}/bin/courierauthconfig
  
 +.include <bsd.port.options.mk>
 +
 +.if ${PORT_OPTIONS:MGNUTLS}
 +CONFIGURE_ARGS+=--with-gnutls
 +LIB_DEPENDS+=	libgnutls.so:${PORTSDIR}/security/gnutls
 +USES+=		pkgconfig
 +.endif
 +
  .include <bsd.port.pre.mk>
  
  .if exists(${.CURDIR}/../../security/courier-authlib/Makefile.dep)
 @@ -70,7 +79,7 @@
  .if ${PORT_OPTIONS:MAUTH_USERDB}
  .if ${PORT_OPTIONS:MGDBM}
  CONFIGURE_ARGS+=--with-db=gdbm --with-userdb=${USERDB}
 -LIB_DEPENDS+=	gdbm.4:${PORTSDIR}/databases/gdbm
 +LIB_DEPENDS+=	libgdbm.so.4:${PORTSDIR}/databases/gdbm
  .else
  CONFIGURE_ARGS+=--with-db=db  --with-userdb=${USERDB}
  .endif
 @@ -89,11 +98,6 @@
  LDFLAGS+=	-L${LOCALBASE}/lib
  .endif
  
 -MAN1=		couriertcpd.1 maildiracl.1 maildirkw.1 \
 -		maildirmake.1
 -
 -MAN8=		deliverquota.8 imapd.8 mkimapdcert.8 mkpop3dcert.8 mkdhparams.8
 -
  EXTRA_DOCS=	AUTHORS INSTALL NEWS \
  		libs/imap/ChangeLog \
  		libs/imap/README \
 @@ -121,16 +125,15 @@
  
  post-install:
  .for i in imapd pop3d
 -	${INSTALL_DATA} ${WRKSRC}/libs/imap/${i}.cnf ${CONFDIR}/${i}.cnf.dist
 +	${INSTALL_DATA} ${WRKSRC}/libs/imap/${i}.cnf ${STAGEDIR}${CONFDIR}/${i}.cnf.dist
  .endfor
 -.if ${PORT_OPTIONS:MDOCS}
 -	@${MKDIR} ${DOCSDIR}
 +	@${MKDIR} ${STAGEDIR}${DOCSDIR}
  .for a in ${EXTRA_DOCS}
 -	${INSTALL_DATA} ${WRKSRC}/${a} ${DOCSDIR}
 +	${INSTALL_DATA} ${WRKSRC}/${a} ${STAGEDIR}${DOCSDIR}
  .endfor
 -.endif
  
 -	cd ${WRKSRC} && ( ${GMAKE} install-configure ; cd - )
 +	cd ${WRKSRC} && ( ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} \
 +		install-configure ; cd - )
  
  	@${ECHO_MSG} "In case you use authpam, you should put the following lines"
  	@${ECHO_MSG} "in your /etc/pam.d/imap"
 Index: pkg-descr
 ===================================================================
 --- pkg-descr	(revision 346606)
 +++ pkg-descr	(working copy)
 @@ -16,4 +16,4 @@
       * Virtual mailbox support.
       * Pop3 daemon.
  
 -WWW:	http://www.courier-mta.org/imap/
 +WWW: http://www.courier-mta.org/imap/
 Index: pkg-plist
 ===================================================================
 --- pkg-plist	(revision 346606)
 +++ pkg-plist	(working copy)
 @@ -28,6 +28,15 @@
  %%LIBEXECDIR%%/makedatprog
  %%LIBEXECDIR%%/pop3d-ssl.rc
  %%LIBEXECDIR%%/pop3d.rc
 +man/man1/couriertcpd.1.gz
 +man/man1/maildiracl.1.gz
 +man/man1/maildirkw.1.gz
 +man/man1/maildirmake.1.gz
 +man/man8/deliverquota.8.gz
 +man/man8/imapd.8.gz
 +man/man8/mkdhparams.8.gz
 +man/man8/mkimapdcert.8.gz
 +man/man8/mkpop3dcert.8.gz
  sbin/imaplogin
  sbin/mkdhparams
  sbin/mkimapdcert
 @@ -54,7 +63,6 @@
  @dirrmtry var
  %%PORTDOCS%%@dirrm %%DOCSDIR%%
  @dirrm share/courier-imap
 -@dirrmtry %%LIBEXECDIR%%/authlib
  @dirrm %%LIBEXECDIR%%
  @dirrm %%CONFDIR%%/shared
  @dirrm %%CONFDIR%%/shared.tmp
 
 --------------060804000001090107010405--
State-Changed-From-To: open->closed 
State-Changed-By: oliver 
State-Changed-When: Sat Mar 1 16:09:19 UTC 2014 
State-Changed-Why:  
Committed. Sorry that it took so long! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/183705: commit references a PR
Date: Sat,  1 Mar 2014 16:09:02 +0000 (UTC)

 Author: oliver
 Date: Sat Mar  1 16:08:54 2014
 New Revision: 346638
 URL: http://svnweb.freebsd.org/changeset/ports/346638
 QAT: https://qat.redports.org/buildarchive/r346638/
 
 Log:
   add GNUTILS option
   
   PR:		ports/183705
   Submitted by:	madpilot
 
 Modified:
   head/mail/courier-imap/Makefile
   head/mail/courier-imap/pkg-descr
   head/mail/courier-imap/pkg-plist
 
 Modified: head/mail/courier-imap/Makefile
 ==============================================================================
 --- head/mail/courier-imap/Makefile	Sat Mar  1 16:06:59 2014	(r346637)
 +++ head/mail/courier-imap/Makefile	Sat Mar  1 16:08:54 2014	(r346638)
 @@ -3,6 +3,7 @@
  
  PORTNAME=	courier-imap
  PORTVERSION=	4.15
 +PORTREVISION=	1
  PORTEPOCH=	2
  CATEGORIES=	mail ipv6
  MASTER_SITES=	SF/courier/imap/${PORTVERSION}
 @@ -26,15 +27,15 @@ CONFIGURE_ENV=	REHASH=${SCRIPTDIR}/c_reh
  MAKE_ENV:=	${CONFIGURE_ENV}
  
  #
 -NO_STAGE=	yes
  # options available:
  #
  # WITH_SYSLOG_FACILITY:         The syslogfacility to use
  #
  
 -OPTIONS_DEFINE=	FAM TRASHQUOTA GDBM IPV6
 +OPTIONS_DEFINE=	FAM TRASHQUOTA GDBM IPV6 GNUTLS
  FAM_DESC=	Fam support for IDLE command
  TRASHQUOTA_DESC=	Include deleted mails in the quota
 +GNUTLS_DESC=	Use GnuTLS instead of OpenSSL (Enables SNI)
  FAM_USES=	fam
  
  .if exists(${.CURDIR}/../../security/courier-authlib/Makefile.opt)
 @@ -57,6 +58,14 @@ CONFIGURE_ARGS=	--sysconfdir=${CONFDIR} 
  		--with-locking-method=fcntl \
  		COURIERAUTHCONFIG=${PREFIX}/bin/courierauthconfig
  
 +.include <bsd.port.options.mk>
 +
 +.if ${PORT_OPTIONS:MGNUTLS}
 +CONFIGURE_ARGS+=--with-gnutls
 +LIB_DEPENDS+=	libgnutls.so:${PORTSDIR}/security/gnutls
 +USES+=		pkgconfig
 +.endif
 +
  .include <bsd.port.pre.mk>
  
  .if exists(${.CURDIR}/../../security/courier-authlib/Makefile.dep)
 @@ -70,7 +79,7 @@ CONFIGURE_ARGS+=--with-syslog=${WITH_SYS
  .if ${PORT_OPTIONS:MAUTH_USERDB}
  .if ${PORT_OPTIONS:MGDBM}
  CONFIGURE_ARGS+=--with-db=gdbm --with-userdb=${USERDB}
 -LIB_DEPENDS+=	gdbm.4:${PORTSDIR}/databases/gdbm
 +LIB_DEPENDS+=	libgdbm.so:${PORTSDIR}/databases/gdbm
  .else
  CONFIGURE_ARGS+=--with-db=db  --with-userdb=${USERDB}
  .endif
 @@ -89,11 +98,6 @@ CPPFLAGS+=	-I${LOCALBASE}/include
  LDFLAGS+=	-L${LOCALBASE}/lib
  .endif
  
 -MAN1=		couriertcpd.1 maildiracl.1 maildirkw.1 \
 -		maildirmake.1
 -
 -MAN8=		deliverquota.8 imapd.8 mkimapdcert.8 mkpop3dcert.8 mkdhparams.8
 -
  EXTRA_DOCS=	AUTHORS INSTALL NEWS \
  		libs/imap/ChangeLog \
  		libs/imap/README \
 @@ -121,16 +125,15 @@ post-patch:
  
  post-install:
  .for i in imapd pop3d
 -	${INSTALL_DATA} ${WRKSRC}/libs/imap/${i}.cnf ${CONFDIR}/${i}.cnf.dist
 +	${INSTALL_DATA} ${WRKSRC}/libs/imap/${i}.cnf ${STAGEDIR}${CONFDIR}/${i}.cnf.dist
  .endfor
 -.if ${PORT_OPTIONS:MDOCS}
 -	@${MKDIR} ${DOCSDIR}
 +	@${MKDIR} ${STAGEDIR}${DOCSDIR}
  .for a in ${EXTRA_DOCS}
 -	${INSTALL_DATA} ${WRKSRC}/${a} ${DOCSDIR}
 +	${INSTALL_DATA} ${WRKSRC}/${a} ${STAGEDIR}${DOCSDIR}
  .endfor
 -.endif
  
 -	cd ${WRKSRC} && ( ${GMAKE} install-configure ; cd - )
 +	cd ${WRKSRC} && ( ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} \
 +		install-configure ; cd - )
  
  	@${ECHO_MSG} "In case you use authpam, you should put the following lines"
  	@${ECHO_MSG} "in your /etc/pam.d/imap"
 
 Modified: head/mail/courier-imap/pkg-descr
 ==============================================================================
 --- head/mail/courier-imap/pkg-descr	Sat Mar  1 16:06:59 2014	(r346637)
 +++ head/mail/courier-imap/pkg-descr	Sat Mar  1 16:08:54 2014	(r346638)
 @@ -16,4 +16,4 @@ Features:
       * Virtual mailbox support.
       * Pop3 daemon.
  
 -WWW:	http://www.courier-mta.org/imap/
 +WWW: http://www.courier-mta.org/imap/
 
 Modified: head/mail/courier-imap/pkg-plist
 ==============================================================================
 --- head/mail/courier-imap/pkg-plist	Sat Mar  1 16:06:59 2014	(r346637)
 +++ head/mail/courier-imap/pkg-plist	Sat Mar  1 16:08:54 2014	(r346638)
 @@ -28,6 +28,15 @@ bin/pop3d
  %%LIBEXECDIR%%/makedatprog
  %%LIBEXECDIR%%/pop3d-ssl.rc
  %%LIBEXECDIR%%/pop3d.rc
 +man/man1/couriertcpd.1.gz
 +man/man1/maildiracl.1.gz
 +man/man1/maildirkw.1.gz
 +man/man1/maildirmake.1.gz
 +man/man8/deliverquota.8.gz
 +man/man8/imapd.8.gz
 +man/man8/mkdhparams.8.gz
 +man/man8/mkimapdcert.8.gz
 +man/man8/mkpop3dcert.8.gz
  sbin/imaplogin
  sbin/mkdhparams
  sbin/mkimapdcert
 @@ -54,7 +63,6 @@ share/courier-imap/mkpop3dcert
  @dirrmtry var
  %%PORTDOCS%%@dirrm %%DOCSDIR%%
  @dirrm share/courier-imap
 -@dirrmtry %%LIBEXECDIR%%/authlib
  @dirrm %%LIBEXECDIR%%
  @dirrm %%CONFDIR%%/shared
  @dirrm %%CONFDIR%%/shared.tmp
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
