aboutsummaryrefslogtreecommitdiff
path: root/databases/rubygem-bdb1
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2016-01-19 04:50:37 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2016-01-19 04:50:37 +0000
commite8435a00ce461be1495a4a3bf7259e23f1c6539f (patch)
tree289efd3c5c91c453f5de6474d32c182d8ebf1721 /databases/rubygem-bdb1
parent8324e8e3fd1f5dd05a27076e4f432729ce38a34d (diff)
downloadports-e8435a00ce461be1495a4a3bf7259e23f1c6539f.tar.gz
ports-e8435a00ce461be1495a4a3bf7259e23f1c6539f.zip
- fix build with ruby-2.1
Notes
Notes: svn path=/head/; revision=406632
Diffstat (limited to 'databases/rubygem-bdb1')
-rw-r--r--databases/rubygem-bdb1/Makefile1
-rw-r--r--databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c21
2 files changed, 21 insertions, 1 deletions
diff --git a/databases/rubygem-bdb1/Makefile b/databases/rubygem-bdb1/Makefile
index ca74b1160eb1..087000f6f239 100644
--- a/databases/rubygem-bdb1/Makefile
+++ b/databases/rubygem-bdb1/Makefile
@@ -11,7 +11,6 @@ COMMENT= Ruby interface to Berkeley DB revision 1.8x with full feature support
LICENSE= BSD2CLAUSE RUBY
LICENSE_COMB= dual
-BROKEN_RUBY21= yes
BROKEN_RUBY22= yes
BROKEN_RUBY23= yes
diff --git a/databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c b/databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c
new file mode 100644
index 000000000000..64290a2c98bd
--- /dev/null
+++ b/databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c
@@ -0,0 +1,21 @@
+--- ext/bdb1/bdb1.c.orig 2016-01-18 21:34:35 UTC
++++ ext/bdb1/bdb1.c
+@@ -752,15 +752,15 @@ bdb1_s_alloc(VALUE obj)
+ dbst->options |= BDB1_NOT_OPEN;
+ cl = obj;
+ while (cl) {
+- if (cl == bdb1_cBtree || RCLASS(cl)->m_tbl == RCLASS(bdb1_cBtree)->m_tbl) {
++ if (cl == bdb1_cBtree || rb_obj_classname(cl) == rb_class2name(bdb1_cBtree)) {
+ dbst->type = DB_BTREE;
+ break;
+ }
+- else if (cl == bdb1_cHash || RCLASS(cl)->m_tbl == RCLASS(bdb1_cHash)->m_tbl) {
++ else if (cl == bdb1_cHash || rb_obj_classname(cl) == rb_class2name(bdb1_cHash)) {
+ dbst->type = DB_HASH;
+ break;
+ }
+- else if (cl == bdb1_cRecnum || RCLASS(cl)->m_tbl == RCLASS(bdb1_cRecnum)->m_tbl) {
++ else if (cl == bdb1_cRecnum || rb_obj_classname(cl) == rb_class2name(bdb1_cRecnum)) {
+ dbst->type = DB_RECNO;
+ break;
+ }