summaryrefslogtreecommitdiff
path: root/textproc/ruby-rexml
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2004-12-05 15:21:06 +0000
committertaca <taca@pkgsrc.org>2004-12-05 15:21:06 +0000
commit81f7a0fb3bf503ad5f133c5feadabbd00d8cb4f2 (patch)
treef4a92493f50e6ac857c471da93a1fce0951b3a3d /textproc/ruby-rexml
parent9356820c832731b6f4d3fb4b2b47e96309f49c14 (diff)
downloadpkgsrc-81f7a0fb3bf503ad5f133c5feadabbd00d8cb4f2.tar.gz
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 (limited to 'textproc/ruby-rexml')
-rw-r--r--textproc/ruby-rexml/Makefile13
-rw-r--r--textproc/ruby-rexml/distinfo5
-rw-r--r--textproc/ruby-rexml/patches/patch-ab32
-rw-r--r--textproc/ruby-rexml/patches/patch-ac7
4 files changed, 54 insertions, 3 deletions
diff --git a/textproc/ruby-rexml/Makefile b/textproc/ruby-rexml/Makefile
index 0742382b434..152e704ba35 100644
--- a/textproc/ruby-rexml/Makefile
+++ b/textproc/ruby-rexml/Makefile
@@ -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 @@ MAINTAINER= rasputin@idoru.mine.nu
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 --git a/textproc/ruby-rexml/distinfo b/textproc/ruby-rexml/distinfo
index aa62c60e119..29330db131c 100644
--- a/textproc/ruby-rexml/distinfo
+++ b/textproc/ruby-rexml/distinfo
@@ -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 --git a/textproc/ruby-rexml/patches/patch-ab b/textproc/ruby-rexml/patches/patch-ab
new file mode 100644
index 00000000000..552015aa1cf
--- /dev/null
+++ b/textproc/ruby-rexml/patches/patch-ab
@@ -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 --git a/textproc/ruby-rexml/patches/patch-ac b/textproc/ruby-rexml/patches/patch-ac
new file mode 100644
index 00000000000..8ba94df34e7
--- /dev/null
+++ b/textproc/ruby-rexml/patches/patch-ac
@@ -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'