diff --git a/0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch b/0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch deleted file mode 100644 index accf545..0000000 --- a/0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch +++ /dev/null @@ -1,173 +0,0 @@ -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Doc/Manual/Ruby.html ./Doc/Manual/Ruby.html ---- ../orig-swig-2.0.8/Doc/Manual/Ruby.html 2012-08-20 23:29:52.000000000 +0200 -+++ ./Doc/Manual/Ruby.html 2012-11-04 22:52:17.837133265 +0100 -@@ -4926,7 +4926,7 @@ - - -
--
%typemap(in) (char *str, int len) {
$1 = STR2CSTR($input);
$2 = (int) RSTRING($input)->len;
};

int count(char c, char *str, int len);
-+
%typemap(in) (char *str, int len) {
$1 = StringValuePtr($input);
$2 = (int) RSTRING($input)->len;
};

int count(char c, char *str, int len);
- - - -@@ -7135,7 +7135,7 @@ - - - -- char * STR2CSTR(String) -+ char * StringValuePtr(String) - SWIG_AsCharPtrAndSize(VALUE, char*, size_t, int* alloc) - - -@@ -7518,7 +7518,7 @@ - - -
--
%module argv

// This tells SWIG to treat char ** as a special case
%typemap(in) char ** {
/* Get the length of the array */
int size = RARRAY($input)->len;
int i;
$1 = (char **) malloc((size+1)*sizeof(char *));
/* Get the first element in memory */
VALUE *ptr = RARRAY($input)->ptr;
for (i=0; i < size; i++, ptr++)
/* Convert Ruby Object String to char* */
$1[i]= STR2CSTR(*ptr);
$1[i]=NULL; /* End of list */
}

// This cleans up the char ** array created before
// the function call

%typemap(freearg) char ** {
free((char *) $1);
}

// Now a test function
%inline %{
int print_args(char **argv) {
int i = 0;
while (argv[i]) {
printf("argv[%d] = %s\n", i,argv[i]);
i++;
}
return i;
}
%}

-+
%module argv

// This tells SWIG to treat char ** as a special case
%typemap(in) char ** {
/* Get the length of the array */
int size = RARRAY($input)->len;
int i;
$1 = (char **) malloc((size+1)*sizeof(char *));
/* Get the first element in memory */
VALUE *ptr = RARRAY($input)->ptr;
for (i=0; i < size; i++, ptr++)
/* Convert Ruby Object String to char* */
$1[i]= StringValuePtr(*ptr);
$1[i]=NULL; /* End of list */
}

// This cleans up the char ** array created before
// the function call

%typemap(freearg) char ** {
free((char *) $1);
}

// Now a test function
%inline %{
int print_args(char **argv) {
int i = 0;
while (argv[i]) {
printf("argv[%d] = %s\n", i,argv[i]);
i++;
}
return i;
}
%}

- - - -@@ -7796,7 +7796,7 @@ - - -
--
%typemap(in) (int nattributes, const char **names, const int *values)
(VALUE keys_arr, int i, VALUE key, VALUE val) {
Check_Type($input, T_HASH);
$1 = NUM2INT(rb_funcall($input, rb_intern("size"), 0, NULL));
$2 = NULL;
$3 = NULL;
if ($1 > 0) {
$2 = (char **) malloc($1*sizeof(char *));
$3 = (int *) malloc($1*sizeof(int));
keys_arr = rb_funcall($input, rb_intern("keys"), 0, NULL);
for (i = 0; i < $1; i++) {
key = rb_ary_entry(keys_arr, i);
val = rb_hash_aref($input, key);
Check_Type(key, T_STRING);
Check_Type(val, T_FIXNUM);
$2[i] = STR2CSTR(key);
$3[i] = NUM2INT(val);

}
}
}
-+
%typemap(in) (int nattributes, const char **names, const int *values)
(VALUE keys_arr, int i, VALUE key, VALUE val) {
Check_Type($input, T_HASH);
$1 = NUM2INT(rb_funcall($input, rb_intern("size"), 0, NULL));
$2 = NULL;
$3 = NULL;
if ($1 > 0) {
$2 = (char **) malloc($1*sizeof(char *));
$3 = (int *) malloc($1*sizeof(int));
keys_arr = rb_funcall($input, rb_intern("keys"), 0, NULL);
for (i = 0; i < $1; i++) {
key = rb_ary_entry(keys_arr, i);
val = rb_hash_aref($input, key);
Check_Type(key, T_STRING);
Check_Type(val, T_FIXNUM);
$2[i] = StringValuePtr(key);
$3[i] = NUM2INT(val);

}
}
}
- - - -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Doc/Manual/SWIGDocumentation.html ./Doc/Manual/SWIGDocumentation.html ---- ../orig-swig-2.0.8/Doc/Manual/SWIGDocumentation.html 2012-08-20 23:29:55.000000000 +0200 -+++ ./Doc/Manual/SWIGDocumentation.html 2012-11-04 22:52:17.849132571 +0100 -@@ -46795,7 +46795,7 @@ - example:

