diff options
author | taca <taca@pkgsrc.org> | 2010-09-12 02:04:21 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2010-09-12 02:04:21 +0000 |
commit | c32953528dbb7e3e64ff33d36cf8f84a276af3e1 (patch) | |
tree | 5fbbc3613fb95b17e40ebf01af9aa221022edb7b /textproc | |
parent | 189cdf6f0e095114192646b64ecb96e7b063349f (diff) | |
download | pkgsrc-c32953528dbb7e3e64ff33d36cf8f84a276af3e1.tar.gz |
Add a patch for ruby-yamcha to suport both ruby18 and ruby19.
I should commit with previous ruby-yamcha's commit.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/yamcha/distinfo | 3 | ||||
-rw-r--r-- | textproc/yamcha/patches/patch-aa | 36 |
2 files changed, 38 insertions, 1 deletions
diff --git a/textproc/yamcha/distinfo b/textproc/yamcha/distinfo index 0e8897ae1e7..9f4a6bbe806 100644 --- a/textproc/yamcha/distinfo +++ b/textproc/yamcha/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2010/05/19 12:08:02 obache Exp $ +$NetBSD: distinfo,v 1.2 2010/09/12 02:04:21 taca Exp $ SHA1 (yamcha-0.33.tar.gz) = 4ee6d8150557761f86fcb8af118636b7c23920c0 RMD160 (yamcha-0.33.tar.gz) = ac21fa16a45efa40775d426cd6229f612a7aa21e Size (yamcha-0.33.tar.gz) = 488670 bytes +SHA1 (patch-aa) = 16120e3f052a1046ee360bbe449d95dfdb6a3990 diff --git a/textproc/yamcha/patches/patch-aa b/textproc/yamcha/patches/patch-aa new file mode 100644 index 00000000000..214fee4a3e9 --- /dev/null +++ b/textproc/yamcha/patches/patch-aa @@ -0,0 +1,36 @@ +$NetBSD: patch-aa,v 1.1 2010/09/12 02:04:21 taca Exp $ + +Use modern Ruby's API. + +--- ruby/YamCha_wrap.cpp.orig 2004-09-20 09:43:22.000000000 +0000 ++++ ruby/YamCha_wrap.cpp +@@ -769,7 +769,11 @@ struct timeval rb_time_timeval(VALUE); + #ifdef __cplusplus + extern "C" { + #endif ++#ifdef HAVE_RUBY_IO_H ++#include "ruby/io.h" ++#else + #include "rubyio.h" ++#endif + #ifdef __cplusplus + } + #endif +@@ -844,7 +848,7 @@ _wrap_new_Chunker(int argc, VALUE *argv, + if (TYPE(argv[0]) != T_ARRAY) { + SWIG_exception(SWIG_ValueError, "Expected an array"); + } +- arg1 = RARRAY(argv[0])->len; ++ arg1 = RARRAY_LEN(argv[0]); + if (arg1 == 0) { + SWIG_exception(SWIG_ValueError, "List must contain at least 1 element"); + } +@@ -855,7 +859,7 @@ _wrap_new_Chunker(int argc, VALUE *argv, + free(arg2); + SWIG_exception(SWIG_ValueError, "List items must be strings"); + } +- arg2[i] = STR2CSTR(s); ++ arg2[i] = StringValuePtr(s); + } + arg2[i] = 0; + } |