databases/rubygem-dbm: Fix build with Berkeley DB 18.x
MFH: 2022Q4
This commit is contained in:
parent
13e2d00114
commit
71e3954d6e
@ -1,24 +1,31 @@
|
||||
--- ext/dbm/extconf.rb.orig 2019-12-01 06:24:29 UTC
|
||||
--- ext/dbm/extconf.rb.orig 2022-12-07 02:13:27 UTC
|
||||
+++ ext/dbm/extconf.rb
|
||||
@@ -24,7 +24,7 @@ dir_config("dbm")
|
||||
@@ -7,6 +7,7 @@
|
||||
# db Berkeley DB (libdb)
|
||||
# db2 Berkeley DB (libdb2)
|
||||
# db1 Berkeley DB (libdb1)
|
||||
+# db18 Berkeley DB (libdb18)
|
||||
# db6 Berkeley DB (libdb6)
|
||||
# db5 Berkeley DB (libdb5)
|
||||
# db4 Berkeley DB (libdb4)
|
||||
@@ -24,7 +25,7 @@ dir_config("dbm")
|
||||
if dblib = with_config("dbm-type", nil)
|
||||
dblib = dblib.split(/[ ,]+/)
|
||||
else
|
||||
- dblib = %w(libc db db2 db1 db6 db5 db4 db3 gdbm_compat gdbm qdbm)
|
||||
+ dblib = %w(libc db db2 db1 db6 db5 db48 db3 gdbm_compat gdbm qdbm)
|
||||
+ dblib = %w(libc db db2 db1 db18 db6 db5 db4 db3 gdbm_compat gdbm qdbm)
|
||||
end
|
||||
|
||||
headers = {
|
||||
@@ -33,7 +33,7 @@ headers = {
|
||||
"db1" => ["db1/ndbm.h", "db1.h", "ndbm.h"],
|
||||
"db2" => ["db2/db.h", "db2.h", "db.h"],
|
||||
"db3" => ["db3/db.h", "db3.h", "db.h"],
|
||||
- "db4" => ["db4/db.h", "db4.h", "db.h"],
|
||||
+ "db48" => ["db48/db.h", "db4.h", "db.h"],
|
||||
@@ -36,6 +37,7 @@ headers = {
|
||||
"db4" => ["db4/db.h", "db4.h", "db.h"],
|
||||
"db5" => ["db5/db.h", "db5.h", "db.h"],
|
||||
"db6" => ["db6/db.h", "db6.h", "db.h"],
|
||||
+ "db18" => ["db18/db.h", "db18.h", "db.h"],
|
||||
"gdbm_compat" => ["gdbm-ndbm.h", "gdbm/ndbm.h", "ndbm.h"], # GDBM since 1.8.1
|
||||
@@ -127,6 +127,19 @@ end
|
||||
"gdbm" => ["gdbm-ndbm.h", "gdbm/ndbm.h", "ndbm.h"], # GDBM until 1.8.0
|
||||
"qdbm" => ["qdbm/relic.h", "relic.h"],
|
||||
@@ -127,13 +129,27 @@ end
|
||||
|
||||
|
||||
def headers.db_check2(db, hdr)
|
||||
@ -27,9 +34,10 @@
|
||||
+ "db1" => "db1",
|
||||
+ "db2" => "db2",
|
||||
+ "db3" => "db3",
|
||||
+ "db48" => "db-4.8",
|
||||
+ "db4" => "db4",
|
||||
+ "db5" => "db-5",
|
||||
+ "db6" => "db-6",
|
||||
+ "db18" => "db-18",
|
||||
+ "gdbm_compat" => "gdbm_compat",
|
||||
+ "gdbm" => "gdbm",
|
||||
+ "qdbm" => "qdbm",
|
||||
@ -38,7 +46,15 @@
|
||||
$defs.push(%{-DRUBYDBM_DBM_HEADER='"#{hdr}"'})
|
||||
$defs.push(%{-DRUBYDBM_DBM_TYPE='"#{db}"'})
|
||||
|
||||
@@ -147,7 +160,7 @@ def headers.db_check2(db, hdr)
|
||||
hsearch = nil
|
||||
|
||||
case db
|
||||
- when /^db[2-6]?$/
|
||||
+ when /^db([2-6]|18)?$/
|
||||
hsearch = "-DDB_DBM_HSEARCH"
|
||||
when "gdbm_compat"
|
||||
have_library("gdbm") or return false
|
||||
@@ -147,7 +163,7 @@ def headers.db_check2(db, hdr)
|
||||
# 4.3BSD original ndbm is contained in libc.
|
||||
# 4.4BSD (and its derivatives such as NetBSD) contains Berkeley DB 1 in libc.
|
||||
if !(db == 'libc' ? have_func('dbm_open("", 0, 0)', hdr, hsearch) :
|
||||
|
Loading…
Reference in New Issue
Block a user