Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Apr 2016 12:53:26 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r412928 - in head/mail/mutt: . files
Message-ID:  <201604101253.u3ACrQmN002117@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sun Apr 10 12:53:26 2016
New Revision: 412928
URL: https://svnweb.freebsd.org/changeset/ports/412928

Log:
  mail/mutt: some fixes
  
  - changed from USE_AUTOTOOLS (deprecated) to USES=autoreconf
  - mutt-lite slave port fix for no-libiconv-case
  
  PR:		208658
  Submitted by:	Udo Schweigert <Udo.Schweigert@siemens.com> (maintainer)

Added:
  head/mail/mutt/files/extra-patch-idna_no_iconv   (contents, props changed)
Modified:
  head/mail/mutt/Makefile

Modified: head/mail/mutt/Makefile
==============================================================================
--- head/mail/mutt/Makefile	Sun Apr 10 12:41:14 2016	(r412927)
+++ head/mail/mutt/Makefile	Sun Apr 10 12:53:26 2016	(r412928)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mutt
 PORTVERSION=	1.6.0
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES+=	mail ipv6
 MASTER_SITES=	ftp://ftp.mutt.org/pub/mutt/ \
 		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
@@ -40,7 +40,8 @@ SHEBANG_FILES=	doc/gen-map-doc smime_key
 CONFIGURE_ARGS+=	${MUTT_CONFIGURE_ARGS}
 .endif
 
-USE_AUTOTOOLS=	automake autoconf
+USES+=		autoreconf
+GNU_CONFIGURE=	yes
 AUTOMAKE_ARGS=	--add-missing --foreign
 USE_OPENSSL=	yes
 
@@ -77,6 +78,7 @@ FORCEBASE64_DESC=	Option to force base64
 GPGME_DESC=	Gpgme interface
 GREETING_PATCH_DESC=	Greeting support
 HTML_DESC=	HTML documentation
+IDN_DESC+=	International Domain Names (implies ICONV)
 IFDEF_PATCH_DESC=	ifdef feature
 IMAP_HEADER_CACHE_DESC=	IMAP header cache
 LOCALES_FIX_DESC=	Locales fix
@@ -85,7 +87,7 @@ MAILDIR_HEADER_CACHE_DESC=	Maildir heade
 MAILDIR_MTIME_PATCH_DESC=	Maildir mtime patch
 MIXMASTER_DESC=	Mixmaster support
 NCURSES_DESC=	Ncurses support
-NLS_DESC=	Native language support
+NLS_DESC=	Native language support (implies ICONV)
 PARENT_CHILD_MATCH_PATCH_DESC=	Parent/child match
 QUOTE_PATCH_DESC=	Extended quoting
 REVERSE_REPLY_PATCH_DESC=	Reverse_reply
@@ -126,7 +128,7 @@ PLIST_SUB+=	XML="@comment "
 PLIST_SUB+=	NNTP="@comment "
 # XXX bug in bpm ?
 PLIST_SUB+=	NLS="@comment "
-CONFIGURE_ARGS+=	--disable-nls
+CONFIGURE_ARGS+=	--disable-nls --disable-iconv --without-idn
 .endif
 
 DEBUG_CONFIGURE_ON=	--enable-debug
@@ -140,6 +142,7 @@ NCURSES_USES=	ncurses
 
 NLS_USES=	gettext
 NLS_CONFIGURE_OFF=	--disable-nls
+NLS_IMPLIES= 	ICONV
 
 # Handle GSSAPI from various places
 GSSAPI_BASE_USES=	gssapi
@@ -176,6 +179,7 @@ LOCALES_FIX_CONFIGURE_ON=	--enable-local
 IDN_LIB_DEPENDS=	libidn.so:dns/libidn
 IDN_CONFIGURE_ON=	--with-idn
 IDN_CONFIGURE_OFF=	--without-idn
+IDN_IMPLIES= 	ICONV
 
 GPGME_LIB_DEPENDS=	libgpgme.so:security/gpgme
 GPGME_CONFIGURE_ON=	--enable-gpgme
@@ -233,6 +237,9 @@ LDFLAGS+=		${LDFLAGS_ADD}
 
 PATCH_DIST_STRIP=	-p1
 
+pre-patch-ICONV-off:
+	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-idna_no_iconv
+
 pre-patch-PARENT_CHILD_MATCH_PATCH-on:
 	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-parent-child-match
 
@@ -298,7 +305,6 @@ post-patch::
 		${WRKSRC}/contrib/Makefile.am
 
 pre-configure::
-	@(cd ${WRKSRC}; ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} -I m4)
 	@${RM} -f ${WRKSRC}/missing
 .if defined(WITH_KRB5_SYS)
 	@${ECHO_CMD} "#define HAVE_HEIMDAL" >> ${WRKSRC}/config.h.in

