aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2012-02-08 12:49:53 +0800
committerpgollucci <pgollucci@FreeBSD.org>2012-02-08 12:49:53 +0800
commitf990561f548837e3cf9b552456973407e0ca5697 (patch)
tree74558b73771efeb2036a0d92fd5db0182a8661ea
parentf356ca1192a24adb521c7ec77e18f11ba742a3f6 (diff)
downloadfreebsd-ports-gnome-f990561f548837e3cf9b552456973407e0ca5697.tar.gz
freebsd-ports-gnome-f990561f548837e3cf9b552456973407e0ca5697.tar.zst
freebsd-ports-gnome-f990561f548837e3cf9b552456973407e0ca5697.zip
- allow compile w/ ruby1.9, however note that its not completely compatible.
this is better then nothing, and will help the 1.8 -> 1.9 transition PR: ports/160404 Submitted by: Mikhail T. <mi@aldan.algebra.com> Approved by: maintainer timeout (jpaetzel ; 158 days) Sponsored by: RideCharge Inc. / TaxiMagic
-rw-r--r--databases/ruby-bdb1/Makefile13
-rw-r--r--databases/ruby-bdb1/files/patch-delegate10
-rw-r--r--databases/ruby-bdb1/files/patch-super16
3 files changed, 38 insertions, 1 deletions
diff --git a/databases/ruby-bdb1/Makefile b/databases/ruby-bdb1/Makefile
index 4f6a52c9f6e2..6de44e10fc4c 100644
--- a/databases/ruby-bdb1/Makefile
+++ b/databases/ruby-bdb1/Makefile
@@ -31,6 +31,9 @@ DOCS= Changes \
docs/*.rd \
docs/doc
+test regression-test check:
+ ${MAKE} -C ${WRKSRC} test
+
post-build:
.if !defined(NOPORTDOCS)
cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc
@@ -48,6 +51,14 @@ post-install:
.include <bsd.port.pre.mk>
.if ${RUBY_VER} == 1.9
-BROKEN= does not build with ruby 1.9
+pre-everything::
+ ########################################################
+ # Although it is now possible to compile ${PORTNAME}
+ # against Ruby-${RUBY_VER}, the resulting binary is not
+ # fully functional due to changes in Ruby API.
+ # Use of Ruby-1.8 is recommended for full compatibility.
+ ########################################################
+.elif ${RUBY_VER} == 1.8
+post-build: test
.endif
.include <bsd.port.post.mk>
diff --git a/databases/ruby-bdb1/files/patch-delegate b/databases/ruby-bdb1/files/patch-delegate
new file mode 100644
index 000000000000..04b9c8735fdb
--- /dev/null
+++ b/databases/ruby-bdb1/files/patch-delegate
@@ -0,0 +1,10 @@
+--- src/delegate.c 2006-09-19 13:06:40.000000000 -0400
++++ src/delegate.c 2011-09-02 13:28:23.000000000 -0400
+@@ -171,5 +171,6 @@
+ ary = rb_class_instance_methods(1, &tmp, rb_mKernel);
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+- method = StringValuePtr(RARRAY_PTR(ary)[i]);
++ tmp = rb_obj_as_string(RARRAY_PTR(ary)[i]);
++ method = StringValuePtr(tmp);
+ if (!strcmp(method, "==") ||
+ !strcmp(method, "===") || !strcmp(method, "=~")) continue;
diff --git a/databases/ruby-bdb1/files/patch-super b/databases/ruby-bdb1/files/patch-super
new file mode 100644
index 000000000000..f90e04a63d36
--- /dev/null
+++ b/databases/ruby-bdb1/files/patch-super
@@ -0,0 +1,16 @@
+The RCLASS_SUPER define is present in both Ruby 1.8 and 1.9.
+
+Direct access to "super" no longer works in 1.9 (the field is
+not there), but the define continues to work properly.
+
+ -mi
+
+--- src/bdb1.c 2006-09-20 12:41:01.000000000 -0400
++++ src/bdb1.c 2011-09-02 12:27:34.000000000 -0400
+@@ -692,5 +692,5 @@
+ break;
+ }
+- cl = RCLASS(cl)->super;
++ cl = RCLASS_SUPER(cl);
+ }
+ if (!cl) {