diff options
author | taca <taca@pkgsrc.org> | 2004-12-05 17:25:53 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2004-12-05 17:25:53 +0000 |
commit | 84ad9a44e2ac680d1dd0db0c70b949d0fa5d6f24 (patch) | |
tree | d3c3d9864c4c049e962be8895df78a4cc39f9377 /lang/ruby18 | |
parent | 38fda19dd28881f94f3adf0a0c6603322ed1972b (diff) | |
download | pkgsrc-84ad9a44e2ac680d1dd0db0c70b949d0fa5d6f24.tar.gz |
Import minimum change from ruby-rexml's changes:
- Fix Iconv::iconv error with "Shift_JIS" processing.
- Fix method name mistake.
- As ruby-rexml, rexml/encodings/SHIFT_JIS is now simply loads
SHIFT-JIS.rb in the same directory.
Bump package revision.
Diffstat (limited to 'lang/ruby18')
-rw-r--r-- | lang/ruby18/Makefile | 4 | ||||
-rw-r--r-- | lang/ruby18/distinfo | 4 | ||||
-rw-r--r-- | lang/ruby18/patches/patch-aj | 32 | ||||
-rw-r--r-- | lang/ruby18/patches/patch-ak | 39 |
4 files changed, 76 insertions, 3 deletions
diff --git a/lang/ruby18/Makefile b/lang/ruby18/Makefile index 0b3154a9b2b..71eaa557cee 100644 --- a/lang/ruby18/Makefile +++ b/lang/ruby18/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2004/11/30 17:16:11 taca Exp $ +# $NetBSD: Makefile,v 1.3 2004/12/05 17:25:53 taca Exp $ # DISTNAME= ${RUBY_DISTNAME} PKGNAME= ${RUBY_PKGPREFIX}-${RUBY_VERSION} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= lang ruby MASTER_SITES= ${MASTER_SITE_RUBY} diff --git a/lang/ruby18/distinfo b/lang/ruby18/distinfo index 3f1a1c5f072..1714498e215 100644 --- a/lang/ruby18/distinfo +++ b/lang/ruby18/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2004/11/29 08:20:05 taca Exp $ +$NetBSD: distinfo,v 1.3 2004/12/05 17:25:53 taca Exp $ SHA1 (ruby/ruby-1.8.1.tar.gz) = 894cb1e7624b74e699d127344ce5600fc3a7d515 Size (ruby/ruby-1.8.1.tar.gz) = 2671875 bytes @@ -11,3 +11,5 @@ SHA1 (patch-af) = 163dbcb44bd8784ac3e90df1e39ec927f927300f SHA1 (patch-ag) = ad1e2085077401bd3bff796932e15fa8e98376c8 SHA1 (patch-ah) = 4f94e8f116938b8d8b065c5b25a0cf8da80bdc85 SHA1 (patch-ai) = 908f89deccf0ad45fb5fc7602c747769a0dcba43 +SHA1 (patch-aj) = 96ea3de0019d724d17cf51285638b88c494d93e2 +SHA1 (patch-ak) = a8e40a029677f487d1f6256e5e8364e13a0cd40a diff --git a/lang/ruby18/patches/patch-aj b/lang/ruby18/patches/patch-aj new file mode 100644 index 00000000000..89b4b3329ca --- /dev/null +++ b/lang/ruby18/patches/patch-aj @@ -0,0 +1,32 @@ +$NetBSD: patch-aj,v 1.1 2004/12/05 17:25:53 taca Exp $ + +--- lib/rexml/encodings/SHIFT-JIS.rb.orig 2003-12-13 09:31:22.000000000 +0900 ++++ lib/rexml/encodings/SHIFT-JIS.rb +@@ -5,11 +5,11 @@ begin + module Encoding + @@__REXML_encoding_methods =<<-EOL + def decode(str) +- return Iconv::iconv("utf-8", "shift-jis", str)[0] ++ return Iconv::iconv("utf-8", "shift_jis", str)[0] + end + + def encode content +- return Iconv::iconv("shift-jis", "utf-8", content)[0] ++ return Iconv::iconv("shift_jis", "utf-8", content)[0] + end + EOL + end +@@ -21,11 +21,11 @@ rescue LoadError + module REXML + module Encoding + @@__REXML_encoding_methods =<<-EOL +- def to_shift_jis content ++ def encode content + Uconv::u8tosjis(content) + end + +- def from_shift_jis(str) ++ def decode(str) + Uconv::sjistou8(str) + end + EOL diff --git a/lang/ruby18/patches/patch-ak b/lang/ruby18/patches/patch-ak new file mode 100644 index 00000000000..22f5906bda0 --- /dev/null +++ b/lang/ruby18/patches/patch-ak @@ -0,0 +1,39 @@ +$NetBSD: patch-ak,v 1.1 2004/12/05 17:25:53 taca Exp $ + +--- lib/rexml/encodings/SHIFT_JIS.rb.orig 2003-07-17 09:22:41.000000000 +0900 ++++ lib/rexml/encodings/SHIFT_JIS.rb +@@ -1,33 +1 @@ +-begin +- require 'uconv' +- +- module REXML +- module Encoding +- def to_shift_jis content +- Uconv::u8tosjis(content) +- end +- +- def from_shift_jis(str) +- Uconv::sjistou8(str) +- end +- end +- end +-rescue LoadError +- begin +- require 'iconv' +- module REXML +- module Encoding +- def from_shift_jis(str) +- return Iconv::iconv("utf-8", "shift_jis", str).join('') +- end +- +- def to_shift_jis content +- return Iconv::iconv("shift_jis", "utf-8", content).join('') +- end +- end +- end +- rescue LoadError +- raise "uconv or iconv is required for Japanese encoding support." +- end +- +-end ++load 'rexml/encodings/SHIFT-JIS.rb' |