From 66008858522e1c125dec7536a6519be35026992e Mon Sep 17 00:00:00 2001 From: Rong-En Fan Date: Sat, 14 Apr 2012 12:51:34 +0000 Subject: [PATCH] - Fix build post mail/mutt-devel upgrade. The patch-nbsp from master port now conflicts with our own patch-zh-mutt, so have to move the patch into post-patch section --- chinese/mutt/Makefile | 6 ++- chinese/mutt/files/patch-zh-mutt | 90 ++++++++++++++++---------------- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/chinese/mutt/Makefile b/chinese/mutt/Makefile index 168fcfa06946..251d242a9250 100644 --- a/chinese/mutt/Makefile +++ b/chinese/mutt/Makefile @@ -26,8 +26,6 @@ LIB_DEPENDS+= hz.0:${PORTSDIR}/chinese/autoconvert CFLAGS+= -D_DONT_USE_CTYPE_INLINE_ LDFLAGS+= -lhz -EXTRA_PATCHES+= ${.CURDIR}/files/patch-* - WITH_MUTT_LOCALES_FIX= yes WITH_MUTT_NCURSES= yes .if !defined(PACKAGE_BUILDING) @@ -42,5 +40,9 @@ PKGMESSAGE= ${.CURDIR}/pkg-message post-patch:: @${REINPLACE_CMD} -e '/^mutt_SOURCES/s/\\$$/ myiconv.c \\/' ${WRKSRC}/Makefile.am + @for i in ${.CURDIR}/files/patch-*; do \ + ${ECHO_MSG} "===> Applying extra patch $$i"; \ + ${PATCH} ${PATCH_ARGS} < $$i; \ + done .include "${MASTERDIR}/Makefile" diff --git a/chinese/mutt/files/patch-zh-mutt b/chinese/mutt/files/patch-zh-mutt index 0668a8e30538..7394181fa76f 100644 --- a/chinese/mutt/files/patch-zh-mutt +++ b/chinese/mutt/files/patch-zh-mutt @@ -1,6 +1,6 @@ -diff -ruN ../mutt-1.5.20.orig/init.h ./init.h ---- mutt-1.5.20.orig/init.h 2009-06-14 05:35:21.000000000 +0800 -+++ init.h 2009-06-29 09:52:08.000000000 +0800 +diff -ruN mutt-1.5.21.orig/init.h init.h +--- mutt-1.5.21.orig/init.h 2012-04-14 20:39:48.000000000 +0800 ++++ init.h 2012-04-14 20:39:52.000000000 +0800 @@ -287,6 +287,11 @@ ** .pp ** Also see $$fast_reply. @@ -13,7 +13,7 @@ diff -ruN ../mutt-1.5.20.orig/init.h ./init.h { "beep", DT_BOOL, R_NONE, OPTBEEP, 1 }, /* ** .pp -@@ -2435,7 +2440,7 @@ +@@ -2468,7 +2473,7 @@ ** For the pager, this variable specifies the number of lines shown ** before search results. By default, search results will be top-aligned. */ @@ -22,7 +22,7 @@ diff -ruN ../mutt-1.5.20.orig/init.h ./init.h /* ** .pp ** A colon-delimited list of character sets for outgoing messages. Mutt will use the -@@ -3205,7 +3210,7 @@ +@@ -3251,7 +3256,7 @@ ** When \fIset\fP, Mutt will jump to the next unread message, if any, ** when the current thread is \fIun\fPcollapsed. */ @@ -31,9 +31,9 @@ diff -ruN ../mutt-1.5.20.orig/init.h ./init.h /* ** .pp ** \fBWarning:\fP do not set this variable unless you are using a version -diff -ruN ../mutt-1.5.20.orig/mbyte.c ./mbyte.c ---- mutt-1.5.20.orig/mbyte.c 2009-01-05 06:53:54.000000000 +0800 -+++ mbyte.c 2009-06-29 09:51:38.000000000 +0800 +diff -ruN mutt-1.5.21.orig/mbyte.c mbyte.c +--- mutt-1.5.21.orig/mbyte.c 2012-04-14 20:39:48.000000000 +0800 ++++ mbyte.c 2012-04-14 20:39:52.000000000 +0800 @@ -24,6 +24,9 @@ # include "config.h" #endif @@ -93,7 +93,7 @@ diff -ruN ../mutt-1.5.20.orig/mbyte.c ./mbyte.c return (9 <= wc && wc <= 13) || wc == 32; else return (0 <= wc && wc < 256) ? isspace (wc) : 0; -@@ -345,7 +358,7 @@ +@@ -347,7 +360,7 @@ wint_t towupper (wint_t wc) { @@ -102,7 +102,7 @@ diff -ruN ../mutt-1.5.20.orig/mbyte.c ./mbyte.c return towupper_ucs (wc); else return (0 <= wc && wc < 256) ? toupper (wc) : wc; -@@ -353,7 +366,7 @@ +@@ -355,7 +368,7 @@ wint_t towlower (wint_t wc) { @@ -111,7 +111,7 @@ diff -ruN ../mutt-1.5.20.orig/mbyte.c ./mbyte.c return towlower_ucs (wc); else return (0 <= wc && wc < 256) ? tolower (wc) : wc; -@@ -361,7 +374,7 @@ +@@ -363,7 +376,7 @@ int iswalnum (wint_t wc) { @@ -120,7 +120,7 @@ diff -ruN ../mutt-1.5.20.orig/mbyte.c ./mbyte.c return iswalnum_ucs (wc); else return (0 <= wc && wc < 256) ? isalnum (wc) : 0; -@@ -402,13 +415,31 @@ +@@ -404,13 +417,31 @@ return -1; } @@ -153,7 +153,7 @@ diff -ruN ../mutt-1.5.20.orig/mbyte.c ./mbyte.c { /* 8-bit case */ if (!wc) -@@ -418,13 +449,6 @@ +@@ -420,13 +451,6 @@ else return -1; } @@ -167,10 +167,10 @@ diff -ruN ../mutt-1.5.20.orig/mbyte.c ./mbyte.c } return wcwidth_ucs (wc); } -diff -ruN ../mutt-1.5.20.orig/mutt.h ./mutt.h ---- mutt-1.5.20.orig/mutt.h 2009-06-13 06:15:42.000000000 +0800 -+++ mutt.h 2009-06-29 09:51:38.000000000 +0800 -@@ -322,6 +322,7 @@ +diff -ruN mutt-1.5.21.orig/mutt.h mutt.h +--- mutt-1.5.21.orig/mutt.h 2012-04-14 20:39:48.000000000 +0800 ++++ mutt.h 2012-04-14 20:39:52.000000000 +0800 +@@ -324,6 +324,7 @@ OPTATTACHSPLIT, OPTAUTOEDIT, OPTAUTOTAG, @@ -178,9 +178,9 @@ diff -ruN ../mutt-1.5.20.orig/mutt.h ./mutt.h OPTBEEP, OPTBEEPNEW, OPTBOUNCEDELIVERED, -diff -ruN ../mutt-1.5.20.orig/myiconv.c ./myiconv.c ---- mutt-1.5.20.orig/myiconv.c 1970-01-01 08:00:00.000000000 +0800 -+++ myiconv.c 2009-06-29 09:51:38.000000000 +0800 +diff -ruN mutt-1.5.21.orig/myiconv.c myiconv.c +--- mutt-1.5.21.orig/myiconv.c 1970-01-01 08:00:00.000000000 +0800 ++++ myiconv.c 2012-04-14 20:39:52.000000000 +0800 @@ -0,0 +1,167 @@ +/* + * Contributed by Kuang-che Wu @@ -349,9 +349,9 @@ diff -ruN ../mutt-1.5.20.orig/myiconv.c ./myiconv.c +} + +#endif -diff -ruN ../mutt-1.5.20.orig/pager.c ./pager.c ---- mutt-1.5.20.orig/pager.c 2009-06-04 04:48:31.000000000 +0800 -+++ pager.c 2009-06-29 09:51:38.000000000 +0800 +diff -ruN mutt-1.5.21.orig/pager.c pager.c +--- mutt-1.5.21.orig/pager.c 2012-04-14 20:39:48.000000000 +0800 ++++ pager.c 2012-04-14 20:40:25.000000000 +0800 @@ -20,6 +20,10 @@ # include "config.h" #endif @@ -363,7 +363,7 @@ diff -ruN ../mutt-1.5.20.orig/pager.c ./pager.c #include "mutt.h" #include "mutt_curses.h" #include "mutt_regex.h" -@@ -1066,7 +1070,7 @@ +@@ -1091,7 +1095,7 @@ { int space = -1; /* index of the last space or TAB */ int col = option (OPTMARKERS) ? (*lineInfo)[n].continuation : 0; @@ -371,11 +371,11 @@ diff -ruN ../mutt-1.5.20.orig/pager.c ./pager.c + int ch, vch, k, last_special = -1, special = 0, t = 0, old_t = 0; wchar_t wc; mbstate_t mbstate; - -@@ -1164,7 +1168,10 @@ - { - if (wc == ' ') - space = ch; + int wrap_cols = mutt_term_width ((flags & M_PAGER_NOWRAP) ? 0 : Wrap); +@@ -1198,7 +1202,10 @@ + * attempt to wrap at this character. */ + wc = ' '; + } + old_t = t; t = wcwidth (wc); + if(t > 1 || old_t > 1) @@ -383,7 +383,7 @@ diff -ruN ../mutt-1.5.20.orig/pager.c ./pager.c if (col + t > wrap_cols) break; col += t; -@@ -1385,6 +1392,7 @@ +@@ -1420,6 +1427,7 @@ { buf_ptr = buf + ch; /* skip trailing blanks */ @@ -391,9 +391,9 @@ diff -ruN ../mutt-1.5.20.orig/pager.c ./pager.c while (ch && (buf[ch] == ' ' || buf[ch] == '\t' || buf[ch] == '\r')) ch--; /* a very long word with leading spaces causes infinite wrapping */ -diff -ruN ../mutt-1.5.20.orig/parse.c ./parse.c ---- mutt-1.5.20.orig/parse.c 2009-06-02 00:29:32.000000000 +0800 -+++ parse.c 2009-06-29 09:51:38.000000000 +0800 +diff -ruN mutt-1.5.21.orig/parse.c parse.c +--- mutt-1.5.21.orig/parse.c 2012-04-14 20:39:48.000000000 +0800 ++++ parse.c 2012-04-14 20:39:52.000000000 +0800 @@ -381,7 +381,10 @@ s++; SKIPWS (s); @@ -406,21 +406,21 @@ diff -ruN ../mutt-1.5.20.orig/parse.c ./parse.c if ((s = mutt_get_parameter ("name", parms))) ct->form_name = safe_strdup (s); mutt_free_parameter (&parms); -diff -ruN ../mutt-1.5.20.orig/pgp.c ./pgp.c ---- mutt-1.5.20.orig/pgp.c 2009-05-31 01:20:08.000000000 +0800 -+++ pgp.c 2009-06-29 09:51:38.000000000 +0800 -@@ -1024,7 +1024,7 @@ +diff -ruN mutt-1.5.21.orig/pgp.c pgp.c +--- mutt-1.5.21.orig/pgp.c 2012-04-14 20:39:48.000000000 +0800 ++++ pgp.c 2012-04-14 20:39:52.000000000 +0800 +@@ -1033,7 +1033,7 @@ int empty = 1; pid_t thepid; - convert_to_7bit (a); /* Signed data _must_ be in 7-bit format. */ + if (!option(OPTBBSISLAME)) convert_to_7bit (a); /* Signed data _must_ be in 7-bit format. */ - mutt_mktemp (sigfile); + mutt_mktemp (sigfile, sizeof (sigfile)); if ((fp = safe_fopen (sigfile, "w")) == NULL) -diff -ruN ../mutt-1.5.20.orig/po/zh_TW.po ./po/zh_TW.po ---- po/zh_TW.po.orig 2010-09-16 01:10:03.000000000 +0800 -+++ po/zh_TW.po 2010-09-27 04:14:32.000000000 +0800 +diff -ruN mutt-1.5.21.orig/po/zh_TW.po po/zh_TW.po +--- mutt-1.5.21.orig/po/zh_TW.po 2012-04-14 20:39:48.000000000 +0800 ++++ po/zh_TW.po 2012-04-14 20:39:52.000000000 +0800 @@ -1820,7 +1820,7 @@ "~w 檔案\t\t將訊息寫入檔案\n" "~x\t\t停止修改並離開編輯器\n" @@ -480,10 +480,10 @@ diff -ruN ../mutt-1.5.20.orig/po/zh_TW.po ./po/zh_TW.po #: ../keymap_alldefs.h:198 msgid "send the message through a mixmaster remailer chain" -diff -ruN ../mutt-1.5.20.orig/sendlib.c ./sendlib.c ---- mutt-1.5.20.orig/sendlib.c 2009-06-14 23:46:11.000000000 +0800 -+++ sendlib.c 2009-06-29 09:51:38.000000000 +0800 -@@ -2383,7 +2383,7 @@ +diff -ruN mutt-1.5.21.orig/sendlib.c sendlib.c +--- mutt-1.5.21.orig/sendlib.c 2012-04-14 20:39:48.000000000 +0800 ++++ sendlib.c 2012-04-14 20:39:52.000000000 +0800 +@@ -2477,7 +2477,7 @@ rfc2047_encode_adrlist (env->reply_to, "Reply-To"); rfc2047_encode_string (&env->x_label);