diff options
author | taca <taca@pkgsrc.org> | 2009-10-04 01:27:15 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2009-10-04 01:27:15 +0000 |
commit | abb3a899273f8f21ee150259d96c6b8793b24fd2 (patch) | |
tree | 43f1b65c8db802b675cbe1d6c5175f1243a42e57 /mail | |
parent | a3332af3424ed3673a01815974daff05acf01f4e (diff) | |
download | pkgsrc-abb3a899273f8f21ee150259d96c6b8793b24fd2.tar.gz |
Add two small fix:
* Use case ignore match for detecting encoded header. This is
language independent problem.
* Improve handling of file name of attachment in Japanese environment.
These fixes make squirrelmail usable after remove of japaneses patch.
Bump PKGREVISION.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/squirrelmail/Makefile | 4 | ||||
-rw-r--r-- | mail/squirrelmail/distinfo | 4 | ||||
-rw-r--r-- | mail/squirrelmail/patches/patch-ab | 27 | ||||
-rw-r--r-- | mail/squirrelmail/patches/patch-ai | 18 |
4 files changed, 50 insertions, 3 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index f50c80a955b..d86d5008c91 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.109 2009/09/29 13:30:54 taca Exp $ +# $NetBSD: Makefile,v 1.110 2009/10/04 01:27:15 taca Exp $ DISTNAME= squirrelmail-1.4.20-RC2 PKGNAME= ${DISTNAME:S/-RC2/rc2/} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=squirrelmail/} EXTRACT_SUFX= .tar.bz2 diff --git a/mail/squirrelmail/distinfo b/mail/squirrelmail/distinfo index 20ef781c86a..7a47ceaae37 100644 --- a/mail/squirrelmail/distinfo +++ b/mail/squirrelmail/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.55 2009/08/26 12:47:17 tron Exp $ +$NetBSD: distinfo,v 1.56 2009/10/04 01:27:15 taca Exp $ SHA1 (squirrelmail-1.4.20-RC2.tar.bz2) = f1cdccfdd17d8974adc0b79aba44b62f98f78f64 RMD160 (squirrelmail-1.4.20-RC2.tar.bz2) = f736e33af6f7b5a4c49f96968ed3fdeb2d42f06f Size (squirrelmail-1.4.20-RC2.tar.bz2) = 516825 bytes SHA1 (patch-aa) = 4c5556c804c1b728eec87322272abb06edcfcc2a +SHA1 (patch-ab) = 503bef625388a3224ad6f54aa332190e7440dde3 +SHA1 (patch-ai) = 701fdbc84afde5f8e255af13ba0e44469343e17c diff --git a/mail/squirrelmail/patches/patch-ab b/mail/squirrelmail/patches/patch-ab new file mode 100644 index 00000000000..ece5805dd27 --- /dev/null +++ b/mail/squirrelmail/patches/patch-ab @@ -0,0 +1,27 @@ +$NetBSD: patch-ab,v 1.14 2009/10/04 01:27:15 taca Exp $ + +* Use case ignore match for detecting encoded word. +* Fix encoding problem of attached filenames; don't convert encoding here. + +--- functions/i18n.php.orig 2009-07-29 11:21:06.000000000 +0900 ++++ functions/i18n.php +@@ -675,18 +675,11 @@ function japanese_charset_xtra() { + break; + case 'decodeheader': + $ret = str_replace("\t", "", $ret); +- if (preg_match('/=\?([^?]+)\?(q|b)\?([^?]+)\?=/', $ret)) ++ if (preg_match('/=\?([^?]*)\?(Q|B)\?([^?]*)\?=/Ui', $ret)) + $ret = @mb_decode_mimeheader($ret); + $ret = @mb_convert_encoding($ret, 'EUC-JP', 'AUTO'); + break; + case 'downloadfilename': +- $useragent = func_get_arg(2); +- if (strstr($useragent, 'Windows') !== false || +- strstr($useragent, 'Mac_') !== false) { +- $ret = mb_convert_encoding($ret, 'SJIS', 'AUTO'); +- } else { +- $ret = mb_convert_encoding($ret, 'EUC-JP', 'AUTO'); +-} + break; + case 'wordwrap': + $no_begin = "\x21\x25\x29\x2c\x2e\x3a\x3b\x3f\x5d\x7d\xa1\xf1\xa1\xeb\xa1" . diff --git a/mail/squirrelmail/patches/patch-ai b/mail/squirrelmail/patches/patch-ai new file mode 100644 index 00000000000..d6243fb881b --- /dev/null +++ b/mail/squirrelmail/patches/patch-ai @@ -0,0 +1,18 @@ +$NetBSD: patch-ai,v 1.1 2009/10/04 01:27:15 taca Exp $ + +* Fix encoding problem of attached filenames; convert to Shift_JIS when + using Internet Explore in Japanese environment, sigh. + +--- functions/mime.php.orig 2009-07-31 19:12:46.000000000 +0900 ++++ functions/mime.php +@@ -2563,6 +2563,10 @@ function SendDownloadHeaders($type0, $ty + //set all the Cache Control Headers for IE + if ($isIE) { + $filename=rawurlencode($filename); ++ if ($squirrelmail_language == 'ja_JP') { ++ $filename = rawurldecode($filename); ++ $filename = mb_convert_encoding($filename, 'SJIS', 'AUTO'); ++ } + header ("Pragma: public"); + header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); // HTTP/1.1 + header ("Cache-Control: post-check=0, pre-check=0", false); |