root/root-ruby-version.patch
Mattias Ellert d7c587d5ba Rebuild for ruby 2.0
- Rebuild for cfitsio 3.330
2013-03-23 04:20:57 +01:00

69 lines
2.4 KiB
Diff

diff -ur root-5.34.05.orig/bindings/ruby/src/drr.cxx root-5.34.05/bindings/ruby/src/drr.cxx
--- root-5.34.05.orig/bindings/ruby/src/drr.cxx 2013-02-14 23:27:40.000000000 +0100
+++ root-5.34.05/bindings/ruby/src/drr.cxx 2013-03-22 17:06:56.516498395 +0100
@@ -163,36 +163,6 @@
return arr;
}
-void * rr_parse_void (VALUE o)
-{
- VALUE *i;
-
- switch (TYPE(o))
- {
- case T_STRING:
- return (void *) RSTRING_PTR(o);
- case T_FLOAT:
- return (void *) &RFLOAT_VALUE(o);
- case T_FIXNUM:
- /* FIXME: Memory leak until I find the correct way. Until
- * then please use integers in TTrees with care. --elathan
- */
- i = (VALUE*) malloc (sizeof(VALUE));
- *i = (int) (o>>1);
- return (void *) i;
- case T_OBJECT:
- RRGRAB(o, void *, res);
- return res;
- default:
- VALUE tmp = CLASS_OF(o);
- rb_fatal ("Failed convertion of %d to void *.\n",
- StringValuePtr(tmp));
- break;
- }
-
- return (void *) NULL;
-}
-
VALUE rr_bool (Bool_t q)
{
VALUE res = Qnil;
diff -ur root-5.34.05.orig/bindings/ruby/src/rrcommon.h root-5.34.05/bindings/ruby/src/rrcommon.h
--- root-5.34.05.orig/bindings/ruby/src/rrcommon.h 2013-02-14 23:27:40.000000000 +0100
+++ root-5.34.05/bindings/ruby/src/rrcommon.h 2013-03-22 17:06:25.969498395 +0100
@@ -97,8 +97,6 @@
VALUE rr_arrayd_new (const TArrayD *a);
VALUE rr_seqcollection_new (TSeqCollection *sc);
-void * rr_parse_void (VALUE o);
-
/* mod convertions */
void rr_tattfill_conv(void **ptr, VALUE klass);
void rr_tattline_conv(void **ptr, VALUE klass);
diff -ur root-5.34.05.orig/configure root-5.34.05/configure
--- root-5.34.05.orig/configure 2013-02-14 23:27:56.000000000 +0100
+++ root-5.34.05/configure 2013-03-22 17:05:56.299498395 +0100
@@ -6850,9 +6850,10 @@
if test ! "x$enable_ruby" = "xno"; then
echo "" >> RConfigOptions-out.tmp
- ruby -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]' | \
- sed 's/^\([0-9]\)\.\([0-9]\).*$/#define R__RUBY_MAJOR \1@#define R__RUBY_MINOR \2/' | \
- tr '@' '\n' >> RConfigOptions-out.tmp
+ RUBY_MAJOR=`ruby -rrbconfig -e 'puts RbConfig::CONFIG["MAJOR"]'`
+ RUBY_MINOR=`ruby -rrbconfig -e 'puts RbConfig::CONFIG["MINOR"]'`
+ echo "#define R__RUBY_MAJOR $RUBY_MAJOR" >> RConfigOptions-out.tmp
+ echo "#define R__RUBY_MINOR $RUBY_MINOR" >> RConfigOptions-out.tmp
fi
# only update $CONFIGOPTOUT when different