bdb 0.2.6.2 → 0.2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/ext/extconf.rb +10 -4
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.6.
|
1
|
+
0.2.6.4
|
data/ext/extconf.rb
CHANGED
@@ -1,22 +1,28 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'mkmf'
|
3
3
|
|
4
|
+
bdb_directories = [ ]
|
5
|
+
|
4
6
|
# This list is checked in reverse order, so this order allows mkmf on my Mac
|
5
7
|
# to find BDB installed via Homebrew (/usr/local) before system installs
|
6
8
|
%w[/usr / /usr/local /usr/local/db* /usr/local/BerkeleyDB*].each do |pdir|
|
7
9
|
Dir[pdir].each do |dir|
|
8
|
-
|
10
|
+
bdb_directories << { :include => "#{dir}/include", :lib => "#{dir}/lib" }
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
12
14
|
# MacPorts installs the directories "inside-out" compared to the structure expected above
|
13
15
|
macports_db_versions = Dir["/opt/local/include/db*"].map { |dir| %r|db(\d\d)$|.match(dir) }.compact.map { |match| match[1] }
|
14
16
|
macports_db_versions.each do |version|
|
15
|
-
|
17
|
+
bdb_directories << { :include => "/opt/local/include/db#{version}", :lib => "/opt/local/lib/db#{version}" }
|
18
|
+
end
|
19
|
+
|
20
|
+
bdb_directories.each do |bdb_directory|
|
21
|
+
dir_config('db', bdb_directory[:include], bdb_directory[:lib])
|
16
22
|
end
|
17
23
|
|
18
|
-
%w(db-5.1 db-5.0 db-4.9 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2).
|
19
|
-
have_library
|
24
|
+
%w(db-5.1 db-5.0 db-4.9 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2).detect do |version|
|
25
|
+
have_library version, 'db_version', 'db.h'
|
20
26
|
end
|
21
27
|
|
22
28
|
def create_header
|