-
-
%typemap(in) (char *str, int len) {
--
$1 = STR2CSTR($input); -+
$1 = StringValuePtr($input); -
$2 = (int) RSTRING($input)->len; -
}; -
-@@ -47429,7 +47429,7 @@ - unsigned long*) - char NUM2CHR(Numeric or String)SWIG_AsVal_char(VALUE, int*) --char * STR2CSTR(String) -+char * StringValuePtr(String) - SWIG_AsCharPtrAndSize(VALUE, char*, size_t, int* alloc) - char * rb_str2cstr(String, - int*length) -@@ -47542,7 +47542,7 @@ -
VALUE *ptr = RARRAY($input)->ptr; -
for (i=0; i < size; i++, ptr++) -
/* Convert Ruby Object String to char* */ --
$1[i]= STR2CSTR(*ptr); -+
$1[i]= StringValuePtr(*ptr); -
$1[i]=NULL; /* End of list */ -
} -
-@@ -47756,7 +47756,7 @@ -
val = rb_hash_aref($input, key); -
Check_Type(key, T_STRING); -
Check_Type(val, T_FIXNUM); --
$2[i] = STR2CSTR(key); -+
$2[i] = StringValuePtr(key); -
$3[i] = NUM2INT(val);
-
} -
} -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/ruby/hashargs/example.i ./Examples/ruby/hashargs/example.i ---- ../orig-swig-2.0.8/Examples/ruby/hashargs/example.i 2008-11-26 22:54:49.000000000 +0100 -+++ ./Examples/ruby/hashargs/example.i 2012-11-04 22:52:17.849132571 +0100 -@@ -14,7 +14,7 @@ - val = rb_hash_aref($input, key); - Check_Type(key, T_STRING); - Check_Type(val, T_FIXNUM); -- $2[i] = STR2CSTR(key); -+ $2[i] = StringValuePtr(key); - $3[i] = NUM2INT(val); - } - } -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/ruby/multimap/example.i ./Examples/ruby/multimap/example.i ---- ../orig-swig-2.0.8/Examples/ruby/multimap/example.i 2010-02-13 18:12:15.000000000 +0100 -+++ ./Examples/ruby/multimap/example.i 2012-11-04 22:52:17.853132339 +0100 -@@ -31,7 +31,7 @@ - free($2); - SWIG_exception(SWIG_ValueError, "List items must be strings"); - } -- $2[i] = STR2CSTR(s); -+ $2[i] = StringValuePtr(s); - } - $2[i] = 0; - } -@@ -46,7 +46,7 @@ - if (TYPE($input) != T_STRING) { - SWIG_exception(SWIG_ValueError, "Expected a string"); - } -- $1 = STR2CSTR($input); -+ $1 = StringValuePtr($input); - $2 = RSTRING_LEN($input); - } - -@@ -60,7 +60,7 @@ - if (TYPE($input) != T_STRING) { - SWIG_exception(SWIG_ValueError,"Expected a string"); - } -- temp = STR2CSTR($input); -+ temp = StringValuePtr($input); - $2 = RSTRING_LEN($input); - $1 = (char *) malloc($2+1); - memmove($1,temp,$2); -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/test-suite/memberin1.i ./Examples/test-suite/memberin1.i ---- ../orig-swig-2.0.8/Examples/test-suite/memberin1.i 2002-11-30 23:01:28.000000000 +0100 -+++ ./Examples/test-suite/memberin1.i 2012-11-04 22:52:17.853132339 +0100 -@@ -47,7 +47,7 @@ - #ifdef SWIGRUBY - %typemap(in) String { - Check_Type($input, T_STRING); -- $1 = String(STR2CSTR($input)); -+ $1 = String(StringValuePtr($input)); - } - #endif - -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/test-suite/namespace_typemap.i ./Examples/test-suite/namespace_typemap.i ---- ../orig-swig-2.0.8/Examples/test-suite/namespace_typemap.i 2010-06-15 21:40:34.000000000 +0200 -+++ ./Examples/test-suite/namespace_typemap.i 2012-11-04 22:52:17.853132339 +0100 -@@ -100,7 +100,7 @@ - #endif - #ifdef SWIGRUBY - %typemap(in) string_class * { -- $1 = new string_class(STR2CSTR($input)); -+ $1 = new string_class(StringValuePtr($input)); - } - %typemap(freearg) string_class * { - delete $1; -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Lib/ruby/argcargv.i ./Lib/ruby/argcargv.i ---- ../orig-swig-2.0.8/Lib/ruby/argcargv.i 2006-09-23 23:39:09.000000000 +0200 -+++ ./Lib/ruby/argcargv.i 2012-11-04 22:52:17.853132339 +0100 -@@ -30,7 +30,7 @@ - $2 = (char **) malloc((size+1)*sizeof(char *)); - VALUE *ptr = RARRAY_PTR($input); - for (i=0; i < size; i++, ptr++) { -- $2[i]= STR2CSTR(*ptr); -+ $2[i]= StringValuePtr(*ptr); - } - $2[i]=NULL; - } else { -diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Lib/ruby/rubystrings.swg ./Lib/ruby/rubystrings.swg ---- ../orig-swig-2.0.8/Lib/ruby/rubystrings.swg 2007-04-28 06:20:28.000000000 +0200 -+++ ./Lib/ruby/rubystrings.swg 2012-11-04 22:52:17.853132339 +0100 -@@ -7,10 +7,10 @@ - SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) - { - if (TYPE(obj) == T_STRING) { -- %#if defined(StringValuePtr) -- char *cstr = StringValuePtr(obj); -- %#else -+ %#if defined(STR2CSTR) - char *cstr = STR2CSTR(obj); -+ %#else -+ char *cstr = StringValuePtr(obj); - %#endif - size_t size = RSTRING_LEN(obj) + 1; - if (cptr) { diff --git a/0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch b/0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch deleted file mode 100644 index 7cf2330..0000000 --- a/0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 33b61c4033a21710eaaf210f7c69e261c1dbe084 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= -Date: Sat, 26 May 2012 18:24:47 +0200 -Subject: [PATCH 02/10] Ruby: use RbConfig instead of deprecated Config module - prefix - ---- - configure.in | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configure.in b/configure.in -index eedc5b1..8903d28 100644 ---- a/configure.in -+++ b/configure.in -@@ -1348,13 +1348,13 @@ if test -n "$RUBY"; then - # Find library and path for linking. - AC_MSG_CHECKING(for Ruby library) - RUBYLIB="" -- rb_libdir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["libdir"]]') 2>/dev/null` -- rb_bindir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["bindir"]]') 2>/dev/null` -+ rb_libdir=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["libdir"]]') 2>/dev/null` -+ rb_bindir=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["bindir"]]') 2>/dev/null` - dirs="$dirs $rb_libdir $rb_bindir" - -- rb_libruby=`($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBRUBY_A"]]') 2>/dev/null` -+ rb_libruby=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["LIBRUBY_A"]]') 2>/dev/null` - RUBYLINK=`($RUBY -rrbconfig -e ' -- c = Config::CONFIG -+ c = RbConfig::CONFIG - if c.has_key? "LIBRUBYARG_STATIC" # 1.8.x - if c[["LIBRUBY"]] == c[["LIBRUBY_A"]] - link = c[["LIBRUBYARG_STATIC"]] -@@ -1402,10 +1402,10 @@ if test -n "$RUBY"; then - - case $host in - *-*-mingw*) ;; # do nothing, the default windows libraries are already included -- *) RUBYLINK="$RUBYLINK `($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBS"]]') 2>/dev/null`";; -+ *) RUBYLINK="$RUBYLINK `($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["LIBS"]]') 2>/dev/null`";; - esac - -- RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null` -+ RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["CCDLFLAGS"]]') 2>/dev/null` - else - AC_MSG_RESULT(could not figure out how to run ruby) - RUBYINCLUDE="-I/usr/local/lib/ruby/1.4/arch" --- -1.7.9.2 - diff --git a/0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch b/0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch deleted file mode 100644 index c13bfd3..0000000 --- a/0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 21f5bad365aa27b6c9bcb32be5a5e217d437c15d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= -Date: Sat, 26 May 2012 18:26:26 +0200 -Subject: [PATCH 03/10] Ruby: Fix include pathes for Ruby 1.9 - ---- - configure.in | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index 8903d28..9d050fc 100644 ---- a/configure.in -+++ b/configure.in -@@ -1341,7 +1341,9 @@ if test -n "$RUBY"; then - fi - done - if test "$RUBYINCLUDE" = none; then -- RUBYINCLUDE="-I$RUBYDIR" -+ RUBYINCLUDE=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["rubyhdrdir"]] || $rubyhdrdir') 2>/dev/null` -+ RUBYARCH=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["arch"]] || $arch') 2>/dev/null` -+ RUBYINCLUDE="-I$RUBYINCLUDE -I$RUBYINCLUDE/$RUBYARCH" - AC_MSG_RESULT(could not locate ruby.h...using $RUBYINCLUDE) - fi - --- -1.7.9.2 - diff --git a/0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch b/0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch deleted file mode 100644 index 83e0412..0000000 --- a/0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2d3dee536c869b2c5aff71a29d406353039b5007 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= -Date: Sat, 26 May 2012 18:27:30 +0200 -Subject: [PATCH 04/10] Ruby: Add local dir to loadpath for Ruby 1.9 - ---- - Examples/test-suite/ruby/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Examples/test-suite/ruby/Makefile.in b/Examples/test-suite/ruby/Makefile.in -index e157e72..e11e581 100644 ---- a/Examples/test-suite/ruby/Makefile.in -+++ b/Examples/test-suite/ruby/Makefile.in -@@ -61,7 +61,7 @@ ruby_naming.cpptest: SWIGOPT += -autorename - # a file is found which has _runme.rb appended after the testcase name. - run_testcase = \ - if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \ -- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(RUBY) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ -+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(RUBY) -I. -I$(srcdir) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ - fi - - # Clean --- -1.7.9.2 - diff --git a/0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch b/0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch deleted file mode 100644 index ed3546e..0000000 --- a/0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b395eb4f56557bd70840de073d999234922acd00 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= -Date: Sat, 26 May 2012 21:41:07 +0200 -Subject: [PATCH 07/10] Ruby 1.9: #methods returns array of Symbols now - ---- - Examples/test-suite/ruby/ruby_naming_runme.rb | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/Examples/test-suite/ruby/ruby_naming_runme.rb b/Examples/test-suite/ruby/ruby_naming_runme.rb -index 8ea5f13..d5525bc 100644 ---- a/Examples/test-suite/ruby/ruby_naming_runme.rb -+++ b/Examples/test-suite/ruby/ruby_naming_runme.rb -@@ -35,23 +35,23 @@ if Ruby_naming::CONSTANT3 != 3 - raise RuntimeError, "Incorrect value for CONSTANT3" - end - --if not Ruby_naming::methods.include?("constant4") -+if not (Ruby_naming::methods.include?("constant4") || Ruby_naming::methods.include?(:constant4)) - raise RuntimeError, "Incorrect mapping for constant4" - end - --if not Ruby_naming::methods.include?("constant5") -+if not (Ruby_naming::methods.include?("constant5") || Ruby_naming::methods.include?(:constant5)) - raise RuntimeError, "Incorrect mapping for constant5" - end - --if not Ruby_naming::methods.include?("constant6") -+if not (Ruby_naming::methods.include?("constant6") || Ruby_naming::methods.include?(:constant6)) - raise RuntimeError, "Incorrect mapping for constant6" - end - --if not Ruby_naming::TestConstants.instance_methods.include?("constant7") -+if not (Ruby_naming::TestConstants.instance_methods.include?("constant7") || Ruby_naming::TestConstants.instance_methods.include?(:constant7)) - raise RuntimeError, "Incorrect mapping for constant7" - end - --if not Ruby_naming::TestConstants.methods.include?("constant8") -+if not (Ruby_naming::TestConstants.methods.include?("constant8") || Ruby_naming::TestConstants.methods.include?(:constant8)) - raise RuntimeError, "Incorrect mapping for constant8" - end - -@@ -64,7 +64,7 @@ if Ruby_naming::TestConstants::CONSTANT10 != 10 - raise RuntimeError, "Incorrect value for CONSTANT10" - end - --if not Ruby_naming::methods.include?("constant11") -+if not (Ruby_naming::methods.include?("constant11") || Ruby_naming::methods.include?(:constant11)) - raise RuntimeError, "Incorrect mapping for constant11" - end - --- -1.7.9.2 - diff --git a/0008-Ruby-Disable-broken-tests.patch b/0008-Ruby-Disable-broken-tests.patch index 5c28885..c5f671c 100644 --- a/0008-Ruby-Disable-broken-tests.patch +++ b/0008-Ruby-Disable-broken-tests.patch @@ -1,17 +1,7 @@ -From 7fa5330f2610e8b4574bf7ba4670f8ed1a446b6e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= -Date: Sat, 26 May 2012 21:42:08 +0200 -Subject: [PATCH 08/10] Ruby: Disable broken tests - ---- - Examples/test-suite/ruby/Makefile.in | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Examples/test-suite/ruby/Makefile.in b/Examples/test-suite/ruby/Makefile.in -index e11e581..3a8af5c 100644 ---- a/Examples/test-suite/ruby/Makefile.in -+++ b/Examples/test-suite/ruby/Makefile.in -@@ -14,18 +14,18 @@ CPP_TEST_CASES = \ +diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile ../orig-swig-2.0.9_svn13971/Examples/test-suite/ruby/Makefile.in ./Examples/test-suite/ruby/Makefile.in +--- ../orig-swig-2.0.9_svn13971/Examples/test-suite/ruby/Makefile.in 2012-12-14 15:07:32.956499000 +0100 ++++ ./Examples/test-suite/ruby/Makefile.in 2012-12-16 14:13:30.024200036 +0100 +@@ -14,18 +14,18 @@ li_cdata \ li_cstring \ li_factory \ @@ -29,11 +19,8 @@ index e11e581..3a8af5c 100644 - std_containers + ruby_track_objects_directors +# std_containers -+# li_std_set +# li_std_functors ++# li_std_set # ruby_li_std_speed # stl_new --- -1.7.9.2 - diff --git a/python-2.4.patch b/python-2.4.patch new file mode 100644 index 0000000..dada08b --- /dev/null +++ b/python-2.4.patch @@ -0,0 +1,60 @@ +diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/test-suite/python/autodoc_runme.py ./Examples/test-suite/python/autodoc_runme.py +--- ../orig-swig-2.0.8/Examples/test-suite/python/autodoc_runme.py 2012-04-15 23:56:38.000000000 +0200 ++++ ./Examples/test-suite/python/autodoc_runme.py 2012-12-12 14:04:02.873907051 +0100 +@@ -121,23 +121,6 @@ + " " + ) + +-check(A.variable_a.__doc__, "A_variable_a_get(self) -> int") +-check(A.variable_b.__doc__, "A_variable_b_get(A self) -> int") +-check(A.variable_c.__doc__, "\n" +-"A_variable_c_get(self) -> int\n" +-"\n" +-"Parameters:\n" +-" self: A *\n" +-"\n" +-) +-check(A.variable_d.__doc__, "\n" +-"A_variable_d_get(A self) -> int\n" +-"\n" +-"Parameters:\n" +-" self: A *\n" +-"\n" +-) +- + check(B.__doc__, "Proxy of C++ B class") + check(C.__init__.__doc__, "__init__(self, a, b, h) -> C") + check(D.__init__.__doc__, "__init__(D self, int a, int b, Hola h) -> D") +diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Lib/python/pyhead.swg ./Lib/python/pyhead.swg +--- ../orig-swig-2.0.8/Lib/python/pyhead.swg 2012-08-15 09:48:57.000000000 +0200 ++++ ./Lib/python/pyhead.swg 2012-12-11 13:21:24.686950170 +0100 +@@ -18,6 +18,10 @@ + + #endif + ++#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 4 ++#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) ++#endif ++ + #ifndef Py_TYPE + # define Py_TYPE(op) ((op)->ob_type) + #endif +diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile ../orig-swig-2.0.9/Examples/test-suite/python/Makefile.in ./Examples/test-suite/python/Makefile.in +--- ../orig-swig-2.0.9/Examples/test-suite/python/Makefile.in 2012-04-14 23:11:19.000000000 +0200 ++++ ./Examples/test-suite/python/Makefile.in 2012-12-18 16:23:46.138238704 +0100 +@@ -46,7 +46,6 @@ + li_cwstring \ + li_factory \ + li_implicit \ +- li_std_containers_int \ + li_std_map_member \ + li_std_multimap \ + li_std_pair_extra \ +@@ -69,6 +68,7 @@ + swigobject \ + template_matrix + ++# li_std_containers_int + # li_std_carray + # director_profile + # python_pybuf diff --git a/skip-python-li_std_containers_int.patch b/skip-python-li_std_containers_int.patch new file mode 100644 index 0000000..50272af --- /dev/null +++ b/skip-python-li_std_containers_int.patch @@ -0,0 +1,19 @@ +diff -wruN -x '*~' ../orig-swig-2.0.9/Examples/test-suite/python/Makefile.in ./Examples/test-suite/python/Makefile.in +--- ../orig-swig-2.0.9/Examples/test-suite/python/Makefile.in 2012-04-14 23:11:19.000000000 +0200 ++++ ./Examples/test-suite/python/Makefile.in 2012-12-19 15:12:29.072322715 +0100 +@@ -46,7 +46,6 @@ + li_cwstring \ + li_factory \ + li_implicit \ +- li_std_containers_int \ + li_std_map_member \ + li_std_multimap \ + li_std_pair_extra \ +@@ -69,6 +68,7 @@ + swigobject \ + template_matrix + ++# li_std_containers_int + # li_std_carray + # director_profile + # python_pybuf diff --git a/swig-2.0.4-guile2.patch b/swig-2.0.4-guile2.patch deleted file mode 100644 index 5a8f5c2..0000000 --- a/swig-2.0.4-guile2.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: swig-2.0.4/Lib/guile/guile_scm_run.swg -=================================================================== ---- swig-2.0.4.orig/Lib/guile/guile_scm_run.swg -+++ swig-2.0.4/Lib/guile/guile_scm_run.swg -@@ -60,16 +60,17 @@ static swig_module_info *SWIG_Guile_GetM - SWIGINTERN char * - SWIG_Guile_scm2newstr(SCM str, size_t *len) { - #define FUNC_NAME "SWIG_Guile_scm2newstr" -- char *ret; -+ char *ret, *tmp; - size_t l; - - SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); - -- l = SCM_STRING_LENGTH(str); -+ tmp = scm_to_utf8_string(str); -+ memcpy(ret, tmp, l); -+ free(tmp); - ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); - if (!ret) return NULL; - -- memcpy(ret, SCM_STRING_CHARS(str), l); - ret[l] = '\0'; - if (len) *len = l; - return ret; diff --git a/swig-2.0.8.tar.gz b/swig-2.0.8.tar.gz deleted file mode 100644 index 891d833..0000000 --- a/swig-2.0.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aeeefa20bbe1c03bacf23f0af9e7d6193e8b807b7585470615b71b1ee0c8ca4f -size 5291361 diff --git a/swig-2.0.9.tar.gz b/swig-2.0.9.tar.gz new file mode 100644 index 0000000..c3b19d2 --- /dev/null +++ b/swig-2.0.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:586954000d297fafd7e91d1ad31089cc7e249f658889d11a44605d3662569539 +size 5307341 diff --git a/swig.changes b/swig.changes index 8e3c60e..ef5dd41 100644 --- a/swig.changes +++ b/swig.changes @@ -1,3 +1,32 @@ +------------------------------------------------------------------- +Mon Dec 17 12:52:34 UTC 2012 - kkaempf@suse.com + +- Update to SWIG 2.0.9 + SWIG-2.0.9 summary: + - Improved typemap matching. + - Ruby 1.9 support is much improved. + - Various bug fixes and minor improvements in C#, CFFI, Go, Java, + Modula3, Octave, Perl, Python, R, Ruby, Tcl and in ccache-swig. + +- Removed patches (included in 2.0.9 release) + - 0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch + - 0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch + - 0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch + - 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch + - 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch + +- Removed broken patch + - swig-2.0.4-guile2.patch + +- Disable tests failing on (deprecated) Python 2.4 + - new patch: python-2.4.patch + +------------------------------------------------------------------- +Mon Nov 5 09:57:55 UTC 2012 - kkaempf@suse.com + +- fix build on SLE10: disable autogen.sh + Add patch: PyInt_FromSize_t unavailable under Python 2.4 + ------------------------------------------------------------------- Sun Nov 4 21:21:01 UTC 2012 - kkaempf@suse.com diff --git a/swig.spec b/swig.spec index 2f9b64d..73060ad 100644 --- a/swig.spec +++ b/swig.spec @@ -17,7 +17,7 @@ Name: swig -Version: 2.0.8 +Version: 2.0.9 Release: 0 Summary: Simplified Wrapper and Interface Generator License: GPL-3.0+ and BSD-3-Clause @@ -25,20 +25,14 @@ Group: Development/Languages/C and C++ Url: http://www.swig.org/ Source: http://sourceforge.net/projects/swig/files/swig/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: %{name}.rpmlintrc -# PATCH-FIX-UPSTREAM swig-2.0.4-guile2.patch pgajdos@suse.com -- generate guile 2 friendly code -Patch: swig-2.0.4-guile2.patch -# PATCH-PENDING-UPSTREAM - 3530439 - kkaempf@suse.de -Patch1: 0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch -# PATCH-PENDING-UPSTREAM - 3530440 - kkaempf@suse.de -Patch2: 0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch -# PATCH-PENDING-UPSTREAM - 3530442 - kkaempf@suse.de -Patch3: 0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch -# PATCH-PENDING-UPSTREAM - 3530443 - kkaempf@suse.de -Patch4: 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch -# PATCH-PENDING-UPSTREAM - 3530444 - kkaempf@suse.de -Patch5: 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch +# Disable test failing on Python 2.4 +Patch5: python-2.4.patch +# Disable tests failing on Ruby 1.9 Patch6: 0008-Ruby-Disable-broken-tests.patch +# Disable test failing in Python Patch7: 0012-Python-Disable-broken-test-in-threads_exception.patch +# Test fails in openSUSE 12.1 only +Patch8: skip-python-li_std_containers_int.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: boost-devel @@ -53,7 +47,11 @@ BuildRequires: -vim %if 0%{?fedora} + 0%{?rhel_version} + 0%{?centos_version} > 0 %define docpath %{_docdir}/%{name}-%{version} BuildRequires: pkgconfig +BuildRequires: ruby +%if (0%{?rhel_version} < 600) && (0%{?centos_version} < 600) +# not available on RHEL-6 BuildRequires: ruby-devel +%endif %if 0%{?rhel_version} + 0%{?centos_version} == 0 BuildRequires: perl-devel %endif @@ -127,39 +125,22 @@ understandig SWIG usage. %prep %setup -q -# guile 2 from 12.1 -%patch -p1 # Ruby 1.9 from 12.1 -%if 0%{?suse_version} >= 1210 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%if 0%{?suse_version} == 1010 %patch5 -p1 -%patch6 -p1 -%patch7 -p1 %endif +%if 0%{?suse_version} >= 1210 +%patch6 -p1 +%patch8 -p1 +%endif +%patch7 -p1 %build -sh autogen.sh %configure --disable-ccache make %{?_smp_mflags} %check -# check fails on SLES9 -%if 0%{?sles_version} != 9 -# This test is buggy on x86-64 -%if 0%{?suse_version} == 1010 -%ifarch x86_64 -# This test fails on SLES 10 SP3+SP4 on 64bit (bnc#750618) -rm -f Examples/test-suite/ruby/newobject1_runme.rb -%endif -%endif -# Segfaults -rm -f Examples/test-suite/python/li_std_containers_int_runme.py -rm -f Examples/test-suite/python/li_boost_shared_ptr_runme.py make check -%endif %install make install DESTDIR=%{buildroot}