Index: head/chinese/tin/Makefile =================================================================== --- head/chinese/tin/Makefile (revision 361984) +++ head/chinese/tin/Makefile (revision 361985) @@ -1,23 +1,21 @@ # Created by: Yen-Shuo Su # $FreeBSD$ # Don't reset PORTREVISION and keep bumping it even if PORTVERSION is changed. PORTREVISION= 6 CATEGORIES= chinese MAINTAINER= ports@FreeBSD.org -BROKEN= Fails to patch - EXTRA_PATCHES= ${.CURDIR}/files/patch-attrib.c \ ${.CURDIR}/files/patch-cook.c \ ${.CURDIR}/files/patch-mail.c \ ${.CURDIR}/files/patch-init.c MASTERDIR= ${.CURDIR}/../../news/tin post-patch: post-patch-zh post-patch-zh: ${REINPLACE_CMD} -e 's,iso-8859-1,Big5,g' ${WRKSRC}/doc/tin.defaults .include "${MASTERDIR}/Makefile" Index: head/chinese/tin/files/patch-attrib.c =================================================================== --- head/chinese/tin/files/patch-attrib.c (revision 361984) +++ head/chinese/tin/files/patch-attrib.c (revision 361985) @@ -1,12 +1,12 @@ ---- src/attrib.c.orig 2011-09-18 04:55:30.000000000 -0700 -+++ src/attrib.c 2012-01-02 03:14:00.000000000 -0800 -@@ -548,6 +548,9 @@ +--- src/attrib.c.orig 2014-07-16 00:41:51.940655746 +0800 ++++ src/attrib.c 2014-07-16 00:43:36.205651630 +0800 +@@ -583,6 +583,9 @@ add_scope("*"); snprintf(buf, sizeof(buf), "%s", "~/.tin/headers"); set_attrib(OPT_ATTRIB_X_HEADERS, "*", "", buf); + num = 25; + set_attrib(OPT_ATTRIB_MM_NETWORK_CHARSET, "*", "", (char *) &num); + set_attrib(OPT_ATTRIB_UNDECLARED_CHARSET, "*", "", "Big5"); add_scope("*sources*"); num = POST_PROC_SHAR; Index: head/chinese/tin/files/patch-cook.c =================================================================== --- head/chinese/tin/files/patch-cook.c (revision 361984) +++ head/chinese/tin/files/patch-cook.c (revision 361985) @@ -1,15 +1,15 @@ ---- src/cook.c.orig 2011-08-18 03:58:24.288554846 +0800 -+++ src/cook.c 2011-08-18 13:36:23.791151539 +0800 -@@ -472,7 +472,12 @@ - break; /* premature end of file, file error etc. */ +--- src/cook.c.orig 2014-07-16 00:43:47.656653653 +0800 ++++ src/cook.c 2014-07-16 00:47:26.498655673 +0800 +@@ -471,7 +471,12 @@ /* convert network to local charset, tex2iso, iso2asc etc. */ + ncharset = get_param(part->params, "charset"); +#ifndef CHARSET_CONVERSION - process_charsets(&line, &max_line_len, get_param(part->params, "charset"), tinrc.mm_local_charset, curr_group->attribute->tex2iso_conv && art->tex2iso); + process_charsets(&line, &max_line_len, ncharset ? ncharset : "US-ASCII" , tinrc.mm_local_charset, curr_group->attribute->tex2iso_conv && art->tex2iso); +#else + /* use undeclared charset */ + process_charsets(&line, &max_line_len, get_param(part->params, "charset") ? get_param(part->params, "charset") : curr_group->attribute->undeclared_charset, tinrc.mm_local_charset, curr_group->attribute->tex2iso_conv && art->tex2iso); +#endif #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE) if (IS_LOCAL_CHARSET("UTF-8")) Index: head/chinese/tin/files/patch-init.c =================================================================== --- head/chinese/tin/files/patch-init.c (revision 361984) +++ head/chinese/tin/files/patch-init.c (revision 361985) @@ -1,16 +1,16 @@ ---- src/init.c.orig 2011-08-18 12:58:08.564585495 +0800 -+++ src/init.c 2011-08-18 12:58:30.264685035 +0800 -@@ -354,11 +354,11 @@ +--- src/init.c.orig 2014-07-16 00:47:37.352661040 +0800 ++++ src/init.c 2014-07-16 00:48:08.424652944 +0800 +@@ -361,11 +361,11 @@ #endif /* USE_INVERSE_HACK */ TRUE, /* keep_dead_articles */ POSTED_FILE, /* posted_articles_file */ - FALSE, /* mail_8bit_header */ + TRUE, /* mail_8bit_header */ FALSE, /* mark_ignore_tags */ TRUE, /* mark_saved_read */ TRUE, /* pos_first_unread */ - FALSE, /* post_8bit_header */ + TRUE, /* post_8bit_header */ TRUE, /* post_process_view */ #ifndef DISABLE_PRINTING FALSE, /* print_header */ Index: head/chinese/tin/files/patch-mail.c =================================================================== --- head/chinese/tin/files/patch-mail.c (revision 361984) +++ head/chinese/tin/files/patch-mail.c (revision 361985) @@ -1,15 +1,14 @@ ---- src/mail.c.orig 2011-04-17 15:14:00.000000000 -0700 -+++ src/mail.c 2012-01-02 05:08:38.000000000 -0800 -@@ -510,7 +510,12 @@ +--- src/mail.c.orig 2014-07-16 00:48:14.918652518 +0800 ++++ src/mail.c 2014-07-16 00:48:50.462660253 +0800 +@@ -514,7 +514,11 @@ /* * Protect against invalid character sequences. */ +#ifndef CHARSET_CONVERSION process_charsets(&r, &r_len, "UTF-8", tinrc.mm_local_charset, FALSE); +#else + process_charsets(&r, &r_len, (CURR_GROUP.attribute->undeclared_charset) ? (CURR_GROUP.attribute->undeclared_charset) : "UTF-8", tinrc.mm_local_charset, FALSE); +#endif -+ group->description = convert_to_printable(r, FALSE); }