pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/ruby-rexml Apply patch from PR pkg/28535.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/814a1432e4f5
branches:  trunk
changeset: 485235:814a1432e4f5
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Dec 05 15:21:06 2004 +0000

description:
Apply patch from PR pkg/28535.

- Fix Iconv::iconv error with "Shift_JIS" processing.
- Fix method name mistake.
- Since encoding modulde would be loaded as needs, it should be load
  by "load" instead of "require".

Add dependency to ruby-iconv or ruby-uconv package.

Bump package revision.

diffstat:

 textproc/ruby-rexml/Makefile         |  13 ++++++++++++-
 textproc/ruby-rexml/distinfo         |   5 +++--
 textproc/ruby-rexml/patches/patch-ab |  32 ++++++++++++++++++++++++++++++++
 textproc/ruby-rexml/patches/patch-ac |   7 +++++++
 4 files changed, 54 insertions(+), 3 deletions(-)

diffs (90 lines):

diff -r edafa30b752f -r 814a1432e4f5 textproc/ruby-rexml/Makefile
--- a/textproc/ruby-rexml/Makefile      Sun Dec 05 15:12:51 2004 +0000
+++ b/textproc/ruby-rexml/Makefile      Sun Dec 05 15:21:06 2004 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2004/11/28 04:42:29 taca Exp $
+# $NetBSD: Makefile,v 1.5 2004/12/05 15:21:06 taca Exp $
 #
 
 DISTNAME=      rexml_${VERSION}
 PKGNAME=       ${RUBY_PKGPREFIX}-rexml-${VERSION}
+PKGREVISION=   1
 CATEGORIES=    textproc ruby
 MASTER_SITES=  http://www.germane-software.com/archives/
 EXTRACT_SUFX=  .tgz
@@ -11,6 +12,16 @@
 HOMEPAGE=      http://www.germane-software.com/software/rexml/
 COMMENT=       Pure Ruby XML parser based on Java Electric XML
 
+.include "../../lang/ruby/rubyversion.mk"
+
+.if ${RUBY_VER} == "16"
+RUBY_ICONV_DIR=        ../../converters/ruby${RUBY_VER}-iconv
+.else
+RUBY_ICONV_DIR=        ../../converters/ruby-iconv
+.endif
+
+DEPENDS+= ${RUBY_PKGPREFIX}-iconv,${RUBY_PKGPREFIX}-uconv}:${RUBY_ICONV_DIR}
+
 VERSION=               3.1.2
 USE_RUBY_INSTALL=      yes
 RUBY_SIMPLE_INSTALL=   bin/install.rb
diff -r edafa30b752f -r 814a1432e4f5 textproc/ruby-rexml/distinfo
--- a/textproc/ruby-rexml/distinfo      Sun Dec 05 15:12:51 2004 +0000
+++ b/textproc/ruby-rexml/distinfo      Sun Dec 05 15:21:06 2004 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.2 2004/11/28 04:42:29 taca Exp $
+$NetBSD: distinfo,v 1.3 2004/12/05 15:21:06 taca Exp $
 
 SHA1 (ruby/rexml_3.1.2.tgz) = 105d8e9d3ee36eb58b7c888996be557b58f90a39
 Size (ruby/rexml_3.1.2.tgz) = 386929 bytes
-SHA1 (patch-aa) = e1d79be5c56ee1495a14a5dc165b0a46b8640af9
+SHA1 (patch-ab) = 6e7285a9e358ce0c940fea487a082feb8598dc10
+SHA1 (patch-ac) = 5ee35f0e9a34e229b7daec18a3ef89f6c63b0f71
diff -r edafa30b752f -r 814a1432e4f5 textproc/ruby-rexml/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/ruby-rexml/patches/patch-ab      Sun Dec 05 15:21:06 2004 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-ab,v 1.1 2004/12/05 15:21:06 taca Exp $
+
+--- src/rexml/encodings/SHIFT-JIS.rb.orig      2004-06-21 01:04:48.000000000 +0900
++++ src/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 edafa30b752f -r 814a1432e4f5 textproc/ruby-rexml/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/ruby-rexml/patches/patch-ac      Sun Dec 05 15:21:06 2004 +0000
@@ -0,0 +1,7 @@
+$NetBSD: patch-ac,v 1.1 2004/12/05 15:21:06 taca Exp $
+
+--- src/rexml/encodings/SHIFT_JIS.rb.orig      2004-06-21 01:04:47.000000000 +0900
++++ src/rexml/encodings/SHIFT_JIS.rb
+@@ -1 +1 @@
+-require 'rexml/encodings/Shift-JIS'
++load 'rexml/encodings/SHIFT-JIS.rb'



Home | Main Index | Thread Index | Old Index