[DRE-commits] [ruby-gsl] 07/11: Refresh patches
Balint Reczey
rbalint at moszumanska.debian.org
Mon Jun 8 15:31:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
rbalint pushed a commit to branch master
in repository ruby-gsl.
commit 98a5c147a4f13eae8859f0b5bd405b2672583e6a
Author: Balint Reczey <balint at balintreczey.hu>
Date: Mon Jun 8 16:34:25 2015 +0200
Refresh patches
---
debian/patches/001_adding_bash.patch | 14 --
debian/patches/002_min.c.patch | 4 +-
debian/patches/20110605_extconf.rb | 23 +--
debian/patches/20110605_matrix_complex.c | 22 ---
debian/patches/20110605_vector_complex.c | 22 ---
debian/patches/20130815_deprecated_enum.patch | 58 ------
.../20131016_deactivate_failing_tests.patch | 49 -----
debian/patches/20131016_fix_test_typo.patch | 16 --
.../20131016_test_output_less_verbose.patch | 129 -------------
debian/patches/port-to-ruby2.1.patch | 202 ---------------------
debian/patches/series | 8 -
11 files changed, 9 insertions(+), 538 deletions(-)
diff --git a/debian/patches/001_adding_bash.patch b/debian/patches/001_adding_bash.patch
deleted file mode 100644
index cf7992e..0000000
--- a/debian/patches/001_adding_bash.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: make run-test.sh script use the Bash interpreter
- This script contains bashisms.
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530117
-Last-Update: 2013-11-29
-
---- a/tests/run-test.sh
-+++ b/tests/run-test.sh
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
-
- topdir=".."
- for f in `find . -name '*.rb'`; do
diff --git a/debian/patches/002_min.c.patch b/debian/patches/002_min.c.patch
index 116c960..6bb44b0 100644
--- a/debian/patches/002_min.c.patch
+++ b/debian/patches/002_min.c.patch
@@ -3,8 +3,8 @@ Origin: vendor
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=443013
Last-Update: 2013-11-29
---- a/ext/min.c
-+++ b/ext/min.c
+--- a/ext/gsl/min.c
++++ b/ext/gls/min.c
@@ -134,7 +134,7 @@
Data_Get_Struct(obj, gsl_min_fminimizer, gmf);
return rb_float_new(gsl_min_fminimizer_x_upper(gmf));
diff --git a/debian/patches/20110605_extconf.rb b/debian/patches/20110605_extconf.rb
index 0d9f29e..38d8189 100644
--- a/debian/patches/20110605_extconf.rb
+++ b/debian/patches/20110605_extconf.rb
@@ -2,23 +2,14 @@ Description: install in $vendorarchdir according to Debian Ruby Policy
Origin: vendor
Last-Update: 2013-10-16
---- a/ext/extconf.rb
-+++ b/ext/extconf.rb
-@@ -243,7 +243,7 @@
+--- a/ext/gsl/extconf.rb
++++ b/ext/gsl/extconf.rb
+@@ -22,7 +22,7 @@
end
- #narray_config = dir_config("narray")
--narray_config = dir_config('narray',$sitearchdir,$sitearchdir)
-+narray_config = dir_config('narray',$vendorarchdir,$vendorarchdir)
- # Try to find narray with RubyGems
- begin
- require 'rubygems'
-@@ -262,7 +262,7 @@
- end
+ def gsl_dir_config(target, idir = nil, ldir = idir)
+- dir_config(target, idir || $sitearchdir, ldir || $sitearchdir)
++ dir_config(target, idir || $vendorarchdir, ldir || $vendorarchdir)
end
--tamu_anova_config = dir_config('tamu_anova',$sitearchdir,$sitearchdir)
-+tamu_anova_config = dir_config('tamu_anova',$vendorarchdir,$vendorarchdir)
- have_tamu_anova_h = have_header("tamu_anova/tamu_anova.h")
- if tamu_anova_config
- have_library("tamuanova")
+ def gsl_gem_config(target, dir = 'ext')
diff --git a/debian/patches/20110605_matrix_complex.c b/debian/patches/20110605_matrix_complex.c
deleted file mode 100644
index fb257fb..0000000
--- a/debian/patches/20110605_matrix_complex.c
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: ruby-gsl/ext/matrix_complex.c
-===================================================================
---- ruby-gsl.orig/ext/matrix_complex.c 2011-06-05 20:42:48.000000000 +0900
-+++ ruby-gsl/ext/matrix_complex.c 2011-06-05 20:43:12.000000000 +0900
-@@ -1520,7 +1520,7 @@
- }
-
-
--static int gsl_matrix_complex_equal(const gsl_matrix_complex *m1,
-+static int gsl_matrix_complex_equal_eps(const gsl_matrix_complex *m1,
- const gsl_matrix_complex *m2, double eps)
- {
- gsl_complex z1, z2;
-@@ -1555,7 +1555,7 @@
- Data_Get_Struct(obj, gsl_matrix_complex, m1);
- CHECK_MATRIX_COMPLEX(argv[0]);
- Data_Get_Struct(argv[0], gsl_matrix_complex, m2);
-- ret = gsl_matrix_complex_equal(m1, m2, eps);
-+ ret = gsl_matrix_complex_equal_eps(m1, m2, eps);
- if (ret == 1) return Qtrue;
- else return Qfalse;
- }
diff --git a/debian/patches/20110605_vector_complex.c b/debian/patches/20110605_vector_complex.c
deleted file mode 100644
index 488ee32..0000000
--- a/debian/patches/20110605_vector_complex.c
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: ruby-gsl/ext/vector_complex.c
-===================================================================
---- ruby-gsl.orig/ext/vector_complex.c 2011-06-05 20:41:34.000000000 +0900
-+++ ruby-gsl/ext/vector_complex.c 2011-06-05 20:42:13.000000000 +0900
-@@ -1986,7 +1986,7 @@
- return ary;
- }
-
--static int gsl_vector_complex_equal(const gsl_vector_complex *v1,
-+static int gsl_vector_complex_equal_eps(const gsl_vector_complex *v1,
- const gsl_vector_complex *v2, double eps)
- {
- gsl_complex z1, z2;
-@@ -2019,7 +2019,7 @@
- Data_Get_Struct(obj, gsl_vector_complex, v1);
- CHECK_VECTOR_COMPLEX(argv[0]);
- Data_Get_Struct(argv[0], gsl_vector_complex, v2);
-- ret = gsl_vector_complex_equal(v1, v2, eps);
-+ ret = gsl_vector_complex_equal_eps(v1, v2, eps);
- if (ret == 1) return Qtrue;
- else return Qfalse;
- }
diff --git a/debian/patches/20130815_deprecated_enum.patch b/debian/patches/20130815_deprecated_enum.patch
deleted file mode 100644
index 8d76043..0000000
--- a/debian/patches/20130815_deprecated_enum.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Description: rename deprecated enum
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718070
-Origin: vendor
-Author: Guillaume Bouteille <duffman at gb2n.org>
-Last-Update: 2013-10-16
-
---- a/ext/fft.c
-+++ b/ext/fft.c
-@@ -907,10 +907,10 @@
-
- /*****/
-
-- rb_define_const(mgsl_fft, "Forward", INT2FIX(forward));
-- rb_define_const(mgsl_fft, "FORWARD", INT2FIX(forward));
-- rb_define_const(mgsl_fft, "Backward", INT2FIX(backward));
-- rb_define_const(mgsl_fft, "BACKWARD", INT2FIX(backward));
-+ rb_define_const(mgsl_fft, "Forward", INT2FIX(gsl_fft_forward));
-+ rb_define_const(mgsl_fft, "FORWARD", INT2FIX(gsl_fft_forward));
-+ rb_define_const(mgsl_fft, "Backward", INT2FIX(gsl_fft_backward));
-+ rb_define_const(mgsl_fft, "BACKWARD", INT2FIX(gsl_fft_backward));
-
- /* Transforms for complex vectors */
- rb_define_method(cgsl_vector_complex, "radix2_forward",
---- a/ext/wavelet.c
-+++ b/ext/wavelet.c
-@@ -152,10 +152,10 @@
- rb_define_const(klass, "BSPLINE", INT2FIX(GSL_WAVELET_BSPLINE));
- rb_define_const(klass, "BSPLINE_CENTERED", INT2FIX(GSL_WAVELET_BSPLINE_CENTERED));
- /*****/
-- rb_define_const(klass, "FORWARD", INT2FIX(forward));
-- rb_define_const(klass, "Forward", INT2FIX(forward));
-- rb_define_const(klass, "BACKWARD", INT2FIX(backward));
-- rb_define_const(klass, "Backward", INT2FIX(backward));
-+ rb_define_const(klass, "FORWARD", INT2FIX(gsl_wavelet_forward));
-+ rb_define_const(klass, "Forward", INT2FIX(gsl_wavelet_forward));
-+ rb_define_const(klass, "BACKWARD", INT2FIX(gsl_wavelet_backward));
-+ rb_define_const(klass, "Backward", INT2FIX(gsl_wavelet_backward));
- }
-
- static VALUE rb_gsl_wavelet_name(VALUE ww)
-@@ -191,7 +191,7 @@
- {
- gsl_wavelet *w = NULL;
- gsl_vector *v = NULL, *vnew;
-- gsl_wavelet_direction dir = forward;
-+ gsl_wavelet_direction dir = gsl_wavelet_forward;
- gsl_wavelet_workspace *work = NULL;
- int itmp, flag = 0;
- // local variable "status" declared and set, but never used
-@@ -531,7 +531,7 @@
- {
- gsl_wavelet *w = NULL;
- gsl_matrix *m = NULL, *mnew;
-- gsl_wavelet_direction dir = forward;
-+ gsl_wavelet_direction dir = gsl_wavelet_forward;
- gsl_wavelet_workspace *work = NULL;
- VALUE ary, ret;
- int itmp, flag = 0;
diff --git a/debian/patches/20131016_deactivate_failing_tests.patch b/debian/patches/20131016_deactivate_failing_tests.patch
deleted file mode 100644
index 80458a3..0000000
--- a/debian/patches/20131016_deactivate_failing_tests.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Description: skip failing tests on amd64
-Bug: https://github.com/david-macmahon/rb-gsl/issues/1
-Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2013-11-30
-
---- a/tests/eigen/nonsymm.rb
-+++ b/tests/eigen/nonsymm.rb
-@@ -36,7 +36,7 @@
- # This test fails in Darwin9.5.0-gcc4.0.1
- # expected: 5
- # obtained: 4.99999999999999911
--GSL::Test::test_abs(eval[2], 5, 0, "GSL::Matrix::eigen_nonsymm")
-+#GSL::Test::test_abs(eval[2], 5, 0, "GSL::Matrix::eigen_nonsymm")
-
- m = GSL::Matrix[[-3, 1, -1], [-7, 5, -1], [-6, 6, -2]]
- p m
---- a/tests/odeiv.rb
-+++ b/tests/odeiv.rb
-@@ -334,7 +334,9 @@
- GSL::IEEE::env_setup()
-
- ptypes.each do |hash|
-- test_stepper_err(hash["type"], hash["h"], GSL::SQRT_DBL_EPSILON)
-+ unless hash["type"]=="bsimp" #test failing
-+ test_stepper_err(hash["type"], hash["h"], GSL::SQRT_DBL_EPSILON)
-+ end
- end
-
- ptypes.each do |hash|
---- a/tests/matrix/matrix_nmf_test.rb
-+++ b/tests/matrix/matrix_nmf_test.rb
-@@ -18,7 +18,7 @@
- assert_equal(4, GSL::Matrix::NMF.difcost(@m1, @m2))
- end
-
-- def test_nmf
-+ def _test_nmf
- [2, 3, 4, 5].each do |cols|
- res = GSL::Matrix::NMF.nmf(@m1, cols)
- assert_equal([3,cols], res[0].size)
-@@ -27,7 +27,7 @@
- assert(cost <= 0.000001, "Cols: #{cols}, Delta: #{cost}")
- end
- end
-- def test_matrix_nmf
-+ def _test_matrix_nmf
- [2, 3, 4, 5].each do |cols|
- res = @m1.nmf(cols)
- assert_equal([3,cols], res[0].size)
diff --git a/debian/patches/20131016_fix_test_typo.patch b/debian/patches/20131016_fix_test_typo.patch
deleted file mode 100644
index ad50f10..0000000
--- a/debian/patches/20131016_fix_test_typo.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: fix typo in a variable name in tests/linalg/TDN
-Author: Cédric Boutillier
-Last-Update: 2013-10-16
-Bug: https://github.com/david-macmahon/rb-gsl/pull/2
-
---- a/tests/linalg/TDN.rb
-+++ b/tests/linalg/TDN.rb
-@@ -100,7 +100,7 @@
- s += f;
-
- actual[0] = -5.0/22.0;
-- qactual[1] = -3.0/22.0;
-+ actual[1] = -3.0/22.0;
- actual[2] = 29.0/22.0;
- actual[3] = -9.0/22.0;
- actual[4] = 43.0/22.0;
diff --git a/debian/patches/20131016_test_output_less_verbose.patch b/debian/patches/20131016_test_output_less_verbose.patch
deleted file mode 100644
index 9bc0316..0000000
--- a/debian/patches/20131016_test_output_less_verbose.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-Description: skip output when the test is passing
- and exit with nonzero error code when the test is failing
-Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2013-10-16
-Forwarded: no
-
---- a/tests/gsl_test2.rb
-+++ b/tests/gsl_test2.rb
-@@ -14,7 +14,7 @@
- $tests += 1
- if status == 0
- $passed += 1
-- printf("PASS: #{desc}\n")
-+ #printf("PASS: #{desc}\n")
- else
- $failed += 1
- printf("FAIL: #{desc}\n")
-@@ -26,7 +26,7 @@
- $tests += 1
- if status == true
- $passed += 1
-- printf("PASS: #{desc}\n")
-+ #printf("PASS: #{desc}\n")
- else
- $failed += 1
- printf("FAIL: #{desc}\n")
-@@ -46,7 +46,7 @@
- $tests += 1
- if status == 0
- $passed += 1
-- printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%.18g observed vs %.18g expected)\n", result, expected)
-@@ -67,7 +67,7 @@
- $tests += 1
- if status == 0
- $passed += 1
-- printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%.18g observed vs %.18g expected)\n", result, expected)
-@@ -86,7 +86,7 @@
- $tests += 1
- if status == 0
- $passed += 1
-- printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%.18g observed vs %.18g expected)\n", result, expected)
-@@ -98,7 +98,7 @@
- $tests += 1
- if status == 0
- $passed += 1
-- printf("PASS: #{desc} (%d observed vs %d expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%d observed vs %d expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%d observed vs %d expected)\n", result, expected)
-@@ -108,3 +108,4 @@
- end
- end
-
-+at_exit { exit $failed }
---- a/tests/gsl_test.rb
-+++ b/tests/gsl_test.rb
-@@ -13,7 +13,7 @@
- $tests += 1
- if !status
- $passed += 1
-- printf("PASS: #{desc}\n")
-+ #printf("PASS: #{desc}\n")
- else
- $failed += 1
- printf("FAIL: #{desc}\n")
-@@ -33,7 +33,7 @@
- $tests += 1
- if !status
- $passed += 1
-- printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%.18g observed vs %.18g expected)\n", result, expected)
-@@ -53,7 +53,7 @@
- $tests += 1
- if !status
- $passed += 1
-- printf("PASS: #{desc} (%.18g observed vs %g expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%.18g observed vs %g expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%.18g observed vs %.18g expected)\n", result, expected)
-@@ -74,7 +74,7 @@
- $tests += 1
- if !status
- $passed += 1
-- printf("PASS: #{desc} (%.18g observed vs %g expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%.18g observed vs %g expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%.18g observed vs %.18g expected)\n", result, expected)
-@@ -94,7 +94,7 @@
- if !status
- $passed += 1
- # printf("PASS: #{desc} (%g observed vs %g expected)\n", result, expected)
-- printf("PASS: #{desc} (%.18g observed vs %g expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%.18g observed vs %g expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%.18g observed vs %.18g expected)\n", result, expected)
-@@ -106,7 +106,7 @@
- $tests += 1
- if !status
- $passed += 1
-- printf("PASS: #{desc} (%d observed vs %d expected)\n", result, expected)
-+ #printf("PASS: #{desc} (%d observed vs %d expected)\n", result, expected)
- else
- $failed += 1
- printf("FAIL: #{desc} (%d observed vs %d expected)\n", result, expected)
-@@ -116,3 +116,5 @@
- end
- end
-
-+at_exit {exit $failed}
-+
diff --git a/debian/patches/port-to-ruby2.1.patch b/debian/patches/port-to-ruby2.1.patch
deleted file mode 100644
index c85d3aa..0000000
--- a/debian/patches/port-to-ruby2.1.patch
+++ /dev/null
@@ -1,202 +0,0 @@
---- a/ext/linalg.c
-+++ b/ext/linalg.c
-@@ -14,6 +14,7 @@
- #include "rb_gsl_array.h"
- #include "rb_gsl_common.h"
- #include "rb_gsl_linalg.h"
-+#include "porting.h"
-
- static VALUE cgsl_matrix_LU;
- static VALUE cgsl_matrix_QR;
-@@ -71,7 +72,7 @@ static VALUE rb_gsl_linalg_LU_decomposit
- Data_Get_Struct(omatrix, gsl_matrix, mtmp);
- if (flag == LINALG_DECOMP_BANG) {
- m = mtmp;
-- RBASIC(omatrix)->klass = cgsl_matrix_LU;
-+ rb_obj_reveal(omatrix, cgsl_matrix_LU);
- objm = omatrix;
- } else {
- m = make_matrix_clone(mtmp);
-@@ -692,7 +693,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decompo
- fdecomp = &gsl_linalg_QR_decomp;
- m = mtmp;
- mdecomp = omatrix;
-- RBASIC(mdecomp)->klass = cgsl_matrix_QR;
-+ rb_obj_reveal(mdecomp, cgsl_matrix_QR);
- break;
- #ifdef GSL_1_6_LATER
- case LINALG_LQ_DECOMP:
-@@ -704,7 +705,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decompo
- fdecomp = &gsl_linalg_LQ_decomp;
- m = mtmp;
- mdecomp = omatrix;
-- RBASIC(mdecomp)->klass = cgsl_matrix_LQ;
-+ rb_obj_reveal(mdecomp, cgsl_matrix_LQ);
- break;
- #endif
- default:
-@@ -731,7 +732,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decompo
- vtau = Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
- return rb_ary_new3(2, mdecomp, vtau);
- } else {
-- RBASIC(argv[itmp])->klass = cgsl_vector_tau;
-+ rb_obj_reveal(argv[itmp], cgsl_vector_tau);
- return mdecomp;
- }
- break;
-@@ -740,7 +741,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decompo
- if (argc == itmp) {
- return Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
- } else {
-- RBASIC(argv[itmp])->klass = cgsl_vector_tau;
-+ rb_obj_reveal(argv[itmp], cgsl_vector_tau);
- return INT2FIX(status);
- }
- break;
-@@ -1628,14 +1629,14 @@ static VALUE rb_gsl_linalg_QRLQPT_decomp
- norm = gsl_vector_alloc(size0);
- switch (flag) {
- case LINALG_QRPT:
-- RBASIC(vA)->klass = cgsl_matrix_QRPT;
-+ rb_obj_reveal(vA, cgsl_matrix_QRPT);
- vtau = Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
- vp = Data_Wrap_Struct(cgsl_permutation, 0, gsl_permutation_free, p);
- gsl_linalg_QRPT_decomp(A, tau, p, &signum, norm);
- break;
- #ifdef GSL_1_6_LATER
- case LINALG_PTLQ:
-- RBASIC(vA)->klass = cgsl_matrix_PTLQ;
-+ rb_obj_reveal(vA, cgsl_matrix_PTLQ);
- vtau = Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
- vp = Data_Wrap_Struct(cgsl_permutation, 0, gsl_permutation_free, p);
- gsl_linalg_PTLQ_decomp(A, tau, p, &signum, norm);
---- a/ext/linalg_complex.c
-+++ b/ext/linalg_complex.c
-@@ -14,6 +14,7 @@
- #include "rb_gsl_array.h"
- #include "rb_gsl_common.h"
- #include "rb_gsl_linalg.h"
-+#include "porting.h"
-
- EXTERN VALUE mgsl_linalg;
- EXTERN VALUE cgsl_complex;
-@@ -51,8 +52,8 @@ VALUE rb_gsl_linalg_complex_LU_decomp(in
- case 0:
- p = gsl_permutation_alloc(size);
- gsl_linalg_complex_LU_decomp(m, p, &signum);
-- if (itmp == 1) RBASIC(argv[0])->klass = cgsl_matrix_complex_LU;
-- else RBASIC(obj)->klass = cgsl_matrix_complex_LU;
-+ if (itmp == 1) rb_obj_reveal(argv[0], cgsl_matrix_complex_LU);
-+ else rb_obj_reveal(obj, cgsl_matrix_complex_LU);
- obj2 = Data_Wrap_Struct(cgsl_permutation, 0, gsl_permutation_free, p);
- return rb_ary_new3(2, obj2, INT2FIX(signum));
- break;
-@@ -60,8 +61,8 @@ VALUE rb_gsl_linalg_complex_LU_decomp(in
- CHECK_PERMUTATION(argv[itmp]);
- Data_Get_Struct(argv[itmp], gsl_permutation, p);
- gsl_linalg_complex_LU_decomp(m, p, &signum);
-- if (itmp == 1) RBASIC(argv[0])->klass = cgsl_matrix_complex_LU;
-- else RBASIC(obj)->klass = cgsl_matrix_complex_LU;
-+ if (itmp == 1) rb_obj_reveal(argv[0], cgsl_matrix_complex_LU);
-+ else rb_obj_reveal(obj, cgsl_matrix_complex_LU);
- return INT2FIX(signum);
- break;
- default:
---- a/ext/ool.c
-+++ b/ext/ool.c
-@@ -2,6 +2,7 @@
- #include "rb_gsl.h"
- #include "rb_gsl_array.h"
- #include <ool/ool_conmin.h>
-+#include "porting.h"
-
- static VALUE cool_conmin_function;
- static VALUE cool_conmin_constraint;
-@@ -770,7 +771,7 @@ static VALUE rb_ool_conmin_pgrad_paramet
- VALUE ary;
- ool_conmin_parameters_default(ool_conmin_minimizer_pgrad, (void*) &P);
- ary = create_parameters_ary_pgrad(&P);
-- RBASIC(ary)->klass = cool_conmin_pgrad_parameters;
-+ rb_obj_reveal(ary, cool_conmin_pgrad_parameters);
- return ary;
- }
-
-@@ -780,7 +781,7 @@ static VALUE rb_ool_conmin_spg_parameter
- VALUE ary;
- ool_conmin_parameters_default(ool_conmin_minimizer_spg, (void*) &P);
- ary = create_parameters_ary_spg(&P);
-- RBASIC(ary)->klass = cool_conmin_spg_parameters;
-+ rb_obj_reveal(ary, cool_conmin_spg_parameters);
- return ary;
- }
-
-@@ -790,7 +791,7 @@ static VALUE rb_ool_conmin_gencan_parame
- VALUE ary;
- ool_conmin_parameters_default(ool_conmin_minimizer_gencan, (void*) &P);
- ary = create_parameters_ary_gencan(&P);
-- RBASIC(ary)->klass = cool_conmin_gencan_parameters;
-+ rb_obj_reveal(ary, cool_conmin_gencan_parameters);
- return ary;
- }
-
---- /dev/null
-+++ b/ext/porting.h
-@@ -0,0 +1,5 @@
-+#include <ruby/version.h>
-+
-+#if RUBY_API_VERSION_CODE < 20100
-+ #define rb_obj_reveal(o,k) RBASIC(o)->klass = k
-+#endif
---- a/ext/vector_complex.c
-+++ b/ext/vector_complex.c
-@@ -11,6 +11,7 @@
- #include "rb_gsl_config.h"
- #include "rb_gsl_array.h"
- #include "rb_gsl_complex.h"
-+#include "porting.h"
-
- EXTERN VALUE cgsl_complex;
- static VALUE rb_gsl_vector_complex_inner_product(int argc, VALUE *argv, VALUE obj);
-@@ -939,9 +940,9 @@ static VALUE rb_gsl_vector_complex_trans
- static VALUE rb_gsl_vector_complex_trans2(VALUE obj)
- {
- if (CLASS_OF(obj) == cgsl_vector_complex)
-- RBASIC(obj)->klass = cgsl_vector_complex_col;
-+ rb_obj_reveal(obj, cgsl_vector_complex_col);
- else if (CLASS_OF(obj) == cgsl_vector_complex_col)
-- RBASIC(obj)->klass = cgsl_vector_complex;
-+ rb_obj_reveal(obj, cgsl_vector_complex);
- else {
- rb_raise(rb_eRuntimeError, "method trans! for %s is forbidden",
- rb_class2name(CLASS_OF(obj)));
---- a/ext/vector_source.c
-+++ b/ext/vector_source.c
-@@ -36,6 +36,8 @@
- #define VEC_VIEW_P VECTOR_INT_VIEW_P
- #endif
-
-+#include "porting.h"
-+
- void FUNCTION(get_range,beg_en_n)(VALUE range, BASE *beg, BASE *en, size_t *n, int *step);
-
- void get_range_beg_en_n_for_size(VALUE range,
-@@ -673,15 +675,15 @@ static VALUE FUNCTION(rb_gsl_vector,tran
- static VALUE FUNCTION(rb_gsl_vector,trans_bang)(VALUE obj)
- {
- #ifdef BASE_DOUBLE
-- if (CLASS_OF(obj) == cgsl_vector) RBASIC(obj)->klass = cgsl_vector_col;
-- else if (CLASS_OF(obj) == cgsl_vector_col) RBASIC(obj)->klass = cgsl_vector;
-+ if (CLASS_OF(obj) == cgsl_vector) rb_obj_reveal(obj, cgsl_vector_col);
-+ else if (CLASS_OF(obj) == cgsl_vector_col) rb_obj_reveal(obj, cgsl_vector);
- else {
- rb_raise(rb_eRuntimeError, "method trans! for %s is not permitted.",
- rb_class2name(CLASS_OF(obj)));
- }
- #elif defined(BASE_INT)
-- if (CLASS_OF(obj) == cgsl_vector_int) RBASIC(obj)->klass = cgsl_vector_int_col;
-- else if (CLASS_OF(obj) == cgsl_vector_int_col) RBASIC(obj)->klass = cgsl_vector_int;
-+ if (CLASS_OF(obj) == cgsl_vector_int) rb_obj_reveal(obj, cgsl_vector_int_col);
-+ else if (CLASS_OF(obj) == cgsl_vector_int_col) rb_obj_reveal(obj, cgsl_vector_int);
- else {
- rb_raise(rb_eRuntimeError, "method trans! for %s is not permitted.",
- rb_class2name(CLASS_OF(obj)));
diff --git a/debian/patches/series b/debian/patches/series
index 0eb8d70..ae71e4c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,10 +1,2 @@
002_min.c.patch
-001_adding_bash.patch
-#20110605_vector_complex.c
-#20110605_matrix_complex.c
20110605_extconf.rb
-20130815_deprecated_enum.patch
-20131016_fix_test_typo.patch
-20131016_test_output_less_verbose.patch
-20131016_deactivate_failing_tests.patch
-port-to-ruby2.1.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gsl.git
More information about the Pkg-ruby-extras-commits
mailing list