tags 676203 patch
thanks

Hello,

I have found a patch on upstream's svn. It's attached. If there is no response from maintainer, I'm going to upload this one through NMU.

--
Pozdrawiam / Kind regards,
Artur Rona

From: Artur Rona <ari-tc...@tlen.pl>
Description: Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which breaks using rb_intern as an lvalue, as SWIG does. We work around this issue for now by disabling this.
Bug: https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
Bug-Debian: http://bugs.debian.org/676203
Origin: upstream, http://code.google.com/p/mecab/source/diff?spec=svn112&old=91&r=112&format=unidiff&path=%2Ftrunk%2Fmecab%2Fruby%2FMeCab_wrap.cpp

diff -pruN -x '*~' mecab-ruby-0.993.orig/MeCab_wrap.cpp mecab-ruby-0.993/MeCab_wrap.cpp
--- mecab-ruby-0.993.orig/MeCab_wrap.cpp	2012-02-10 17:46:45.000000000 +0100
+++ mecab-ruby-0.993/MeCab_wrap.cpp	2012-06-19 22:26:36.000000000 +0200
@@ -854,6 +854,10 @@ SWIG_UnpackDataName(const char *c, void
 
 
 #include <ruby.h>
+ 
+#ifdef rb_intern
+# undef rb_intern
+#endif
 
 /* Remove global macros defined in Ruby's win32.h */
 #ifdef write
@@ -1402,7 +1406,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VAL
 /* Error manipulation */
 
 #define SWIG_ErrorType(code)                            SWIG_Ruby_ErrorType(code)               
-#define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), msg)
+#define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
 #define SWIG_fail                        		goto fail				 
 
 
@@ -1457,7 +1461,7 @@ static ID swig_call_id  = 0;
       ++swig_virtual_calls;
 #  define SWIG_RELEASE_STACK --swig_virtual_calls;
 #  define Ruby_DirectorTypeMismatchException(x) \
-          rb_raise( rb_eTypeError, x ); return c_result;
+          rb_raise( rb_eTypeError, "%s", x ); return c_result;
 
       static unsigned int swig_virtual_calls = 0;
 
@@ -1838,7 +1842,7 @@ static VALUE mMeCab;
 #define SWIG_RUBY_THREAD_END_BLOCK
 
 
-#define SWIGVERSION 0x010340 
+#define SWIGVERSION 0x020004
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -2000,7 +2004,7 @@ SWIG_ruby_failed(void)
 } 
 
 
-/*@SWIG:/usr/share/swig1.3/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
 SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
 {
   VALUE obj = args[0];
@@ -2076,7 +2080,7 @@ SWIG_From_bool  (bool value)
 }
 
 
-/*@SWIG:/usr/share/swig1.3/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
 SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
 {
   VALUE obj = args[0];
@@ -2122,7 +2126,7 @@ SWIG_From_size_t  (size_t value)
 }
 
 
-/*@SWIG:/usr/share/swig1.3/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
 SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
 {
   VALUE obj = args[0];

Reply via email to