Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Jun 2013 01:06:56 +0200
From:      Matthias Andree <mandree@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        udo.schweigert@siemens.com
Subject:   ports/179281: [PATCH] mail/mutt14: optionsNG conversion; fix IMAP format string
Message-ID:  <E1Ujdq4-0009D2-Fe@apollo.emma.line.org>
Resent-Message-ID: <201306032310.r53NA02P062272@freefall.freebsd.org>

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

>Number:         179281
>Category:       ports
>Synopsis:       [PATCH] mail/mutt14: optionsNG conversion; fix IMAP format string
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 03 23:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Ujdq4-0009D2-Fe>