diff options
author | taca <taca@pkgsrc.org> | 2010-09-10 06:19:50 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2010-09-10 06:19:50 +0000 |
commit | 5396939a1953acb72afd6350457de21da19d3d0c (patch) | |
tree | 14dc28f89602ce9e790e98d7a0991f7ac333aa11 /devel | |
parent | 3448ef4fb08a20a50bb370e919dd34a49249695d (diff) | |
download | pkgsrc-5396939a1953acb72afd6350457de21da19d3d0c.tar.gz |
Add a patch to support both ruby18 and ruby19.
No functional change.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/ruby-rcsparse/distinfo | 3 | ||||
-rw-r--r-- | devel/ruby-rcsparse/patches/patch-aa | 67 |
2 files changed, 69 insertions, 1 deletions
diff --git a/devel/ruby-rcsparse/distinfo b/devel/ruby-rcsparse/distinfo index 8e0f2104502..f4c8b99fb49 100644 --- a/devel/ruby-rcsparse/distinfo +++ b/devel/ruby-rcsparse/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.6 2009/08/08 22:59:41 wiz Exp $ +$NetBSD: distinfo,v 1.7 2010/09/10 06:19:50 taca Exp $ SHA1 (rcsparse/75d93404707d.tar.bz2) = ca86839830abd00abaa666bbbb42e5220fd5a743 RMD160 (rcsparse/75d93404707d.tar.bz2) = 1573dee21f22fb676a52e726991583c52f5523f9 Size (rcsparse/75d93404707d.tar.bz2) = 101892 bytes +SHA1 (patch-aa) = 4cb6e84ffa2661e8ede6dec1ef3f7bc55ea53df5 diff --git a/devel/ruby-rcsparse/patches/patch-aa b/devel/ruby-rcsparse/patches/patch-aa new file mode 100644 index 00000000000..600fb220d0b --- /dev/null +++ b/devel/ruby-rcsparse/patches/patch-aa @@ -0,0 +1,67 @@ +$NetBSD: patch-aa,v 1.1 2010/09/10 06:19:50 taca Exp $ + +Use modern Ruby API. + +--- rb-rcsparse.c.orig 2009-08-06 22:21:50.000000000 +0000 ++++ rb-rcsparse.c +@@ -170,9 +170,9 @@ rb_rcsfile_initialize(int argc, VALUE *a + Data_Get_Struct(self, struct rb_rcsfile, rb_rf); + rb_scan_args(argc, argv, "1", &fname); + SafeStringValue(fname); +- rb_rf->rf = rcsopen(RSTRING(fname)->ptr); ++ rb_rf->rf = rcsopen(RSTRING_PTR(fname)); + if (rb_rf->rf == NULL) +- rb_sys_fail(RSTRING(fname)->ptr); ++ rb_sys_fail(RSTRING_PTR(fname)); + rb_rf->symbols = Qnil; + return self; + } +@@ -311,7 +311,7 @@ rb_rcsfile_checkout(int argc, VALUE *arg + + if (rb_scan_args(argc, argv, "01", &rev) == 1) { + StringValue(rev); +- revstr = RSTRING(rev)->ptr; ++ revstr = RSTRING_PTR(rev); + } + data = rcscheckout(rb_rf->rf, revstr, &len); + if (data == NULL) +@@ -332,7 +332,7 @@ rb_rcsfile_resolve_sym(int argc, VALUE * + + if (rb_scan_args(argc, argv, "01", &sym) == 1) { + StringValue(sym); +- symstr = RSTRING(sym)->ptr; ++ symstr = RSTRING_PTR(sym); + } + rev = rcsrevfromsym(rb_rf->rf, symstr); + if (rev == NULL) +@@ -350,7 +350,7 @@ rb_rcsfile_getlog(VALUE self, VALUE rev) + char *data; + + StringValue(rev); +- data = rcsgetlog(rb_rf->rf, RSTRING(rev)->ptr); ++ data = rcsgetlog(rb_rf->rf, RSTRING_PTR(rev)); + if (data == NULL) + return Qnil; + ret = rb_tainted_str_new2(data); +@@ -378,8 +378,8 @@ rb_revtree_aref(VALUE self, VALUE index) + + StringValue(index); + s.rev = &st; +- st.str = RSTRING(index)->ptr; +- st.len = RSTRING(index)->len; ++ st.str = RSTRING_PTR(index); ++ st.len = RSTRING_LEN(index); + f = RB_FIND(rcsrevtree, rb_rcsfile_revs(self), &s); + if (f == NULL) + return Qnil; +@@ -466,8 +466,8 @@ rb_revtree_key_p(VALUE self, VALUE index + + StringValue(index); + s.rev = &st; +- st.str = RSTRING(index)->ptr; +- st.len = RSTRING(index)->len; ++ st.str = RSTRING_PTR(index); ++ st.len = RSTRING_LEN(index); + f = RB_FIND(rcsrevtree, rb_rcsfile_revs(self), &s); + if (f == NULL) + return Qfalse; |