From mandree@FreeBSD.org  Mon Jun  3 23:06:57 2013
Return-Path: <mandree@FreeBSD.org>
Received: from apollo.emma.line.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87])
	by hub.freebsd.org (Postfix) with ESMTP id 22B2A558;
	Mon,  3 Jun 2013 23:06:57 +0000 (UTC)
	(envelope-from mandree@FreeBSD.org)
Received: from mandree by apollo.emma.line.org with local (Exim 4.80.1 (FreeBSD))
	(envelope-from <mandree@FreeBSD.org>)
	id 1Ujdq4-0009D2-Fe; Tue, 04 Jun 2013 01:06:56 +0200
Message-Id: <E1Ujdq4-0009D2-Fe@apollo.emma.line.org>
Date: Tue, 04 Jun 2013 01:06:56 +0200
From: Matthias Andree <mandree@FreeBSD.org>
Reply-To: Matthias Andree <mandree@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: udo.schweigert@siemens.com,bapt@freebsd.org,miwi@freebsd.org
Subject: [PATCH] mail/mutt14: optionsNG conversion; fix IMAP format string
X-Send-Pr-Version: 3.113
X-GNATS-Notify: udo.schweigert@siemens.com

>Number:         179281
>Category:       ports
>Synopsis:       [PATCH] mail/mutt14: optionsNG conversion; fix IMAP format string
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jgh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 03 23:10:00 UTC 2013
>Closed-Date:    Sat Mar 29 04:43:14 UTC 2014
>Last-Modified:  Sat Mar 29 04:43:14 UTC 2014
>Originator:     Matthias Andree
>Release:        FreeBSD 9.1-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD apollo.emma.line.org 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
- Update to optionsNG
- Cook header
- Add a patch that fixes a format string bug; size_t must not be printed
  through %d because it might be longer than an int and cause printf to
  read garbage; instead we use %lu and cast to unsigned long;
- bump PORTREVISION
- shorten COMMENT so it does not get truncated in pkg_info

(Cc: Port maintainer, bapt, and miwi)
	
>How-To-Repeat:
	
>Fix:

Index: Makefile
===================================================================
diff --git a/head/mail/mutt14/Makefile b/head/mail/mutt14/Makefile
--- a/head/mail/mutt14/Makefile	(Revision 319806)
+++ b/head/mail/mutt14/Makefile	(Arbeitskopie)
@@ -1,13 +1,9 @@
-# ex:ts=8
-# Ports collection makefile for:  mutt w/pgp hooks
-# Date created:			  Thur July 25, 1996
-# Whom:				  David O'Brien (obrien@NUXI.com)
-#
+# Created by: David O'Brien (obrien@NUXI.com)
 # $FreeBSD$
-#
 
 PORTNAME=	mutt
 PORTVERSION=	1.4.2.3
+PORTREVISION=	1
 CATEGORIES+=	mail ipv6
 MASTER_SITES=	ftp://ftp.mutt.org/mutt/ \
 		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
@@ -24,21 +20,31 @@
 PATCH_DIST_STRIP=	-p1
 
 MAINTAINER?=	udo.schweigert@siemens.com
-COMMENT?=	The Mongrel of Mail User Agents (part Elm, Pine, Mush, mh, etc.)
+COMMENT?=	The Mongrel of Mailers (part Elm, Pine, Mush, mh, etc.)
 
 CONFLICTS?=	ja-mutt-[0-9]* ja-mutt-devel-[0-9]* mutt-devel-[0-9]* mutt-devel-lite-[0-9]* mutt-lite-[0-9]* zh-mutt-devel-[0-9]* mutt-[^1].[^4]*
 LATEST_LINK=	${PKGNAMEPREFIX}${PORTNAME}14${PKGNAMESUFFIX}
 
-OPTIONS=	NLS "Native Language Support via gettext utilities" on \
- SLANG "Adds display/screen management via S-Lang" off \
- NCURSES "Adds ncurses console graphics support" off \
- SGML_DOCS "Enable mutt SGML documentation" off \
- LOCALES_FIX "Enable locales fixes" off \
- MUTT_XFACE "Adds mutt X-Face" off \
- MUTT_FLOCK "Enable mutt flock" on \
- MUTT_ICONV "Enable mutt iconv" on \
- GSSAPI "GSSAPI (Kerberos) support" on
+OPTIONS_DEFINE=		NLS SGML_DOCS LOCALES_FIX GSSAPI \
+			MUTT_XFACE MUTT_FLOCK MUTT_ICONV
+OPTIONS_DEFAULT=	GSSAPI MUTT_FLOCK MUTT_ICONV
 
