summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2010-09-10 04:07:52 +0000
committertaca <taca@pkgsrc.org>2010-09-10 04:07:52 +0000
commitf6b55d779125030e627bca11dce2d7a8faa9a3ef (patch)
treefa48a32e91b6a2e6a4388a6cf0ac98bf30710d17
parentd286d2d5937a53ef96cb9833087906655c176d72 (diff)
downloadpkgsrc-f6b55d779125030e627bca11dce2d7a8faa9a3ef.tar.gz
* Add patches for Ruby 1.9.
* Remove RUBY_HAS_ARCHLIB. No functional change.
-rw-r--r--databases/qdbm/distinfo5
-rw-r--r--databases/qdbm/patches/patch-ah63
-rw-r--r--databases/qdbm/patches/patch-ai63
-rw-r--r--databases/qdbm/patches/patch-aj96
-rw-r--r--databases/ruby-qdbm/Makefile3
5 files changed, 227 insertions, 3 deletions
diff --git a/databases/qdbm/distinfo b/databases/qdbm/distinfo
index cef1f8ef1b3..e858c9ae30f 100644
--- a/databases/qdbm/distinfo
+++ b/databases/qdbm/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.23 2008/06/19 14:45:38 taca Exp $
+$NetBSD: distinfo,v 1.24 2010/09/10 04:07:52 taca Exp $
SHA1 (qdbm-1.8.77.tar.gz) = e277e77bc0209cc4c8eb205a9082ef880048445c
RMD160 (qdbm-1.8.77.tar.gz) = 3c684a4127204faf32472d29d7fd64a07e394332
@@ -10,3 +10,6 @@ SHA1 (patch-ad) = 38b1852cabca8c064bd2a6a4639368e812869448
SHA1 (patch-ae) = aa90ad3e228f765b0ac0a8a6744f7af0f4cf9a7f
SHA1 (patch-af) = 3aae0b089f9ace97f48ee5070123350f80643f83
SHA1 (patch-ag) = 6a8df8c41db5d804b39572af0e9d1f201fc1a058
+SHA1 (patch-ah) = e857d2bd82ace8396316c70fe2e35c450477616f
+SHA1 (patch-ai) = 68f87529b45a1f4b87cdb598ef0cb4eb13bef035
+SHA1 (patch-aj) = e1e6d3b73f8abbf2329b12d5b3ff3aa82f6421b3
diff --git a/databases/qdbm/patches/patch-ah b/databases/qdbm/patches/patch-ah
new file mode 100644
index 00000000000..f113edfed37
--- /dev/null
+++ b/databases/qdbm/patches/patch-ah
@@ -0,0 +1,63 @@
+$NetBSD: patch-ah,v 1.1 2010/09/10 04:07:53 taca Exp $
+
+Avoid to use old API for Ruby 1.9.
+
+--- ruby/curia/mod_curia.c.orig 2006-09-25 12:26:06.000000000 +0000
++++ ruby/curia/mod_curia.c
+@@ -233,7 +233,7 @@ static VALUE rbcropen(VALUE vself, VALUE
+ const char *name;
+ int index, omode, bnum, dnum;
+ if((index = getnewindex()) == -1) myerror(DP_EMISC);
+- name = STR2CSTR(vname);
++ name = StringValuePtr(vname);
+ FIXNUM_P(vomode);
+ omode = FIX2INT(vomode);
+ FIXNUM_P(vbnum);
+@@ -276,10 +276,10 @@ static VALUE rbcrput(VALUE vself, VALUE
+ int index, ksiz, vsiz, dmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vdmode);
+ dmode = FIX2INT(vdmode);
+ curia = crtable[index];
+@@ -297,8 +297,8 @@ static VALUE rbcrout(VALUE vself, VALUE
+ int index, ksiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ curia = crtable[index];
+ if(!crout(curia, kbuf, ksiz)){
+ if(crsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
+@@ -316,8 +316,8 @@ static VALUE rbcrget(VALUE vself, VALUE
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ FIXNUM_P(vstart);
+ start = FIX2INT(vstart);
+ FIXNUM_P(vmax);
+@@ -339,8 +339,8 @@ static VALUE rbcrvsiz(VALUE vself, VALUE
+ int index, ksiz, vsiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ curia = crtable[index];
+ if((vsiz = crvsiz(curia, kbuf, ksiz)) == -1){
+ if(crsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1);
diff --git a/databases/qdbm/patches/patch-ai b/databases/qdbm/patches/patch-ai
new file mode 100644
index 00000000000..afc0ba5a736
--- /dev/null
+++ b/databases/qdbm/patches/patch-ai
@@ -0,0 +1,63 @@
+$NetBSD: patch-ai,v 1.1 2010/09/10 04:07:53 taca Exp $
+
+Avoid to use old API for Ruby 1.9.
+
+--- ruby/depot/mod_depot.c.orig 2006-09-25 12:21:38.000000000 +0000
++++ ruby/depot/mod_depot.c
+@@ -232,7 +232,7 @@ static VALUE rbdpopen(VALUE vself, VALUE
+ const char *name;
+ int index, omode, bnum;
+ if((index = getnewindex()) == -1) myerror(DP_EMISC);
+- name = STR2CSTR(vname);
++ name = StringValuePtr(vname);
+ FIXNUM_P(vomode);
+ omode = FIX2INT(vomode);
+ FIXNUM_P(vbnum);
+@@ -273,10 +273,10 @@ static VALUE rbdpput(VALUE vself, VALUE
+ int index, ksiz, vsiz, dmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vdmode);
+ dmode = FIX2INT(vdmode);
+ depot = dptable[index];
+@@ -294,8 +294,8 @@ static VALUE rbdpout(VALUE vself, VALUE
+ int index, ksiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ depot = dptable[index];
+ if(!dpout(depot, kbuf, ksiz)){
+ if(dpsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
+@@ -313,8 +313,8 @@ static VALUE rbdpget(VALUE vself, VALUE
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ FIXNUM_P(vstart);
+ start = FIX2INT(vstart);
+ FIXNUM_P(vmax);
+@@ -336,8 +336,8 @@ static VALUE rbdpvsiz(VALUE vself, VALUE
+ int index, ksiz, vsiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ depot = dptable[index];
+ if((vsiz = dpvsiz(depot, kbuf, ksiz)) == -1){
+ if(dpsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1);
diff --git a/databases/qdbm/patches/patch-aj b/databases/qdbm/patches/patch-aj
new file mode 100644
index 00000000000..da80ef57abf
--- /dev/null
+++ b/databases/qdbm/patches/patch-aj
@@ -0,0 +1,96 @@
+$NetBSD: patch-aj,v 1.1 2010/09/10 04:07:53 taca Exp $
+
+Avoid to use old API for Ruby 1.9.
+
+--- ruby/villa/mod_villa.c.orig 2006-09-25 14:47:04.000000000 +0000
++++ ruby/villa/mod_villa.c
+@@ -304,7 +304,7 @@ static VALUE rbvlopen(VALUE vself, VALUE
+ int index, omode, cmode;
+ VLCFUNC cmp;
+ if((index = getnewindex()) == -1) myerror(DP_EMISC);
+- name = STR2CSTR(vname);
++ name = StringValuePtr(vname);
+ FIXNUM_P(vomode);
+ omode = FIX2INT(vomode);
+ FIXNUM_P(vcmode);
+@@ -352,10 +352,10 @@ static VALUE rbvlput(VALUE vself, VALUE
+ int index, ksiz, vsiz, dmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vdmode);
+ dmode = FIX2INT(vdmode);
+ villa = vltable[index];
+@@ -373,8 +373,8 @@ static VALUE rbvlout(VALUE vself, VALUE
+ int index, ksiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ if(!vlout(villa, kbuf, ksiz)){
+ if(vlsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
+@@ -391,8 +391,8 @@ static VALUE rbvlget(VALUE vself, VALUE
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ if(!(vbuf = vlget(villa, kbuf, ksiz, &vsiz))){
+ if(vlsltable[index] && dpecode == DP_ENOITEM) return Qnil;
+@@ -409,8 +409,8 @@ static VALUE rbvlvsiz(VALUE vself, VALUE
+ int index, ksiz, vsiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ if((vsiz = vlvsiz(villa, kbuf, ksiz)) == -1){
+ if(vlsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1);
+@@ -426,8 +426,8 @@ static VALUE rbvlvnum(VALUE vself, VALUE
+ int index, ksiz, vnum;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ vnum = vlvnum(villa, kbuf, ksiz);
+ return INT2FIX(vnum);
+@@ -497,8 +497,8 @@ static VALUE rbvlcurjump(VALUE vself, VA
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ FIXNUM_P(vjmode);
+ jmode = FIX2INT(vjmode);
+ villa = vltable[index];
+@@ -551,8 +551,8 @@ static VALUE rbvlcurput(VALUE vself, VAL
+ int index, vsiz, cpmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vcpmode);
+ cpmode = FIX2INT(vcpmode);
+ villa = vltable[index];
diff --git a/databases/ruby-qdbm/Makefile b/databases/ruby-qdbm/Makefile
index 79661352da1..55dcabc53fa 100644
--- a/databases/ruby-qdbm/Makefile
+++ b/databases/ruby-qdbm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2009/12/23 07:34:25 obache Exp $
+# $NetBSD: Makefile,v 1.11 2010/09/10 04:07:53 taca Exp $
#
.include "../../databases/qdbm/Makefile.common"
@@ -26,7 +26,6 @@ TEST_TARGET= check
#USE_RUBY_EXTCONF= yes
#RUBY_EXTCONF_SUBDIRS= ${MY_SUBDIR}/curia ${MY_SUBDIR}/depot ${MY_SUBDIR}/villa
RUBY_EXTCONF_ARGS= --with-opt-dir=${PREFIX:Q} --vendor
-RUBY_HAS_ARCHLIB= yes
USE_TOOLS+= gmake
REPLACE_RUBY= ${MY_SUBDIR}/curia/rbcrtest ${MY_SUBDIR}/depot/rbdptest \