From 85a61bfdb918fce2a257b2593b33ada0be03f972 Mon Sep 17 00:00:00 2001 From: taca Date: Sun, 12 Sep 2010 01:59:39 +0000 Subject: Add a patch for ruby-cabocha to suport both ruby18 and ruby19. I should commit with previous ruby-cabocha's commit. --- textproc/cabocha/distinfo | 3 ++- textproc/cabocha/patches/patch-ab | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 textproc/cabocha/patches/patch-ab diff --git a/textproc/cabocha/distinfo b/textproc/cabocha/distinfo index 4f7fad14a14..6c8c1dbd9d2 100644 --- a/textproc/cabocha/distinfo +++ b/textproc/cabocha/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $ +$NetBSD: distinfo,v 1.2 2010/09/12 01:59:39 taca Exp $ SHA1 (cabocha-0.53.tar.gz) = 6b8903aa6843887bb669d9d5baea8a0eae320d80 RMD160 (cabocha-0.53.tar.gz) = 39b637adc8b882542ecc3b6df34d8f6b99be3e38 Size (cabocha-0.53.tar.gz) = 11552551 bytes SHA1 (patch-aa) = cb868fa8b88180ed5f84d55796d042e5774862af +SHA1 (patch-ab) = 3dcaae627c12a8ffc3595177768445335c5a3bd4 diff --git a/textproc/cabocha/patches/patch-ab b/textproc/cabocha/patches/patch-ab new file mode 100644 index 00000000000..01b77bc605c --- /dev/null +++ b/textproc/cabocha/patches/patch-ab @@ -0,0 +1,24 @@ +$NetBSD: patch-ab,v 1.1 2010/09/12 01:59:39 taca Exp $ + +Use modern Ruby's API. + +--- swig/arg.i.orig 2002-11-10 19:02:39.000000000 +0000 ++++ swig/arg.i +@@ -95,7 +95,7 @@ + if (TYPE($input) != T_ARRAY) { + SWIG_exception(SWIG_ValueError, "Expected an array"); + } +- $1 = RARRAY($input)->len; ++ $1 = RARRAY_LEN($input); + if ($1 == 0) { + SWIG_exception(SWIG_ValueError, "List must contain at least 1 element"); + } +@@ -106,7 +106,7 @@ + delete [] $2; + SWIG_exception(SWIG_ValueError, "List items must be strings"); + } +- $2[i] = STR2CSTR(s); ++ $2[i] = StringValuePtr(s); + } + $2[i] = 0; + } -- cgit v1.2.3