From owner-svn-ports-all@freebsd.org Sat Apr 20 19:55:10 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14842157465F; Sat, 20 Apr 2019 19:55:10 +0000 (UTC) (envelope-from mfechner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9D296FB68; Sat, 20 Apr 2019 19:55:09 +0000 (UTC) (envelope-from mfechner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B0351AD40; Sat, 20 Apr 2019 19:55:09 +0000 (UTC) (envelope-from mfechner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KJt9qA070771; Sat, 20 Apr 2019 19:55:09 GMT (envelope-from mfechner@FreeBSD.org) Received: (from mfechner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KJt8Rl070767; Sat, 20 Apr 2019 19:55:08 GMT (envelope-from mfechner@FreeBSD.org) Message-Id: <201904201955.x3KJt8Rl070767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mfechner set sender to mfechner@FreeBSD.org using -f From: Matthias Fechner Date: Sat, 20 Apr 2019 19:55:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r499463 - in head/databases/ruby-bdb: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mfechner X-SVN-Commit-Paths: in head/databases/ruby-bdb: . files X-SVN-Commit-Revision: 499463 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9D296FB68 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2019 19:55:10 -0000 Author: mfechner Date: Sat Apr 20 19:55:08 2019 New Revision: 499463 URL: https://svnweb.freebsd.org/changeset/ports/499463 Log: Fix build problem with ruby 2.5. This patch should be included upstream. PR: 237410 Submitted by: ume@ Reported by: mbeis@xs4all.nl Reviewed by: mbeis@xs4all.nl, w.schwarzenfeld@utanet.at Modified: head/databases/ruby-bdb/Makefile head/databases/ruby-bdb/files/patch-src-common.c head/databases/ruby-bdb/files/patch-src-cursor.c head/databases/ruby-bdb/files/patch-src-recnum.c Modified: head/databases/ruby-bdb/Makefile ============================================================================== --- head/databases/ruby-bdb/Makefile Sat Apr 20 19:32:23 2019 (r499462) +++ head/databases/ruby-bdb/Makefile Sat Apr 20 19:55:08 2019 (r499463) @@ -3,7 +3,7 @@ PORTNAME= bdb PORTVERSION= 0.6.6 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= databases ruby MASTER_SITES= ftp://ftp.idaemons.org/pub/distfiles/ruby/ \ http://idaemons.org/distfiles/ruby/ \ @@ -16,13 +16,11 @@ COMMENT= Ruby interface to Oracle Berkeley DB revision LICENSE= RUBY -BROKEN_RUBY25= yes - OPTIONS_DEFINE= DOCS EXAMPLES USE_RUBY= yes USE_RUBY_EXTCONF= yes -MAKE_ENV+= RUBY_RDOC=${LOCALBASE}/bin/rdoc +USE_RUBY_RDOC= yes ALL_TARGET= all rdoc CONFIGURE_ARGS= --with-db-include=${BDB_INCLUDE_DIR} \ Modified: head/databases/ruby-bdb/files/patch-src-common.c ============================================================================== --- head/databases/ruby-bdb/files/patch-src-common.c Sat Apr 20 19:32:23 2019 (r499462) +++ head/databases/ruby-bdb/files/patch-src-common.c Sat Apr 20 19:55:08 2019 (r499463) @@ -1,38 +1,38 @@ ---- src/common.c.orig 2011-04-06 19:35:39.000000000 +0000 -+++ src/common.c 2015-01-22 17:10:32.000000000 +0000 -@@ -1229,7 +1229,7 @@ +--- src/common.c.orig 2011-04-06 19:35:39 UTC ++++ src/common.c +@@ -1229,7 +1229,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE o if (argc && TYPE(argv[argc - 1]) == T_HASH) { VALUE v, f = argv[argc - 1]; - if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != RHASH(f)->ifnone) { -+ if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != rb_hash_ifnone(f)) { ++ if ((v = rb_hash_lookup(f, rb_str_new2("txn"))) != Qnil) { if (!rb_obj_is_kind_of(v, bdb_cTxn)) { rb_raise(bdb_eFatal, "argument of txn must be a transaction"); } -@@ -1241,7 +1241,7 @@ +@@ -1241,7 +1241,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE o dbst->options |= envst->options & BDB_NO_THREAD; dbst->marshal = txnst->marshal; } - else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != RHASH(f)->ifnone) { -+ else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != rb_hash_ifnone(f)) { ++ else if ((v = rb_hash_lookup(f, rb_str_new2("env"))) != Qnil) { if (!rb_obj_is_kind_of(v, bdb_cEnv)) { rb_raise(bdb_eFatal, "argument of env must be an environnement"); } -@@ -1254,11 +1254,11 @@ +@@ -1254,11 +1254,11 @@ bdb_s_new(int argc, VALUE *argv, VALUE o #if HAVE_CONST_DB_ENCRYPT if (envst && (envst->options & BDB_ENV_ENCRYPT)) { VALUE tmp = rb_str_new2("set_flags"); - if ((v = rb_hash_aref(f, rb_intern("set_flags"))) != RHASH(f)->ifnone) { -+ if ((v = rb_hash_aref(f, rb_intern("set_flags"))) != rb_hash_ifnone(f)) { ++ if ((v = rb_hash_lookup(f, rb_intern("set_flags"))) != Qnil) { rb_hash_aset(f, rb_intern("set_flags"), INT2NUM(NUM2INT(v) | DB_ENCRYPT)); } - else if ((v = rb_hash_aref(f, tmp)) != RHASH(f)->ifnone) { -+ else if ((v = rb_hash_aref(f, tmp)) != rb_hash_ifnone(f)) { ++ else if ((v = rb_hash_lookup(f, tmp)) != Qnil) { rb_hash_aset(f, tmp, INT2NUM(NUM2INT(v) | DB_ENCRYPT)); } else { -@@ -1570,10 +1570,10 @@ +@@ -1570,10 +1570,10 @@ bdb_init(int argc, VALUE *argv, VALUE ob #endif switch(dbst->type) { case DB_BTREE: @@ -45,7 +45,7 @@ break; case DB_RECNO: { -@@ -1581,17 +1581,17 @@ +@@ -1581,17 +1581,17 @@ bdb_init(int argc, VALUE *argv, VALUE ob rb_warning("It's hard to distinguish Recnum with Recno for all versions of Berkeley DB"); if ((count = bdb_is_recnum(dbst->dbp)) != -1) { @@ -66,7 +66,7 @@ break; #endif default: -@@ -1635,29 +1635,29 @@ +@@ -1635,29 +1635,29 @@ bdb_s_alloc(obj) dbst->options = BDB_NOT_OPEN; cl = obj; while (cl) { @@ -102,36 +102,36 @@ dbst->type = DB_UNKNOWN; break; } -@@ -3004,8 +3004,8 @@ +@@ -3004,8 +3004,8 @@ bdb_each_kvc(argc, argv, obj, sens, repl if (argc && TYPE(argv[argc - 1]) == T_HASH) { VALUE g, f = argv[argc - 1]; - if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || - (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { -+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || -+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { ++ if ((g = rb_hash_lookup(f, rb_intern("flags"))) != Qnil || ++ (g = rb_hash_lookup(f, rb_str_new2("flags"))) != Qnil) { flags = NUM2INT(g); } argc--; -@@ -3323,8 +3323,8 @@ +@@ -3323,8 +3323,8 @@ bdb_clear(int argc, VALUE *argv, VALUE o flags = 0; if (argc && TYPE(argv[argc - 1]) == T_HASH) { VALUE g, f = argv[argc - 1]; - if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || - (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { -+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || -+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { ++ if ((g = rb_hash_lookup(f, rb_intern("flags"))) != Qnil || ++ (g = rb_hash_lookup(f, rb_str_new2("flags"))) != Qnil) { flags = NUM2INT(g); } argc--; -@@ -3348,8 +3348,8 @@ +@@ -3348,8 +3348,8 @@ bdb_replace(int argc, VALUE *argv, VALUE flags = 0; if (TYPE(argv[argc - 1]) == T_HASH) { VALUE f = argv[argc - 1]; - if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || - (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { -+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || -+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { ++ if ((g = rb_hash_lookup(f, rb_intern("flags"))) != Qnil || ++ (g = rb_hash_lookup(f, rb_str_new2("flags"))) != Qnil) { flags = NUM2INT(g); } argc--; Modified: head/databases/ruby-bdb/files/patch-src-cursor.c ============================================================================== --- head/databases/ruby-bdb/files/patch-src-cursor.c Sat Apr 20 19:32:23 2019 (r499462) +++ head/databases/ruby-bdb/files/patch-src-cursor.c Sat Apr 20 19:55:08 2019 (r499463) @@ -1,13 +1,13 @@ ---- src/cursor.c.orig 2015-01-22 17:37:51.000000000 +0000 -+++ src/cursor.c 2015-01-22 17:38:17.000000000 +0000 -@@ -29,8 +29,8 @@ +--- src/cursor.c.orig 2011-04-06 19:35:39 UTC ++++ src/cursor.c +@@ -29,8 +29,8 @@ bdb_cursor(int argc, VALUE *argv, VALUE flags = 0; if (argc && TYPE(argv[argc - 1]) == T_HASH) { VALUE g, f = argv[argc - 1]; - if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || - (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { -+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || -+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { ++ if ((g = rb_hash_lookup(f, rb_intern("flags"))) != Qnil || ++ (g = rb_hash_lookup(f, rb_str_new2("flags"))) != Qnil) { flags = NUM2INT(g); } argc--; Modified: head/databases/ruby-bdb/files/patch-src-recnum.c ============================================================================== --- head/databases/ruby-bdb/files/patch-src-recnum.c Sat Apr 20 19:32:23 2019 (r499462) +++ head/databases/ruby-bdb/files/patch-src-recnum.c Sat Apr 20 19:55:08 2019 (r499463) @@ -1,22 +1,22 @@ ---- src/recnum.c.orig 2011-04-06 19:35:39.000000000 +0000 -+++ src/recnum.c 2015-01-22 17:16:32.000000000 +0000 -@@ -17,7 +17,7 @@ +--- src/recnum.c.orig 2011-04-06 19:35:39 UTC ++++ src/recnum.c +@@ -17,7 +17,7 @@ bdb_recnum_init(int argc, VALUE *argv, V 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])) { ++ if (rb_hash_lookup(argv[argc - 1], sarray) != Qnil) { rb_hash_aset(argv[argc - 1], sarray, INT2FIX(0)); } rb_hash_aset(argv[argc - 1], rb_str_new2("set_flags"), INT2FIX(DB_RENUMBER)); -@@ -697,8 +697,8 @@ +@@ -697,8 +697,8 @@ bdb_sary_clear(int argc, VALUE *argv, VA if (argc && TYPE(argv[argc - 1]) == T_HASH) { VALUE f = argv[argc - 1]; - if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || - (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { -+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || -+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { ++ if ((g = rb_hash_lookup(f, rb_intern("flags"))) != Qnil || ++ (g = rb_hash_lookup(f, rb_str_new2("flags"))) != Qnil) { flags = NUM2INT(g); } argc--;