+OPTIONS_RADIO=		CONS
+OPTIONS_RADIO_CONS=	SLANG NCURSES
+
+.if defined(PACKAGE_BUILDING) && !defined (MUTT_LITE)
+OPTIONS_DEFAULT+=	SLANG
+.endif
+
+CONS_DESC=	Console driver (if none chosen, uses ncurses from base system)
+SLANG_DESC=	Adds display/screen management via S-Lang
+NCURSES_DESC=	Adds ncurses-from-ports console graphics support
+SGML_DOCS_DESC=	Enable mutt SGML documentation
+LOCALES_FIX_DESC=	Enable locales fixes
+MUTT_XFACE_DESC=	Adds mutt X-Face
+MUTT_FLOCK_DESC=	Enable mutt flock
+MUTT_ICONV_DESC=	Enable mutt iconv
+
 USE_OPENSSL=	yes
 
 .include <bsd.port.options.mk>
@@ -51,27 +57,28 @@
 		urlview:${PORTSDIR}/textproc/urlview
 .endif
 
+AVOID_SGML_DOCS:=""
+
 .if defined (MUTT_LITE)
 PKGNAMESUFFIX=	-lite
-WITH_SGML_DOCS:=no
+AVOID_SGML_DOCS:=yes
 .elif ${ARCH} == "alpha"
 #  coredump in sgmls
-WITH_SGML_DOCS:=no
+AVOID_SGML_DOCS:=yes
 .endif
 
-.if !defined(WITHOUT_NLS)
+.if ${PORT_OPTIONS:MNLS}
 USES+=		gettext iconv
-.if defined(WITHOUT_MUTT_ICONV)
-IGNORE=	the WITHOUT_MUTT_ICONV knob of the mutt port only works if \
-	WITHOUT_NLS is also given
+.if ! ${PORT_OPTIONS:MMUTT_ICONV}
+IGNORE=	disabling the MUTT_ICONV knob of the mutt port only works if NLS is also disabled
 .endif
-.elif !defined(WITHOUT_MUTT_ICONV)
+.elif ${PORT_OPTIONS:MMUTT_ICONV}
 USES+=	iconv
 .endif
 
-.if defined(WITH_SLANG)
+.if ${PORT_OPTIONS:MSLANG}
 LIB_DEPENDS+=	slang.2:${PORTSDIR}/devel/libslang2
-.elif defined(WITH_NCURSES)
+.elif ${PORT_OPTIONS:MNCURSES}
 USES+=	ncurses:port
 .else
 USES+=	ncurses
@@ -80,10 +87,10 @@
 .if defined(WITH_MUTT_CYRUS_SASL)
 IGNORE=	the SASL support for mutt has been withdrawn. Please use the mutt-devel port instead
 .endif
-.if defined(WITH_SGML_DOCS) && ${WITH_SGML_DOCS} != "no"
+.if ${PORT_OPTIONS:MSGML_DOCS} && ${AVOID_SGML_DOCS} != "yes"
 BUILD_DEPENDS+=	sgmlfmt:${PORTSDIR}/textproc/sgmlformat
 .endif
-.if defined(WITH_MUTT_XFACE)
+.if ${PORT_OPTIONS:MMUTT_XFACE}
 PATCH_DEPENDS+=	${NONEXISTENT}:${PORTSDIR}/news/slrnface:extract
 RUN_DEPENDS+=	slrnface:${PORTSDIR}/news/slrnface
 .endif
@@ -103,32 +110,32 @@
 .if defined(MUTT_CONFIGURE_ARGS)
 CONFIGURE_ARGS+=	${MUTT_CONFIGURE_ARGS}
 .endif
-.if defined(WITHOUT_MUTT_FLOCK)
+.if ! ${PORT_OPTIONS:MMUTT_FLOCK}
 CONFIGURE_ARGS+=	--disable-flock
 .else
 CONFIGURE_ARGS+=	--enable-flock
 .endif
