Fri Sep 10 08:32:29 2010 UTC ()
* 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.
(taca)
diff -r1.4 -r1.5 pkgsrc/textproc/ruby-oniguruma/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/textproc/ruby-oniguruma/distinfo
diff -r0 -r1.1 pkgsrc/textproc/ruby-oniguruma/patches/patch-aa
--- pkgsrc/textproc/ruby-oniguruma/Attic/Makefile 2010/05/07 08:34:23 1.4
+++ pkgsrc/textproc/ruby-oniguruma/Attic/Makefile 2010/09/10 08:32:29 1.5
| @@ -1,18 +1,15 @@ | | | @@ -1,18 +1,15 @@ |
1 | # $NetBSD: Makefile,v 1.4 2010/05/07 08:34:23 ahoka Exp $ | | 1 | # $NetBSD: Makefile,v 1.5 2010/09/10 08:32:29 taca Exp $ |
2 | | | 2 | |
3 | DISTNAME= oniguruma-1.1.0 | | 3 | DISTNAME= oniguruma-1.1.0 |
4 | PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME} | | | |
5 | CATEGORIES= textproc | | 4 | CATEGORIES= textproc |
6 | | | 5 | |
7 | MAINTAINER= pkgsrc-users@NetBSD.org | | 6 | MAINTAINER= pkgsrc-users@NetBSD.org |
8 | HOMEPAGE= http://oniguruma.rubyforge.org/ | | 7 | HOMEPAGE= http://oniguruma.rubyforge.org/ |
9 | COMMENT= Fast regular expression library | | 8 | COMMENT= Fast regular expression library |
10 | | | 9 | LICENSE= modified-bsd |
11 | PKG_DESTDIR_SUPPORT= destdir | | | |
12 | | | 10 | |
13 | USE_TOOLS+= pax | | 11 | USE_TOOLS+= pax |
14 | GEM_BUILD= gemspec | | | |
15 | | | 12 | |
16 | .include "../../textproc/oniguruma/buildlink3.mk" | | 13 | .include "../../textproc/oniguruma/buildlink3.mk" |
17 | .include "../../misc/rubygems/rubygem.mk" | | 14 | .include "../../lang/ruby/gem.mk" |
18 | .include "../../mk/bsd.pkg.mk" | | 15 | .include "../../mk/bsd.pkg.mk" |
--- pkgsrc/textproc/ruby-oniguruma/Attic/distinfo 2008/08/22 15:37:13 1.1.1.1
+++ pkgsrc/textproc/ruby-oniguruma/Attic/distinfo 2010/09/10 08:32:29 1.2
| @@ -1,5 +1,6 @@ | | | @@ -1,5 +1,6 @@ |
1 | $NetBSD: distinfo,v 1.1.1.1 2008/08/22 15:37:13 ahoka Exp $ | | 1 | $NetBSD: distinfo,v 1.2 2010/09/10 08:32:29 taca Exp $ |
2 | | | 2 | |
3 | SHA1 (oniguruma-1.1.0.gem) = 36acce9ba77830983ec6bf1438368f1aa5ac86b8 | | 3 | SHA1 (oniguruma-1.1.0.gem) = 36acce9ba77830983ec6bf1438368f1aa5ac86b8 |
4 | RMD160 (oniguruma-1.1.0.gem) = 1c5353dc5785fc23c6c7b38fcf9190117da19982 | | 4 | RMD160 (oniguruma-1.1.0.gem) = 1c5353dc5785fc23c6c7b38fcf9190117da19982 |
5 | Size (oniguruma-1.1.0.gem) = 24064 bytes | | 5 | Size (oniguruma-1.1.0.gem) = 24064 bytes |
| | | 6 | SHA1 (patch-aa) = 8cafa2c01f2002c523eccff70d3deb6c71d6275a |
$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 */