summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2010-09-13 03:05:24 +0000
committertaca <taca@pkgsrc.org>2010-09-13 03:05:24 +0000
commit8cffee2229d35841bd8d33f135637f1d045a23db (patch)
tree417923eba26672b93796504eca3b2b006364b697
parentdc9a3c0d4dd17cb22bad9c8cf3f90d5d12a31740 (diff)
downloadpkgsrc-8cffee2229d35841bd8d33f135637f1d045a23db.tar.gz
One more patches I forgot to commit.
These patches fix the build problem with ruby19 and no functional change with ruby18.
-rw-r--r--www/clearsilver/distinfo5
-rw-r--r--www/clearsilver/patches/patch-ad17
-rw-r--r--www/clearsilver/patches/patch-ae35
-rw-r--r--www/clearsilver/patches/patch-af228
4 files changed, 266 insertions, 19 deletions
diff --git a/www/clearsilver/distinfo b/www/clearsilver/distinfo
index 7d8700f7edd..beba660af6d 100644
--- a/www/clearsilver/distinfo
+++ b/www/clearsilver/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.14 2009/02/13 15:06:24 joerg Exp $
+$NetBSD: distinfo,v 1.15 2010/09/13 03:05:24 taca Exp $
SHA1 (clearsilver-0.10.5.tar.gz) = 138865dc91e27328fe29fcaaac1bc6558f19dd75
RMD160 (clearsilver-0.10.5.tar.gz) = bd5c616f326b544df8a74eec71a98a474b408249
Size (clearsilver-0.10.5.tar.gz) = 439190 bytes
SHA1 (patch-aa) = cf8708c4bee271d39eca2b1833302fa13aee2b6d
-SHA1 (patch-ad) = 59ae45b8f42d5ffd15f18e071d600ed59837b49a
+SHA1 (patch-ae) = 58326210ecef3936579a19f3cbcb9b9374bc3541
+SHA1 (patch-af) = e88106bb0c57d632c348bc16ff673e0ef7487847
diff --git a/www/clearsilver/patches/patch-ad b/www/clearsilver/patches/patch-ad
deleted file mode 100644
index e19e1f0666f..00000000000
--- a/www/clearsilver/patches/patch-ad
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2008/06/19 15:19:25 taca Exp $
-
---- ruby/install.rb.orig 2005-06-30 18:51:57.000000000 +0000
-+++ ruby/install.rb
-@@ -68,9 +68,9 @@ class ConfigTable
- if c['rubylibdir'] then
- # 1.6.3 < V
- stdruby = subprefix.call(c['rubylibdir'])
-- siteruby = subprefix.call(c['sitedir'])
-- versite = subprefix.call(c['sitelibdir'])
-- sodir = subprefix.call(c['sitearchdir'])
-+ siteruby = subprefix.call(c['vendordir'])
-+ versite = subprefix.call(c['vendorlibdir'])
-+ sodir = subprefix.call(c['vendorarchdir'])
- elsif newpath_p then
- # 1.4.4 <= V <= 1.6.3
- stdruby = "$prefix/lib/ruby/#{version}"
diff --git a/www/clearsilver/patches/patch-ae b/www/clearsilver/patches/patch-ae
new file mode 100644
index 00000000000..55cbdf4fc72
--- /dev/null
+++ b/www/clearsilver/patches/patch-ae
@@ -0,0 +1,35 @@
+$NetBSD: patch-ae,v 1.3 2010/09/13 03:05:24 taca Exp $
+
+Use modern Ruby's API.
+
+--- ruby/ext/hdf/neo_cs.c.orig 2007-02-16 00:31:39.000000000 +0000
++++ ruby/ext/hdf/neo_cs.c
+@@ -19,7 +19,7 @@ extern VALUE eHdfError;
+
+ VALUE r_neo_error(NEOERR *err);
+
+-#define Srb_raise(val) rb_raise(eHdfError, "%s/%d %s",__FILE__,__LINE__,RSTRING(val)->ptr)
++#define Srb_raise(val) rb_raise(eHdfError, "%s/%d %s",__FILE__,__LINE__,RSTRING_PTR(val))
+
+ static void c_free (CSPARSE *csd) {
+ if (csd) {
+@@ -57,7 +57,7 @@ static VALUE c_parse_file (VALUE self, V
+ char *path;
+
+ Data_Get_Struct(self, CSPARSE, cs);
+- path = STR2CSTR(oPath);
++ path = StringValuePtr(oPath);
+
+ err = cs_parse_file (cs, path);
+ if (err) Srb_raise(r_neo_error(err));
+@@ -73,7 +73,9 @@ static VALUE c_parse_str (VALUE self, VA
+ long l;
+
+ Data_Get_Struct(self, CSPARSE, cs);
+- s = rb_str2cstr(oString, &l);
++ StringValue(oString);
++ s= RSTRING_PTR(oString);
++ l = RSTRING_LEN(oString);
+
+ /* This should be changed to use memory from the gc */
+ ms = strdup(s);
diff --git a/www/clearsilver/patches/patch-af b/www/clearsilver/patches/patch-af
new file mode 100644
index 00000000000..40c4684923f
--- /dev/null
+++ b/www/clearsilver/patches/patch-af
@@ -0,0 +1,228 @@
+$NetBSD: patch-af,v 1.1 2010/09/13 03:05:24 taca Exp $
+
+Use modern Ruby's API.
+
+--- ruby/ext/hdf/neo_util.c.orig 2007-02-16 00:32:03.000000000 +0000
++++ ruby/ext/hdf/neo_util.c
+@@ -10,7 +10,6 @@
+ */
+
+ #include <ruby.h>
+-#include <version.h>
+ #include "ClearSilver.h"
+ #include "neo_ruby.h"
+
+@@ -19,7 +18,7 @@ static VALUE cHdf;
+ VALUE eHdfError;
+ static ID id_to_s;
+
+-#define Srb_raise(val) rb_raise(eHdfError, "%s/%d %s",__FILE__,__LINE__,RSTRING(val)->ptr)
++#define Srb_raise(val) rb_raise(eHdfError, "%s/%d %s",__FILE__,__LINE__,RSTRING_PTR(val))
+
+ VALUE r_neo_error (NEOERR *err)
+ {
+@@ -96,7 +95,7 @@ static VALUE h_get_attr (VALUE self, VAL
+ VALUE rv;
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+- name = STR2CSTR(oName);
++ name = StringValuePtr(oName);
+
+ rv = rb_hash_new();
+
+@@ -118,12 +117,12 @@ static VALUE h_set_attr(VALUE self, VALU
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+
+- name = STR2CSTR(oName);
+- key = STR2CSTR(oKey);
++ name = StringValuePtr(oName);
++ key = StringValuePtr(oKey);
+ if ( NIL_P(oValue) )
+ value = NULL;
+ else
+- value = STR2CSTR(oValue);
++ value = StringValuePtr(oValue);
+
+ err = hdf_set_attr(hdfh->hdf, name, key, value);
+ if (err) Srb_raise(r_neo_error(err));
+@@ -140,14 +139,21 @@ static VALUE h_set_value (VALUE self, VA
+ Data_Get_Struct(self, t_hdfh, hdfh);
+
+ if ( TYPE(oName) == T_STRING )
+- name=STR2CSTR(oName);
+- else
+- name=STR2CSTR(rb_funcall(oName,id_to_s,0));
++ name=StringValuePtr(oName);
++ else {
++ VALUE v;
++
++ v =rb_funcall(oName,id_to_s,0);
++ name=StringValuePtr(v);
++ }
+
+ if ( TYPE(oValue) == T_STRING )
+- value=STR2CSTR(oValue);
+- else
+- value=STR2CSTR(rb_funcall(oValue,id_to_s,0));
++ value=StringValuePtr(oValue);
++ else {
++ VALUE v;
++ v = rb_funcall(oValue,id_to_s,0);
++ value=StringValuePtr(v);
++ }
+
+ err = hdf_set_value (hdfh->hdf, name, value);
+
+@@ -165,7 +171,7 @@ static VALUE h_get_int_value (VALUE self
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+
+- name=STR2CSTR(oName);
++ name=StringValuePtr(oName);
+ d=NUM2INT(oDefault);
+
+ r = hdf_get_int_value (hdfh->hdf, name, d);
+@@ -181,8 +187,8 @@ static VALUE h_get_value (VALUE self, VA
+ VALUE rv;
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+- name=STR2CSTR(oName);
+- d=STR2CSTR(oDefault);
++ name=StringValuePtr(oName);
++ d=StringValuePtr(oDefault);
+
+ r = hdf_get_value (hdfh->hdf, name, d);
+ rv = rb_str_new2(r);
+@@ -197,7 +203,7 @@ static VALUE h_get_child (VALUE self, VA
+ char *name;
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+- name=STR2CSTR(oName);
++ name=StringValuePtr(oName);
+
+ r = hdf_get_child (hdfh->hdf, name);
+ if (r == NULL) {
+@@ -219,7 +225,7 @@ static VALUE h_get_obj (VALUE self, VALU
+ char *name;
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+- name=STR2CSTR(oName);
++ name=StringValuePtr(oName);
+
+ r = hdf_get_obj (hdfh->hdf, name);
+ if (r == NULL) {
+@@ -243,7 +249,7 @@ static VALUE h_get_node (VALUE self, VAL
+ NEOERR *err;
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+- name=STR2CSTR(oName);
++ name=StringValuePtr(oName);
+
+ err = hdf_get_node (hdfh->hdf, name, &r);
+ if (err)
+@@ -384,7 +390,7 @@ static VALUE h_read_file (VALUE self, VA
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+
+- path=STR2CSTR(oPath);
++ path=StringValuePtr(oPath);
+
+ err = hdf_read_file (hdfh->hdf, path);
+ if (err) Srb_raise(r_neo_error(err));
+@@ -400,7 +406,7 @@ static VALUE h_write_file (VALUE self, V
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+
+- path=STR2CSTR(oPath);
++ path=StringValuePtr(oPath);
+
+ err = hdf_write_file (hdfh->hdf, path);
+
+@@ -417,7 +423,7 @@ static VALUE h_write_file_atomic (VALUE
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+
+- path=STR2CSTR(oPath);
++ path=StringValuePtr(oPath);
+
+ err = hdf_write_file_atomic (hdfh->hdf, path);
+ if (err) Srb_raise(r_neo_error(err));
+@@ -432,7 +438,7 @@ static VALUE h_remove_tree (VALUE self,
+ NEOERR *err;
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+- name = STR2CSTR(oName);
++ name = StringValuePtr(oName);
+
+ err = hdf_remove_tree (hdfh->hdf, name);
+ if (err) Srb_raise(r_neo_error(err));
+@@ -489,7 +495,7 @@ static VALUE h_read_string (VALUE self,
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+
+- s = STR2CSTR(oString);
++ s = StringValuePtr(oString);
+ ignore = NUM2INT(oIgnore);
+
+ err = hdf_read_string_ignore (hdfh->hdf, s, ignore);
+@@ -508,7 +514,7 @@ static VALUE h_copy (VALUE self, VALUE o
+ Data_Get_Struct(self, t_hdfh, hdfh);
+ Data_Get_Struct(oHdfSrc, t_hdfh, hdfh_src);
+
+- name = STR2CSTR(oName);
++ name = StringValuePtr(oName);
+
+ if (hdfh_src == NULL) rb_raise(eHdfError, "second argument must be an Hdf object");
+
+@@ -526,8 +532,8 @@ static VALUE h_set_symlink (VALUE self,
+ NEOERR *err;
+
+ Data_Get_Struct(self, t_hdfh, hdfh);
+- src = STR2CSTR(oSrc);
+- dest = STR2CSTR(oDest);
++ src = StringValuePtr(oSrc);
++ dest = StringValuePtr(oDest);
+
+ err = hdf_set_symlink (hdfh->hdf, src, dest);
+ if (err) Srb_raise(r_neo_error(err));
+@@ -545,9 +551,11 @@ static VALUE h_escape (VALUE self, VALUE
+ char *ret = NULL;
+ NEOERR *err;
+
+- s = rb_str2cstr(oString,&buflen);
+- esc_char = STR2CSTR(oEsc_char);
+- escape = STR2CSTR(oEsc);
++ StringValue(oString);
++ s = RSTRING_PTR(oString);
++ buflen = RSTRING_LEN(oString);
++ esc_char = StringValuePtr(oEsc_char);
++ escape = StringValuePtr(oEsc);
+
+ err = neos_escape((UINT8*)s, buflen, esc_char[0], escape, &ret);
+
+@@ -566,8 +574,10 @@ static VALUE h_unescape (VALUE self, VAL
+ char *esc_char;
+ long buflen;
+
+- s = rb_str2cstr(oString,&buflen);
+- esc_char = STR2CSTR(oEsc_char);
++ StringValue(oString);
++ s = RSTRING_PTR(oString);
++ buflen = RSTRING_LEN(oString);
++ esc_char = StringValuePtr(oEsc_char);
+
+ /* This should be changed to use memory from the gc */
+ copy = strdup(s);
+@@ -620,11 +630,7 @@ void Init_hdf() {
+ rb_define_singleton_method(cHdf, "unescape", h_unescape, 3);
+
+ eHdfError = rb_define_class_under(mNeotonic, "HdfError",
+-#if RUBY_VERSION_MINOR >= 6
+ rb_eStandardError);
+-#else
+- rb_eException);
+-#endif
+
+ Init_cs();
+ }