aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2012-01-22 22:30:25 +0800
committerdinoex <dinoex@FreeBSD.org>2012-01-22 22:30:25 +0800
commitfd2d5744c6312a74ce6abaecb5031b064901ac43 (patch)
tree61e1e070585657f3fd570ab2a438661a736e53e5 /textproc
parent6ce2b0b49cc2545f0930e6a586e55cc602b7c93b (diff)
downloadfreebsd-ports-gnome-fd2d5744c6312a74ce6abaecb5031b064901ac43.tar.gz
freebsd-ports-gnome-fd2d5744c6312a74ce6abaecb5031b064901ac43.tar.zst
freebsd-ports-gnome-fd2d5744c6312a74ce6abaecb5031b064901ac43.zip
- fix build for ruby 1.9.3
Diffstat (limited to 'textproc')
-rw-r--r--textproc/eruby/Makefile2
-rw-r--r--textproc/eruby/files/patch-eruby_lib.c22
-rw-r--r--textproc/eruby/files/patch-eruby_main.c2
3 files changed, 16 insertions, 10 deletions
diff --git a/textproc/eruby/Makefile b/textproc/eruby/Makefile
index 4feff21e9719..1e6dd7034e31 100644
--- a/textproc/eruby/Makefile
+++ b/textproc/eruby/Makefile
@@ -62,7 +62,7 @@ CONFIGURE_ENV+= EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -pthread"
.endif
.endif
-.if ${RUBY_RELVERSION} == 1.9.2
+.if ${RUBY_VER} == "1.9"
CONFIGURE_ENV+= EXTRA_CFLAGS="${EXTRA_CFLAGS} -DWITH_RUBY_19"
.endif
diff --git a/textproc/eruby/files/patch-eruby_lib.c b/textproc/eruby/files/patch-eruby_lib.c
index dc195cbdaf0e..2e61e35a55b2 100644
--- a/textproc/eruby/files/patch-eruby_lib.c
+++ b/textproc/eruby/files/patch-eruby_lib.c
@@ -1,6 +1,6 @@
---- eruby_lib.c.orig 2011-07-27 01:20:00.000000000 +0000
-+++ eruby_lib.c 2011-07-27 01:27:56.000000000 +0000
-@@ -34,10 +34,18 @@
+--- eruby_lib.c.orig 2012-01-22 14:43:16.000000000 +0100
++++ eruby_lib.c 2012-01-22 15:27:01.000000000 +0100
+@@ -34,12 +34,24 @@
#include <signal.h>
#include "ruby.h"
@@ -18,9 +18,15 @@
+#endif
+
EXTERN VALUE rb_stdin;
++#if defined(WITH_RUBY_19)
++#define ruby_top_self rb_errinfo()
++#else
EXTERN VALUE ruby_top_self;
++#endif
-@@ -144,6 +152,7 @@
+ static VALUE mERuby;
+ static VALUE cERubyCompiler;
+@@ -144,6 +156,7 @@
}
s++;
goto again;
@@ -28,7 +34,7 @@
case 'K':
s++;
if (*s == '\0') {
-@@ -153,6 +162,7 @@
+@@ -153,6 +166,7 @@
rb_set_kcode(s);
s++;
goto again;
@@ -36,7 +42,7 @@
case 'C':
s++;
if (isspace(*s)) s++;
-@@ -397,7 +407,7 @@
+@@ -397,7 +411,7 @@
static void compile_error(eruby_compiler_t *compiler, char *msg)
{
rb_raise(eERubyCompileError, "%s:%d:%s",
@@ -45,7 +51,7 @@
}
static void parse_embedded_program(eruby_compiler_t *compiler,
-@@ -592,8 +602,13 @@
+@@ -592,8 +606,13 @@
if (prevc < 0) output_literal(compiler, "print \"");
output_char(compiler, c);
prevc = c;
@@ -59,7 +65,7 @@
for (i = 0; i < len; i++) {
c = nextc(compiler);
-@@ -697,7 +712,7 @@
+@@ -697,7 +716,7 @@
VALUE compiler, file, code;
compiler = eruby_compiler_new();
diff --git a/textproc/eruby/files/patch-eruby_main.c b/textproc/eruby/files/patch-eruby_main.c
index 50e545b9d1eb..0704cc4c8977 100644
--- a/textproc/eruby/files/patch-eruby_main.c
+++ b/textproc/eruby/files/patch-eruby_main.c
@@ -33,7 +33,7 @@
+#if RUBY_VERSION_CODE < 190
EXTERN VALUE ruby_top_self;
+#else
-+#define ruby_top_self rb_vm_top_self()
++#define ruby_top_self rb_errinfo()
+#endif
/* copied from eval.c */