Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2011 06:00:42 GMT
From:      Yi-Rong Wang <wangyr@cs.nctu.edu.tw>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/159863: [patch] chinese/tin with tin 1.9.6
Message-ID:  <201108180600.p7I60g9O036767@red.freebsd.org>
Resent-Message-ID: <201108180610.p7I6AAhP005357@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         159863
>Category:       ports
>Synopsis:       [patch] chinese/tin with tin 1.9.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 18 06:10:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Yi-Rong Wang
>Release:        
>Organization:
NCTU CSCC
>Environment:
FreeBSD enc.twbbs.org 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
patches with tin 1.9.2 to make Big5 as the default charset of articles
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	.
#	./files
#	./files/patch-init.c
#	./files/patch-tin.defaults
#	./files/patch-attrib.c
#	./files/patch-cook.c
#	./files/patch-mail.c
#	./Makefile
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo c - ./files
mkdir -p ./files > /dev/null 2>&1
echo x - ./files/patch-init.c
sed 's/^X//' >./files/patch-init.c << 'c40dab605030e411fe2b038c3383d69f'
X--- src/init.c.orig	2011-08-18 12:58:08.564585495 +0800
X+++ src/init.c	2011-08-18 12:58:30.264685035 +0800
X@@ -354,11 +354,11 @@
X #endif /* USE_INVERSE_HACK */
X 	TRUE,		/* keep_dead_articles */
X 	POSTED_FILE,	/* posted_articles_file */
X-	FALSE,		/* mail_8bit_header */
X+	TRUE,		/* mail_8bit_header */
X 	FALSE,		/* mark_ignore_tags */
X 	TRUE,		/* mark_saved_read */
X 	TRUE,		/* pos_first_unread */
X-	FALSE,		/* post_8bit_header */
X+	TRUE,		/* post_8bit_header */
X 	TRUE,		/* post_process_view */
X #ifndef DISABLE_PRINTING
X 	FALSE,		/* print_header */
c40dab605030e411fe2b038c3383d69f
echo x - ./files/patch-tin.defaults
sed 's/^X//' >./files/patch-tin.defaults << 'cf90db1ccc528ee06052fd4d3cd86d2c'
X--- doc/tin.defaults.orig	2011-08-18 05:28:38.347241197 +0800
X+++ doc/tin.defaults	2011-08-18 05:29:00.242883933 +0800
X@@ -55,7 +55,7 @@
X # idea to set mm_charset here for providing a default
X # in most western countries ISO-8859-1 might be the best value
X #
X-#mm_charset=iso-8859-1
X+#mm_charset=Big5
X 
X # post_mime_encoding
X #
cf90db1ccc528ee06052fd4d3cd86d2c
echo x - ./files/patch-attrib.c
sed 's/^X//' >./files/patch-attrib.c << 'bb89530c146b31a67c1b38258e3eb500'
X--- src/attrib.c.orig	2011-08-18 04:00:01.601675125 +0800
X+++ src/attrib.c	2011-08-18 04:48:26.054180291 +0800
X@@ -547,6 +547,9 @@
X 
X 		add_scope("*");
X 		set_attrib(OPT_ATTRIB_X_HEADERS, "*", "~/.tin/headers");
X+		num = 25;
X+		set_attrib(OPT_ATTRIB_MM_NETWORK_CHARSET, "*", (char *) &num);
X+		set_attrib(OPT_ATTRIB_UNDECLARED_CHARSET, "*", "Big5");
X 
X 		add_scope("*sources*");
X 		num = POST_PROC_SHAR;
bb89530c146b31a67c1b38258e3eb500
echo x - ./files/patch-cook.c
sed 's/^X//' >./files/patch-cook.c << 'd1a72c5fd5dce19edf495251e87263a6'
X--- src/cook.c.orig	2011-08-18 03:58:24.288554846 +0800
X+++ src/cook.c	2011-08-18 13:36:23.791151539 +0800
X@@ -472,7 +472,12 @@
X 			break;	/* premature end of file, file error etc. */
X 
X 		/* convert network to local charset, tex2iso, iso2asc etc. */
X+#ifndef CHARSET_CONVERSION
X 		process_charsets(&line, &max_line_len, get_param(part->params, "charset"), tinrc.mm_local_charset, curr_group->attribute->tex2iso_conv && art->tex2iso);
X+#else
X+		/* use undeclared charset */
X+		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);
X+#endif
X 
X #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
X 		if (IS_LOCAL_CHARSET("UTF-8"))
d1a72c5fd5dce19edf495251e87263a6
echo x - ./files/patch-mail.c
sed 's/^X//' >./files/patch-mail.c << '4e743e6dfdbe613e92cbadde3404fd50'
X--- src/mail.c.orig	2011-08-18 04:51:51.011361439 +0800
X+++ src/mail.c	2011-08-18 04:51:13.299148230 +0800
X@@ -510,7 +510,12 @@
X 			/*
X 			 * Protect against invalid character sequences.
X 			 */
X+#ifndef CHARSET_CONVERSION
X 			process_charsets(&r, &r_len, "UTF-8", tinrc.mm_local_charset, FALSE);
X+#else
X+			process_charsets(&r, &r_len, (CURR_GROUP.attribute->undeclared_charset) ? (CURR_GROUP.attribute->undeclared_charset) : "UTF-8", tinrc.mm_local_charset, FALSE);
X+#endif
X+
X 			group->description = convert_to_printable(r);
X 		}
X 
4e743e6dfdbe613e92cbadde3404fd50
echo x - ./Makefile
sed 's/^X//' >./Makefile << '464ef7c6571951809b23e262cbe26e19'
X# ex:ts=8
X# New ports collection makefile for:	tin
X# Date created:		2 Dev 1997
X# Whom:			Yen-Shuo Su <yssu@CCCA.NCTU.edu.tw>
X#
X# $FreeBSD: ports/chinese/tin/Makefile,v 1.40 2011/07/18 22:05:50 pav Exp $
X#
X
XPORTREVISION=	4
XCATEGORIES=	chinese
X
XMAINTAINER=	leeym@FreeBSD.org
X
XEXTRA_PATCHES=	${.CURDIR}/files/patch-attrib.c \
X		${.CURDIR}/files/patch-cook.c \
X		${.CURDIR}/files/patch-mail.c \
X		${.CURDIR}/files/patch-init.c \
X		${.CURDIR}/files/patch-tin_defaults
X
XMASTERDIR=	${.CURDIR}/../../news/tin
X
X.include "${MASTERDIR}/Makefile"
464ef7c6571951809b23e262cbe26e19
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



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