aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/eruby
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2010-01-13 22:23:19 +0800
committerdinoex <dinoex@FreeBSD.org>2010-01-13 22:23:19 +0800
commitf95adcb81b29eaea536529b16e7cbc297850ff8a (patch)
treee94bba5ccc4a5ea6feefba06a24dd8e36915e0c6 /textproc/eruby
parentee48cc365d6c4863272b0d983a22826b97d2be96 (diff)
downloadfreebsd-ports-gnome-f95adcb81b29eaea536529b16e7cbc297850ff8a.tar.gz
freebsd-ports-gnome-f95adcb81b29eaea536529b16e7cbc297850ff8a.tar.zst
freebsd-ports-gnome-f95adcb81b29eaea536529b16e7cbc297850ff8a.zip
- fix build after ruby API change
Diffstat (limited to 'textproc/eruby')
-rw-r--r--textproc/eruby/Makefile4
-rw-r--r--textproc/eruby/files/patch-eruby_lib.c6
-rw-r--r--textproc/eruby/files/patch-eruby_main.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/textproc/eruby/Makefile b/textproc/eruby/Makefile
index 3ca15a5084d7..18d7e960c6db 100644
--- a/textproc/eruby/Makefile
+++ b/textproc/eruby/Makefile
@@ -62,4 +62,8 @@ CONFIGURE_ENV+= EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -pthread"
.endif
.endif
+.if ${RUBY_RELVERSION} == 1.9.1
+CFLAGS+= -DWITH_RUBY_19
+.endif
+
.include <bsd.port.post.mk>
diff --git a/textproc/eruby/files/patch-eruby_lib.c b/textproc/eruby/files/patch-eruby_lib.c
index 1a37eeed050b..08665f6651c1 100644
--- a/textproc/eruby/files/patch-eruby_lib.c
+++ b/textproc/eruby/files/patch-eruby_lib.c
@@ -8,7 +8,7 @@
#include "eruby.h"
#include "config.h"
-+#if defined(RFLOAT_VALUE)
++#if defined(DWITH_RUBY_19)
+#include "ruby/regex.h"
+#undef ismbchar
+#define ismbchar(c,e,enc) ((mbclen(c,e,enc)) != 1)
@@ -24,7 +24,7 @@
}
s++;
goto again;
-+#if !defined(RFLOAT_VALUE)
++#if !defined(DWITH_RUBY_19)
case 'K':
s++;
if (*s == '\0') {
@@ -83,7 +83,7 @@
if (prevc < 0) output_literal(compiler, "print \"");
output_char(compiler, c);
prevc = c;
-+#if defined(RFLOAT_VALUE)
++#if defined(DWITH_RUBY_19)
+ if (ismbchar(c,c+4,OnigEncDefaultCharEncoding)) {
+ int i, len = mbclen(c,c,OnigEncDefaultCharEncoding) - 1;
+#else
diff --git a/textproc/eruby/files/patch-eruby_main.c b/textproc/eruby/files/patch-eruby_main.c
index 3b080d247eac..74d4bb5c6800 100644
--- a/textproc/eruby/files/patch-eruby_main.c
+++ b/textproc/eruby/files/patch-eruby_main.c
@@ -4,7 +4,7 @@
#endif
#include "ruby.h"
-+#if defined(RFLOAT_VALUE)
++#if defined(DWITH_RUBY_19)
+#define RUBY_VERSION_CODE 190
+#endif
+#if RUBY_VERSION_CODE < 190