View | Details | Raw Unified | Return to bug 209224
Collapse All | Expand All

(-)./Makefile (-9 / +4 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/mail/mutt/Makefile 413182 2016-04-13 09:57:03Z pi $
2
# $FreeBSD: head/mail/mutt/Makefile 413182 2016-04-13 09:57:03Z pi $
3
3
4
PORTNAME=	mutt
4
PORTNAME=	mutt
5
PORTVERSION=	1.6.0
5
PORTVERSION=	1.6.1
6
PORTREVISION?=	2
6
PORTREVISION?=	0
7
CATEGORIES+=	mail ipv6
7
CATEGORIES+=	mail ipv6
8
MASTER_SITES=	ftp://ftp.mutt.org/pub/mutt/ \
8
MASTER_SITES=	ftp://ftp.mutt.org/pub/mutt/ \
9
		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
9
		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
Lines 211-216 Link Here
211
.include <bsd.port.options.mk>
211
.include <bsd.port.options.mk>
212
212
213
DW_PATCH_VERSION=	1.5.6
213
DW_PATCH_VERSION=	1.5.6
214
VVV_PATCH_VERSION:=	1.6.0
215
RR_PATCH_VERSION:=	1.6.0
214
.if !defined(VVV_PATCH_VERSION)
216
.if !defined(VVV_PATCH_VERSION)
215
VVV_PATCH_VERSION=	${PORTVERSION}
217
VVV_PATCH_VERSION=	${PORTVERSION}
216
.endif
218
.endif
Lines 237-249 Link Here
237
239
238
PATCH_DIST_STRIP=	-p1
240
PATCH_DIST_STRIP=	-p1
239
241
240
.if defined (LITE)
241
pre-patch:
242
.else
243
pre-patch-ICONV-off:
244
.endif
245
	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-idna_no_iconv
246
247
pre-patch-PARENT_CHILD_MATCH_PATCH-on:
242
pre-patch-PARENT_CHILD_MATCH_PATCH-on:
248
	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-parent-child-match
243
	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-parent-child-match
249
244
(-)./distinfo (-2 / +2 lines)
Lines 1-5 Link Here
1
SHA256 (mutt/mutt-1.6.0.tar.gz) = 29afb6238ab7a540c0e3a78ce25c970f975ab6c0f0bc9f919993aab772136c19
1
SHA256 (mutt/mutt-1.6.1.tar.gz) = 98b26cecc6b1713082fc880344fa345c20bd7ded6459abe18c84429c7cf8ed20
2
SIZE (mutt/mutt-1.6.0.tar.gz) = 3954591
2
SIZE (mutt/mutt-1.6.1.tar.gz) = 3956840
3
SHA256 (mutt/patch-1.6.0.rr.compressed.gz) = c57ad6b19b2dbd812c27a098273b68b2d3b45ce2d36c3a4bff3493ad2cb75b85
3
SHA256 (mutt/patch-1.6.0.rr.compressed.gz) = c57ad6b19b2dbd812c27a098273b68b2d3b45ce2d36c3a4bff3493ad2cb75b85
4
SIZE (mutt/patch-1.6.0.rr.compressed.gz) = 9977
4
SIZE (mutt/patch-1.6.0.rr.compressed.gz) = 9977
5
SHA256 (mutt/patch-1.6.0.vvv.nntp.gz) = 6a69429c2942f438d5c22cfc3f97564bbbf689b2ea482d440692048bd92f5355
5
SHA256 (mutt/patch-1.6.0.vvv.nntp.gz) = 6a69429c2942f438d5c22cfc3f97564bbbf689b2ea482d440692048bd92f5355
(-)./files/extra-patch-idna_no_iconv (-134 lines)
Lines 1-134 Link Here
1
# HG changeset patch
2
# User Kevin McCarthy <kevin@8t8.us>
3
# Date 1459891896 25200
4
#      Tue Apr 05 14:31:36 2016 -0700
5
# Branch stable
6
# Node ID f7db9cefd3b0e10f0136ec8c07190a8a2f6ce697
7
# Parent  b983eb6c1a044c8cda5cbdc02a8e84acb946fb99
8
Fix IDNA functions for systems without iconv.
9
10
The IDNA changes for SMTPUTF8 support introduced a bug for systems
11
without iconv.  For those systems, the local<->intl functions would
12
return an error due to the charset conversion failing.
13
14
Change mutt_idna.c back to being conditionally compiled, but this time
15
based on HAVE_ICONV.  If there is no iconv, stub out the functions in
16
mutt_idna.h.
17
18
diff --git a/Makefile.am b/Makefile.am
19
--- a/Makefile.am
20
+++ b/Makefile.am
21
@@ -28,17 +28,17 @@
22
 	edit.c enter.c flags.c init.c filter.c from.c \
23
 	getdomain.c group.c \
24
 	handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
25
 	main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
26
 	postpone.c query.c recvattach.c recvcmd.c \
27
 	rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
28
 	score.c send.c sendlib.c signal.c sort.c \
29
 	status.c system.c thread.c charset.c history.c lib.c \
30
-	muttlib.c editmsg.c mbyte.c mutt_idna.c \
31
+	muttlib.c editmsg.c mbyte.c \
32
 	url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c
33
 
34
 nodist_mutt_SOURCES = $(BUILT_SOURCES)
35
 
36
 mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAP) $(MUTTLIBS) \
