aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2016-02-03 19:07:19 +0000
committerSteve Wills <swills@FreeBSD.org>2016-02-03 19:07:19 +0000
commit27e4a283856a7b902f50871960c67e67e695130e (patch)
tree31828b7e9d3418ef5c16cbac0003ca08e3f90c92 /databases
parent904769a6ec0c42b12ac09988440ad9568791648f (diff)
downloadports-27e4a283856a7b902f50871960c67e67e695130e.tar.gz
ports-27e4a283856a7b902f50871960c67e67e695130e.zip
Notes
Diffstat (limited to 'databases')
-rw-r--r--databases/rubygem-bdb1/Makefile11
-rw-r--r--databases/rubygem-bdb1/files/extra-patch-ext_bdb1_recnum.c11
2 files changed, 18 insertions, 4 deletions
diff --git a/databases/rubygem-bdb1/Makefile b/databases/rubygem-bdb1/Makefile
index 087000f6f239..5dd8f7b448c9 100644
--- a/databases/rubygem-bdb1/Makefile
+++ b/databases/rubygem-bdb1/Makefile
@@ -11,12 +11,15 @@ COMMENT= Ruby interface to Berkeley DB revision 1.8x with full feature support
LICENSE= BSD2CLAUSE RUBY
LICENSE_COMB= dual
-BROKEN_RUBY22= yes
-BROKEN_RUBY23= yes
-
USES= execinfo
USE_RUBY= yes
USE_RUBYGEMS= yes
RUBYGEM_AUTOPLIST= yes
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${RUBY_VER} >= 2.2
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ext_bdb1_recnum.c
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/databases/rubygem-bdb1/files/extra-patch-ext_bdb1_recnum.c b/databases/rubygem-bdb1/files/extra-patch-ext_bdb1_recnum.c
new file mode 100644
index 000000000000..9a172a17615a
--- /dev/null
+++ b/databases/rubygem-bdb1/files/extra-patch-ext_bdb1_recnum.c
@@ -0,0 +1,11 @@
+--- ext/bdb1/recnum.c.orig
++++ ext/bdb1/recnum.c
+@@ -17,7 +17,7 @@
+ argc++;
+ }
+ rb_hash_aset(argv[argc - 1], array, INT2FIX(0));
+- if (rb_hash_aref(argv[argc - 1], sarray) != RHASH(argv[argc - 1])->ifnone) {
++ if (rb_hash_aref(argv[argc - 1], sarray) != rb_hash_ifnone(argv[argc - 1])) {
+ rb_hash_aset(argv[argc - 1], sarray, INT2FIX(0));
+ }
+ rb_hash_aset(argv[argc - 1], rb_str_new2("set_flags"), INT2FIX(DB_RENUMBER));