Added: head/mail/mutt/files/extra-patch-idna_no_iconv
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mutt/files/extra-patch-idna_no_iconv	Sun Apr 10 12:53:26 2016	(r412928)
@@ -0,0 +1,134 @@
+# HG changeset patch
+# User Kevin McCarthy <kevin@8t8.us>
+# Date 1459891896 25200
+#      Tue Apr 05 14:31:36 2016 -0700
+# Branch stable
+# Node ID f7db9cefd3b0e10f0136ec8c07190a8a2f6ce697
+# Parent  b983eb6c1a044c8cda5cbdc02a8e84acb946fb99
+Fix IDNA functions for systems without iconv.
+
+The IDNA changes for SMTPUTF8 support introduced a bug for systems
+without iconv.  For those systems, the local<->intl functions would
+return an error due to the charset conversion failing.
+
+Change mutt_idna.c back to being conditionally compiled, but this time
+based on HAVE_ICONV.  If there is no iconv, stub out the functions in
+mutt_idna.h.
+
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -28,17 +28,17 @@
+ 	edit.c enter.c flags.c init.c filter.c from.c \
+ 	getdomain.c group.c \
+ 	handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
+ 	main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
+ 	postpone.c query.c recvattach.c recvcmd.c \
+ 	rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
+ 	score.c send.c sendlib.c signal.c sort.c \
+ 	status.c system.c thread.c charset.c history.c lib.c \
+-	muttlib.c editmsg.c mbyte.c mutt_idna.c \
++	muttlib.c editmsg.c mbyte.c \
+ 	url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c
+ 
+ nodist_mutt_SOURCES = $(BUILT_SOURCES)
+ 
+ mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAP) $(MUTTLIBS) \
+ 	$(INTLLIBS) $(LIBICONV)  $(GPGME_LIBS)
+ 
+ mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \
+@@ -48,17 +48,17 @@
+ 	-DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
+ 	-DHAVE_CONFIG_H=1
+ 
+ AM_CPPFLAGS=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(GPGME_CFLAGS) -Iintl
+ 
+ EXTRA_mutt_SOURCES = account.c bcache.c crypt-gpgme.c crypt-mod-pgp-classic.c \
+ 	crypt-mod-pgp-gpgme.c crypt-mod-smime-classic.c \
+ 	crypt-mod-smime-gpgme.c dotlock.c gnupgparse.c hcache.c md5.c \
+-	mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
++	mutt_idna.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
+ 	mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \
+ 	pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \
+ 	smime.c smtp.c utf8.c wcwidth.c \
+ 	bcache.h browser.h hcache.h mbyte.h mutt_idna.h remailer.h url.h
+ 
+ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
+ 	configure account.h \
+ 	attach.h buffy.h charset.h copy.h crypthash.h dotlock.h functions.h gen_defs \
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -1159,16 +1159,23 @@
+   AC_CHECK_FUNCS(bind_textdomain_codeset)
+   LIBS="$mutt_save_LIBS"
+ fi
+ 
+ fi # libiconv
+ 
+ dnl -- IDN depends on iconv
+ 
++dnl mutt_idna.c will perform charset transformations (for smtputf8
++dnl support) as long as at least iconv is installed.  If there is no
++dnl iconv, then it doesn't need to be included in the build.
++if test "$am_cv_func_iconv" = yes; then
++  MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o"
++fi
++
+ AC_ARG_WITH(idn, AS_HELP_STRING([--with-idn=@<:@PFX@:>@],[Use GNU libidn for internationalized domain names]),
+ 		 [
+ 		  if test "$with_idn" != "no" ; then
+ 		  	if test "$with_idn" != "yes" ; then
+ 			   CPPFLAGS="$CPPFLAGS -I$with_idn/include"
+ 			   LDFLAGS="$LDFLAGS -L$with_idn/lib"
+ 			fi
+ 		  fi
+diff --git a/mutt_idna.h b/mutt_idna.h
+--- a/mutt_idna.h
++++ b/mutt_idna.h
+@@ -40,18 +40,45 @@
+ #  define idna_to_ascii_lz(a,b,c) idna_to_ascii_from_locale(a,b,(c)&1,((c)&2)?1:0)
+ # endif
+ # if (!defined(HAVE_IDNA_TO_UNICODE_8Z8Z) && defined(HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8))
+ #  define idna_to_unicode_8z8z(a,b,c) idna_to_unicode_utf8_from_utf8(a,b,(c)&1,((c)&2)?1:0)
+ # endif
+ #endif /* HAVE_LIBIDN */
+ 
+ 
++#ifdef HAVE_ICONV
+ int mutt_addrlist_to_intl (ADDRESS *, char **);
+ int mutt_addrlist_to_local (ADDRESS *);
+ 
+ void mutt_env_to_local (ENVELOPE *);
+ int mutt_env_to_intl (ENVELOPE *, char **, char **);
+ 
+ const char *mutt_addr_for_display (ADDRESS *a);
++#else
++static inline int mutt_addrlist_to_intl (ADDRESS *addr, char **err)
++{
++  return 0;
++}
++
++static inline int mutt_addrlist_to_local (ADDRESS *addr)
++{
++  return 0;
++}
++
++static inline void mutt_env_to_local (ENVELOPE *env)
++{
++  return;
++}
++
++static inline int mutt_env_to_intl (ENVELOPE *env, char **tag, char **err)
++{
++  return 0;
++}
++
++static inline const char *mutt_addr_for_display (ADDRESS *a)
++{
++  return a->mailbox;
++}
++#endif /* HAVE_LIBICONV */
+ 
+ 
+ #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604101253.u3ACrQmN002117>