37
 	$(INTLLIBS) $(LIBICONV)  $(GPGME_LIBS)
38
 
39
 mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \
40
@@ -48,17 +48,17 @@
41
 	-DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
42
 	-DHAVE_CONFIG_H=1
43
 
44
 AM_CPPFLAGS=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(GPGME_CFLAGS) -Iintl
45
 
46
 EXTRA_mutt_SOURCES = account.c bcache.c crypt-gpgme.c crypt-mod-pgp-classic.c \
47
 	crypt-mod-pgp-gpgme.c crypt-mod-smime-classic.c \
48
 	crypt-mod-smime-gpgme.c dotlock.c gnupgparse.c hcache.c md5.c \
49
-	mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
50
+	mutt_idna.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
51
 	mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \
52
 	pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \
53
 	smime.c smtp.c utf8.c wcwidth.c \
54
 	bcache.h browser.h hcache.h mbyte.h mutt_idna.h remailer.h url.h
55
 
56
 EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
57
 	configure account.h \
58
 	attach.h buffy.h charset.h copy.h crypthash.h dotlock.h functions.h gen_defs \
59
diff --git a/configure.ac b/configure.ac
60
--- a/configure.ac
61
+++ b/configure.ac
62
@@ -1159,16 +1159,23 @@
63
   AC_CHECK_FUNCS(bind_textdomain_codeset)
64
   LIBS="$mutt_save_LIBS"
65
 fi
66
 
67
 fi # libiconv
68
 
69
 dnl -- IDN depends on iconv
70
 
71
+dnl mutt_idna.c will perform charset transformations (for smtputf8
72
+dnl support) as long as at least iconv is installed.  If there is no
73
+dnl iconv, then it doesn't need to be included in the build.
74
+if test "$am_cv_func_iconv" = yes; then
75
+  MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o"
76
+fi
77
+
78
 AC_ARG_WITH(idn, AS_HELP_STRING([--with-idn=@<:@PFX@:>@],[Use GNU libidn for internationalized domain names]),
79
 		 [
80
 		  if test "$with_idn" != "no" ; then
81
 		  	if test "$with_idn" != "yes" ; then
82
 			   CPPFLAGS="$CPPFLAGS -I$with_idn/include"
83
 			   LDFLAGS="$LDFLAGS -L$with_idn/lib"
84
 			fi
85
 		  fi
86
diff --git a/mutt_idna.h b/mutt_idna.h
87
--- a/mutt_idna.h
88
+++ b/mutt_idna.h
89
@@ -40,18 +40,45 @@
90
 #  define idna_to_ascii_lz(a,b,c) idna_to_ascii_from_locale(a,b,(c)&1,((c)&2)?1:0)
91
 # endif
92
 # if (!defined(HAVE_IDNA_TO_UNICODE_8Z8Z) && defined(HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8))
93
 #  define idna_to_unicode_8z8z(a,b,c) idna_to_unicode_utf8_from_utf8(a,b,(c)&1,((c)&2)?1:0)
94
 # endif
95
 #endif /* HAVE_LIBIDN */
96
 
97
 
98
+#ifdef HAVE_ICONV
99
 int mutt_addrlist_to_intl (ADDRESS *, char **);
100
 int mutt_addrlist_to_local (ADDRESS *);
101
 
102
 void mutt_env_to_local (ENVELOPE *);
103
 int mutt_env_to_intl (ENVELOPE *, char **, char **);
104
 
105
 const char *mutt_addr_for_display (ADDRESS *a);
106
+#else
107
+static inline int mutt_addrlist_to_intl (ADDRESS *addr, char **err)
108
+{
109
+  return 0;
110
+}
111
+
112
+static inline int mutt_addrlist_to_local (ADDRESS *addr)
113
+{
114
+  return 0;
115
+}
116
+
117
+static inline void mutt_env_to_local (ENVELOPE *env)
118
+{
119
+  return;
120
+}
121
+
122
+static inline int mutt_env_to_intl (ENVELOPE *env, char **tag, char **err)
123
+{
124
+  return 0;
125
+}
126
+
127
+static inline const char *mutt_addr_for_display (ADDRESS *a)
128
+{
129
+  return a->mailbox;
130
+}
131
+#endif /* HAVE_LIBICONV */
132
 
133
 
134
 #endif

Return to bug 209224