-.if defined(WITH_LOCALES_FIX)
+.if ${PORT_OPTIONS:MLOCALES_FIX}
 CONFIGURE_ARGS+=	--enable-locales-fix
 .endif
-.if defined(WITHOUT_NLS)
+.if ! ${PORT_OPTIONS:MNLS}
 CONFIGURE_ARGS+=	--disable-nls
 PLIST_SUB+=	NLS="@comment "
 .else
 PLIST_SUB+=	NLS=""
 .endif
-.if defined(WITHOUT_MUTT_ICONV) && defined(WITHOUT_NLS)
+.if ! ${PORT_OPTIONS:MMUTT_ICONV} && ! ${PORT_OPTIONS:MNLS}
 CONFIGURE_ARGS+=	--disable-iconv
 .else
 CONFIGURE_ARGS+=	--with-libiconv-prefix=${PREFIX}
 .endif
-.if defined(WITH_SLANG)
+.if ${PORT_OPTIONS:MSLANG}
 CONFIGURE_ARGS+=	--with-slang=${PREFIX}
 .elif defined(WITH_NCURSES)
 CONFIGURE_ARGS+=	--with-curses=${NCURSESBASE}
 CFLAGS+=	-I${NCURSESINC}
 .endif
-.if !defined(WITHOUT_GSSAPI)
+.if ${PORT_OPTIONS:MGSSAPI}
 .if exists(${LOCALBASE}/bin/gss-client)
 LIB_DEPENDS+=		gssapi_krb5:${PORTSDIR}/security/krb5
 CONFIGURE_ARGS+=	--with-gss=${LOCALBASE}
@@ -148,7 +155,7 @@
 	@${REINPLACE_CMD} -E -e 's|@samplesdir@|${EXAMPLESDIR}|g' \
 		${WRKSRC}/contrib/Makefile.in
 
