pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ruby18 Import minimum change from ruby-rexml's ch...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/920c596936a4
branches:  trunk
changeset: 485262:920c596936a4
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Dec 05 17:25:53 2004 +0000

description:
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:

 lang/ruby18/Makefile         |   4 ++--
 lang/ruby18/distinfo         |   4 +++-
 lang/ruby18/patches/patch-aj |  32 ++++++++++++++++++++++++++++++++
 lang/ruby18/patches/patch-ak |  39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 3 deletions(-)

diffs (109 lines):

diff -r a56c0aa18619 -r 920c596936a4 lang/ruby18/Makefile
--- a/lang/ruby18/Makefile      Sun Dec 05 17:24:38 2004 +0000
+++ b/lang/ruby18/Makefile      Sun Dec 05 17:25:53 2004 +0000
@@ -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 -r a56c0aa18619 -r 920c596936a4 lang/ruby18/distinfo
--- a/lang/ruby18/distinfo      Sun Dec 05 17:24:38 2004 +0000
+++ b/lang/ruby18/distinfo      Sun Dec 05 17:25:53 2004 +0000
@@ -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-ag) = ad1e2085077401bd3bff796932e15fa8e98376c8
 SHA1 (patch-ah) = 4f94e8f116938b8d8b065c5b25a0cf8da80bdc85
 SHA1 (patch-ai) = 908f89deccf0ad45fb5fc7602c747769a0dcba43
+SHA1 (patch-aj) = 96ea3de0019d724d17cf51285638b88c494d93e2
+SHA1 (patch-ak) = a8e40a029677f487d1f6256e5e8364e13a0cd40a
diff -r a56c0aa18619 -r 920c596936a4 lang/ruby18/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby18/patches/patch-aj      Sun Dec 05 17:25:53 2004 +0000
@@ -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 -r a56c0aa18619 -r 920c596936a4 lang/ruby18/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby18/patches/patch-ak      Sun Dec 05 17:25:53 2004 +0000
@@ -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'



Home | Main Index | Thread Index | Old Index