summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authortaca <taca>2009-10-04 01:27:15 +0000
committertaca <taca>2009-10-04 01:27:15 +0000
commit10c529a4582d38519d6dbffe5cbabe7173d54d1b (patch)
tree43f1b65c8db802b675cbe1d6c5175f1243a42e57 /mail
parentaff2a3358a714d70547eb66e4ae501e30d33d2f7 (diff)
downloadpkgsrc-10c529a4582d38519d6dbffe5cbabe7173d54d1b.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/Makefile4
-rw-r--r--mail/squirrelmail/distinfo4
-rw-r--r--mail/squirrelmail/patches/patch-ab27
-rw-r--r--mail/squirrelmail/patches/patch-ai18
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);