-.if defined(WITH_MUTT_XFACE)
+.if ${PORT_OPTIONS:MMUTT_XFACE}
 post-patch::
 	@${ECHO} "===>  Applying XFACE patch"
 	slrnface_dir=`${FIND} ${PORTSDIR}/news/slrnface/work -type d \
@@ -174,7 +181,7 @@
 			-e "s|^(AUTOHEADER = ).+|\1${AUTOHEADER}|" \
 		${BUILD_WRKSRC}/Makefile
 
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 post-build:
 	@${TOUCH} ${WRKSRC}/doc/mutt.man ${WRKSRC}/doc/manual.sgml
 	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-doc-ref
@@ -186,7 +193,7 @@
 		-e 's|\$$\{DOCSDIR\}|${DOCSDIR}|g' \
 		-e 's|\$$\{EXAMPLESDIR\}|${EXAMPLESDIR}|g' \
 		${WRKSRC}/doc/muttrc.man
-.if defined(WITH_SGML_DOCS) && ${WITH_SGML_DOCS} != "no"
+.if ${PORT_OPTIONS:MSGML_DOCS} && ${AVOID_SGML_DOCS} != "yes"
 PLIST:=		${WRKDIR}/PLIST
 pre-install:
 	@${CAT} ${PKGDIR}/pkg-plist.htmlfiles > ${PLIST}
@@ -196,12 +203,12 @@
 
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/Muttrc ${PREFIX}/etc/Muttrc.dist
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${ECHO} "===>   Installing Mutt documentation"
 	@${MKDIR} ${DOCSDIR} && ${CHMOD} a+rx ${DOCSDIR}
 	@cd ${WRKSRC}/doc ; ${INSTALL_MAN} manual.txt PGP-Notes.txt \
 		${DOCSDIR}
-.if defined(WITH_SGML_DOCS) && ${WITH_SGML_DOCS} != "no"
+.if ${PORT_OPTIONS:MSGML_DOCS} && ${AVOID_SGML_DOCS} != "yes"
 	${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m 0755 \
 	    -d ${DOCSDIR}/html
 	${INSTALL_MAN} ${WRKSRC}/doc/*.html ${DOCSDIR}/html
@@ -209,7 +216,7 @@
 .endif
 .endif
 
-.if defined(WITH_MUTT_XFACE)
+.if ${PORT_OPTIONS:MMUTT_XFACE}
 	@${ECHO} ""
 	@${ECHO} "************************************************************"
 	@${ECHO} "  To enable the XFACE support in mutt you also have to add"
Index: files/patch-message.c
===================================================================
diff --git a/head/mail/mutt14/files/patch-message.c b/head/mail/mutt14/files/patch-message.c
new file mode 10644
--- /dev/null	(Revision 0)
+++ b/head/mail/mutt14/files/patch-message.c	(Arbeitskopie)
@@ -0,0 +1,11 @@
+--- imap/message.c.orig	2007-05-23 03:17:53.000000000 +0200
++++ imap/message.c	2013-06-04 00:53:42.000000000 +0200
+@@ -435,7 +435,7 @@
+   rewind (fp);
+   
+   imap_munge_mbox_name (mbox, sizeof (mbox), mailbox);
+-  snprintf (buf, sizeof (buf), "APPEND %s (\\Seen) {%d}", mbox, len);
++  snprintf (buf, sizeof (buf), "APPEND %s (\\Seen) {%lu}", mbox, (unsigned long)len);
+ 
+   imap_cmd_start (idata, buf);
+ 

Eigenschaftsänderungen: head/mail/mutt14/files/patch-message.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->jgh 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jun 3 23:10:09 UTC 2013 
Responsible-Changed-Why:  
jgh@ wants this port PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179281 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Jun 3 23:10:10 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: udo.schweigert@siemens.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/179281: [PATCH] mail/mutt14: optionsNG conversion; fix IMAP format string
Date: Mon, 3 Jun 2013 23:10:10 UT

 Maintainer of mail/mutt14,
 
 Please note that PR ports/179281 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/179281
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/179281: commit references a PR
Date: Tue,  4 Jun 2013 21:00:33 +0000 (UTC)

 Author: bapt
 Date: Tue Jun  4 21:00:21 2013
 New Revision: 319903
 URL: http://svnweb.freebsd.org/changeset/ports/319903
 
 Log:
   Exclude SGML_DOCS properly in case arch is alpha and in case MUTT_LITE is defined
   
   PR:		ports/179281
   Submitted by:	mandree
 
 Modified:
   head/mail/mutt14/Makefile
 
 Modified: head/mail/mutt14/Makefile
 ==============================================================================
 --- head/mail/mutt14/Makefile	Tue Jun  4 20:00:06 2013	(r319902)
 +++ head/mail/mutt14/Makefile	Tue Jun  4 21:00:21 2013	(r319903)
 @@ -34,6 +34,14 @@ MUTT_ICONV_DESC=	mutt iconv
  
  USE_OPENSSL=	yes
  
 +.if defined (MUTT_LITE)
 +PKGNAMESUFFIX=	-lite
 +OPTIONS_EXCLUDE=	SGML_DOCS
 +.elif ${ARCH} == "alpha"
 +#  coredump in sgmls
 +OPTIONS_EXCLUDE=	SGML_DOCS
 +.endif
 +
  .include <bsd.port.options.mk>
  
  RUN_DEPENDS=	${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support
 @@ -44,14 +52,6 @@ RUN_DEPENDS+=	ispell:${PORTSDIR}/textpro
  		urlview:${PORTSDIR}/textproc/urlview
  .endif
  
 -.if defined (MUTT_LITE)
 -PKGNAMESUFFIX=	-lite
 -WITH_SGML_DOCS:=no
 -.elif ${ARCH} == "alpha"
 -#  coredump in sgmls
 -WITH_SGML_DOCS:=no
 -.endif
 -
  .if ${PORT_OPTIONS:MNLS}
  USES+=		gettext iconv
  .if ! ${PORT_OPTIONS:MMUTT_ICONV}
 _______________________________________________
 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"
 
Responsible-Changed-From-To: jgh->bapt 
Responsible-Changed-By: jgh 
Responsible-Changed-When: Sun Jun 9 03:41:44 UTC 2013 
Responsible-Changed-Why:  
over for follow-up 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179281 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 29 04:42:29 UTC 2014 
State-Changed-Why:  
already committed Tue Jun 4 21:00:21 2013. 


Responsible-Changed-From-To: bapt->jgh 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 29 04:42:29 UTC 2014 
Responsible-Changed-Why:  

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