summaryrefslogtreecommitdiff
path: root/textproc/ruby-oniguruma
diff options
context:
space:
mode:
authortaca <taca>2010-09-10 08:32:29 +0000
committertaca <taca>2010-09-10 08:32:29 +0000
commit04ab9e33c19109ca94bba610920bed8dad8b4e1e (patch)
treeee0fe0448d7b609c7e1b24a68687bb67449c8f4f /textproc/ruby-oniguruma
parent124da99718369578986a582a9405f88efb1d195b (diff)
downloadpkgsrc-04ab9e33c19109ca94bba610920bed8dad8b4e1e.tar.gz
* Use lang/ruby/gem.mk instead of misc/rubygems/rubygem.mk.
* Add LICENSE. * Remove default value of GEM_BUILD. * Add patch to support both ruby18 and ruby19. No functional change.
Diffstat (limited to 'textproc/ruby-oniguruma')
-rw-r--r--textproc/ruby-oniguruma/Makefile9
-rw-r--r--textproc/ruby-oniguruma/distinfo3
-rw-r--r--textproc/ruby-oniguruma/patches/patch-aa81
3 files changed, 86 insertions, 7 deletions
diff --git a/textproc/ruby-oniguruma/Makefile b/textproc/ruby-oniguruma/Makefile
index 2c22baf83cd..438b1f780d4 100644
--- a/textproc/ruby-oniguruma/Makefile
+++ b/textproc/ruby-oniguruma/Makefile
@@ -1,18 +1,15 @@
-# $NetBSD: Makefile,v 1.4 2010/05/07 08:34:23 ahoka Exp $
+# $NetBSD: Makefile,v 1.5 2010/09/10 08:32:29 taca Exp $
DISTNAME= oniguruma-1.1.0
-PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME}
CATEGORIES= textproc
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://oniguruma.rubyforge.org/
COMMENT= Fast regular expression library
-
-PKG_DESTDIR_SUPPORT= destdir
+LICENSE= modified-bsd
USE_TOOLS+= pax
-GEM_BUILD= gemspec
.include "../../textproc/oniguruma/buildlink3.mk"
-.include "../../misc/rubygems/rubygem.mk"
+.include "../../lang/ruby/gem.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/ruby-oniguruma/distinfo b/textproc/ruby-oniguruma/distinfo
index 372296ac8fc..8626030a5e5 100644
--- a/textproc/ruby-oniguruma/distinfo
+++ b/textproc/ruby-oniguruma/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/08/22 15:37:13 ahoka Exp $
+$NetBSD: distinfo,v 1.2 2010/09/10 08:32:29 taca Exp $
SHA1 (oniguruma-1.1.0.gem) = 36acce9ba77830983ec6bf1438368f1aa5ac86b8
RMD160 (oniguruma-1.1.0.gem) = 1c5353dc5785fc23c6c7b38fcf9190117da19982
Size (oniguruma-1.1.0.gem) = 24064 bytes
+SHA1 (patch-aa) = 8cafa2c01f2002c523eccff70d3deb6c71d6275a
diff --git a/textproc/ruby-oniguruma/patches/patch-aa b/textproc/ruby-oniguruma/patches/patch-aa
new file mode 100644
index 00000000000..e446e05fd43
--- /dev/null
+++ b/textproc/ruby-oniguruma/patches/patch-aa
@@ -0,0 +1,81 @@
+$NetBSD: patch-aa,v 1.1 2010/09/10 08:32:29 taca Exp $
+
+Use modern Ruby's API.
+
+--- ext/oregexp.c.orig 2010-08-29 06:22:26.000000000 +0000
++++ ext/oregexp.c
+@@ -120,8 +120,8 @@ static VALUE oregexp_initialize( VALUE s
+ VALUE pattern_str = StringValue( pattern );
+ rb_iv_set( self, "@pattern", pattern_str );
+ rb_iv_set( self, "@options", options );
+- UChar* pat_ptr = RSTRING(pattern_str)->ptr;
+- int pat_len = RSTRING(pattern_str)->len;
++ UChar* pat_ptr = RSTRING_PTR(pattern_str);
++ int pat_len = RSTRING_LEN(pattern_str);
+ VALUE rOptions = rb_hash_aref( options, ID2SYM( rb_intern( "options" ) ) );
+ VALUE rEncoding = rb_hash_aref( options, ID2SYM( rb_intern( "encoding" ) ) );
+ VALUE rSyntax = rb_hash_aref( options, ID2SYM( rb_intern( "syntax" ) ) );
+@@ -212,8 +212,8 @@ static VALUE oregexp_match( int argc, VA
+ }
+
+ VALUE string_str = StringValue( argv[0] );
+- UChar* str_ptr = RSTRING(string_str)->ptr;
+- int str_len = RSTRING(string_str)->len;
++ UChar* str_ptr = RSTRING_PTR(string_str);
++ int str_len = RSTRING_LEN(string_str);
+
+ int begin = 0;
+ int end = str_len;
+@@ -264,8 +264,8 @@ oregexp_append_replacement(pat, src_text
+ {
+ ORegexp *oregexp;
+ int32_t replIdx = 0, name_pos, name_start, name_end ;
+- int32_t replacementLength = RSTRING(repl_text)->len;
+- UChar *replacementText = RSTRING(repl_text)->ptr;
++ int32_t replacementLength = RSTRING_LEN(repl_text);
++ UChar *replacementText = RSTRING_PTR(repl_text);
+ UChar *replacementEnd = replacementText + (replacementLength-1);
+ long numDigits = 0;
+ long groupNum = 0, g_start, g_end;
+@@ -274,8 +274,8 @@ oregexp_append_replacement(pat, src_text
+ const UChar * matchText;
+ long matchLen;
+
+- matchText = RSTRING(src_text)->ptr;
+- matchLen = RSTRING(src_text)->len;
++ matchText = RSTRING_PTR(src_text);
++ matchLen = RSTRING_LEN(src_text);
+ Data_Get_Struct( pat, ORegexp, oregexp );
+ enc = onig_get_encoding( oregexp->reg );
+
+@@ -402,7 +402,7 @@ str_mod_check(s, p, len)
+ char *p;
+ long len;
+ {
+- if (RSTRING(s)->ptr != p || RSTRING(s)->len != len) {
++ if (RSTRING_PTR(s) != p || RSTRING_LEN(s) != len) {
+ rb_raise(rb_eRuntimeError, "string modified");
+ }
+ }
+@@ -441,8 +441,8 @@ oregexp_gsub(self, argc, argv, bang, on
+ Data_Get_Struct( self, ORegexp, oregexp );
+
+ VALUE string_str = StringValue( argv[0] );
+- UChar* str_ptr = RSTRING(string_str)->ptr;
+- int str_len = RSTRING(string_str)->len;
++ UChar* str_ptr = RSTRING_PTR(string_str);
++ int str_len = RSTRING_LEN(string_str);
+
+ beg = onig_search(oregexp->reg, str_ptr, str_ptr + str_len, str_ptr, str_ptr + str_len, region, ONIG_OPTION_NONE);
+
+@@ -611,8 +611,8 @@ oregexp_scan(VALUE self, VALUE str, Onig
+ Data_Get_Struct( self, ORegexp, oregexp );
+
+ VALUE string_str = StringValue( str );
+- UChar* str_ptr = RSTRING(string_str)->ptr;
+- int str_len = RSTRING(string_str)->len;
++ UChar* str_ptr = RSTRING_PTR(string_str);
++ int str_len = RSTRING_LEN(string_str);
+ beg = onig_search(oregexp->reg, str_ptr, str_ptr + str_len, str_ptr, str_ptr + str_len, region, ONIG_OPTION_NONE);
+ if (beg < 0) {
+ /* no match */