View | Details | Raw Unified | Return to bug 208658 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-5 / +11 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	mutt
4
PORTNAME=	mutt
5
PORTVERSION=	1.6.0
5
PORTVERSION=	1.6.0
6
PORTREVISION?=	0
6
PORTREVISION?=	1
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 40-46 Link Here
40
CONFIGURE_ARGS+=	${MUTT_CONFIGURE_ARGS}
40
CONFIGURE_ARGS+=	${MUTT_CONFIGURE_ARGS}
41
.endif
41
.endif
42
42
43
USE_AUTOTOOLS=	automake autoconf
43
USES+=		autoreconf
44
GNU_CONFIGURE=	yes
44
AUTOMAKE_ARGS=	--add-missing --foreign
45
AUTOMAKE_ARGS=	--add-missing --foreign
45
USE_OPENSSL=	yes
46
USE_OPENSSL=	yes
46
47
Lines 77-82 Link Here
77
GPGME_DESC=	Gpgme interface
78
GPGME_DESC=	Gpgme interface
78
GREETING_PATCH_DESC=	Greeting support
79
GREETING_PATCH_DESC=	Greeting support
79
HTML_DESC=	HTML documentation
80
HTML_DESC=	HTML documentation
81
IDN_DESC+=	International Domain Names (implies ICONV)
80
IFDEF_PATCH_DESC=	ifdef feature
82
IFDEF_PATCH_DESC=	ifdef feature
81
IMAP_HEADER_CACHE_DESC=	IMAP header cache
83
IMAP_HEADER_CACHE_DESC=	IMAP header cache
82
LOCALES_FIX_DESC=	Locales fix
84
LOCALES_FIX_DESC=	Locales fix
Lines 85-91 Link Here
85
MAILDIR_MTIME_PATCH_DESC=	Maildir mtime patch
87
MAILDIR_MTIME_PATCH_DESC=	Maildir mtime patch
86
MIXMASTER_DESC=	Mixmaster support
88
MIXMASTER_DESC=	Mixmaster support
87
NCURSES_DESC=	Ncurses support
89
NCURSES_DESC=	Ncurses support
88
NLS_DESC=	Native language support
90
NLS_DESC=	Native language support (implies ICONV)
89
PARENT_CHILD_MATCH_PATCH_DESC=	Parent/child match
91
PARENT_CHILD_MATCH_PATCH_DESC=	Parent/child match
90
QUOTE_PATCH_DESC=	Extended quoting
92
QUOTE_PATCH_DESC=	Extended quoting
91
REVERSE_REPLY_PATCH_DESC=	Reverse_reply
93
REVERSE_REPLY_PATCH_DESC=	Reverse_reply
Lines 126-132 Link Here
126
PLIST_SUB+=	NNTP="@comment "
128
PLIST_SUB+=	NNTP="@comment "
127
# XXX bug in bpm ?
129
# XXX bug in bpm ?
128
PLIST_SUB+=	NLS="@comment "
130
PLIST_SUB+=	NLS="@comment "
129
CONFIGURE_ARGS+=	--disable-nls
131
CONFIGURE_ARGS+=	--disable-nls --disable-iconv --without-idn
130
.endif
132
.endif
131
133
132
DEBUG_CONFIGURE_ON=	--enable-debug
134
DEBUG_CONFIGURE_ON=	--enable-debug
Lines 140-145 Link Here
140
142
141
NLS_USES=	gettext
143
NLS_USES=	gettext
142
NLS_CONFIGURE_OFF=	--disable-nls
144
NLS_CONFIGURE_OFF=	--disable-nls
145
NLS_IMPLIES= 	ICONV
143
146
144
# Handle GSSAPI from various places
147
# Handle GSSAPI from various places
145
GSSAPI_BASE_USES=	gssapi
148
GSSAPI_BASE_USES=	gssapi
Lines 176-181 Link Here
176
IDN_LIB_DEPENDS=	libidn.so:dns/libidn
179
IDN_LIB_DEPENDS=	libidn.so:dns/libidn
177
IDN_CONFIGURE_ON=	--with-idn
180
IDN_CONFIGURE_ON=	--with-idn
178
IDN_CONFIGURE_OFF=	--without-idn
181
IDN_CONFIGURE_OFF=	--without-idn
182
IDN_IMPLIES= 	ICONV
179
183
180
GPGME_LIB_DEPENDS=	libgpgme.so:security/gpgme
184
GPGME_LIB_DEPENDS=	libgpgme.so:security/gpgme
181
GPGME_CONFIGURE_ON=	--enable-gpgme
185
GPGME_CONFIGURE_ON=	--enable-gpgme
Lines 233-238 Link Here
233
237
234
PATCH_DIST_STRIP=	-p1
238
PATCH_DIST_STRIP=	-p1
235
239
240
pre-patch-ICONV-off:
241
	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-idna_no_iconv
242
236
pre-patch-PARENT_CHILD_MATCH_PATCH-on:
243
pre-patch-PARENT_CHILD_MATCH_PATCH-on:
237
	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-parent-child-match
244
	@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-parent-child-match
238
245
Lines 298-304 Link Here
298
		${WRKSRC}/contrib/Makefile.am
305
		${WRKSRC}/contrib/Makefile.am
299
306
300
pre-configure::
307
pre-configure::
301
	@(cd ${WRKSRC}; ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} -I m4)
302
	@${RM} -f ${WRKSRC}/missing
308
	@${RM} -f ${WRKSRC}/missing
303
.if defined(WITH_KRB5_SYS)
309
.if defined(WITH_KRB5_SYS)
304
	@${ECHO_CMD} "#define HAVE_HEIMDAL" >> ${WRKSRC}/config.h.in
310
	@${ECHO_CMD} "#define HAVE_HEIMDAL" >> ${WRKSRC}/config.h.in
(-)./files/extra-patch-idna_no_iconv (+134 lines)
Line 0 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 208658