rroonga 9.0.3 → 11.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/Rakefile +26 -135
- data/doc/text/news.md +79 -1
- data/doc/text/tutorial.md +1 -1
- data/ext/groonga/extconf.rb +19 -74
- data/ext/groonga/rb-grn-accessor.c +2 -2
- data/ext/groonga/rb-grn-column-cache.c +3 -3
- data/ext/groonga/rb-grn-column.c +4 -4
- data/ext/groonga/rb-grn-context.c +109 -58
- data/ext/groonga/rb-grn-data-column.c +4 -4
- data/ext/groonga/rb-grn-database.c +45 -26
- data/ext/groonga/rb-grn-double-array-trie.c +2 -2
- data/ext/groonga/rb-grn-encoding-support.c +2 -2
- data/ext/groonga/rb-grn-exception.c +14 -0
- data/ext/groonga/rb-grn-expression-builder.c +3 -3
- data/ext/groonga/rb-grn-expression.c +3 -3
- data/ext/groonga/rb-grn-fix-size-column.c +2 -2
- data/ext/groonga/rb-grn-flushable.c +9 -1
- data/ext/groonga/rb-grn-hash.c +2 -2
- data/ext/groonga/rb-grn-index-column.c +30 -2
- data/ext/groonga/rb-grn-index-cursor.c +21 -2
- data/ext/groonga/rb-grn-inverted-index-cursor.c +3 -3
- data/ext/groonga/rb-grn-logger.c +17 -3
- data/ext/groonga/rb-grn-object.c +266 -31
- data/ext/groonga/rb-grn-operator.c +100 -259
- data/ext/groonga/rb-grn-patricia-trie.c +2 -2
- data/ext/groonga/rb-grn-plugin.c +34 -22
- data/ext/groonga/rb-grn-request-timer-id.c +2 -2
- data/ext/groonga/rb-grn-snippet.c +3 -3
- data/ext/groonga/rb-grn-table-cursor-key-support.c +2 -2
- data/ext/groonga/rb-grn-table-cursor.c +3 -3
- data/ext/groonga/rb-grn-table-key-support.c +28 -9
- data/ext/groonga/rb-grn-table.c +180 -130
- data/ext/groonga/rb-grn-type.c +5 -1
- data/ext/groonga/rb-grn-utils.c +17 -1
- data/ext/groonga/rb-grn-variable-size-column.c +2 -2
- data/ext/groonga/rb-grn-variable.c +2 -2
- data/ext/groonga/rb-grn.h +11 -14
- data/ext/groonga/rb-groonga.c +6 -2
- data/lib/groonga.rb +3 -7
- data/lib/groonga/context.rb +32 -0
- data/lib/groonga/dumper.rb +3 -0
- data/lib/groonga/record.rb +2 -2
- data/rroonga-build.rb +5 -4
- data/rroonga.gemspec +8 -6
- data/test/groonga-test-utils.rb +37 -5
- data/test/run-test.rb +1 -3
- data/test/test-accessor.rb +63 -7
- data/test/test-column.rb +12 -1
- data/test/test-context.rb +25 -0
- data/test/test-exception.rb +5 -0
- data/test/test-flushable.rb +51 -6
- data/test/test-index-column.rb +70 -9
- data/test/test-index-cursor.rb +26 -0
- data/test/test-logger.rb +56 -11
- data/test/test-plugin.rb +1 -0
- data/test/test-query-logger.rb +4 -3
- data/test/test-ractor.rb +65 -0
- data/test/test-record.rb +2 -1
- data/test/test-remote.rb +58 -10
- data/test/test-schema-dumper.rb +13 -0
- data/test/test-schema.rb +9 -1
- data/test/test-table-arrow.rb +22 -10
- data/test/test-table.rb +21 -1
- data/test/test-variable.rb +23 -7
- metadata +72 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2e5c28e453fae2876164e7ea4ef8e3e24b0e789bec2c6cd270850905296a9c5
|
4
|
+
data.tar.gz: 8f8cac4d824bc94e0f89dd8ee60e8b2a0fd0fb92b1e666dfbb7732ef43c7bb96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e23a7b4d5aaa7375ee7347fdce6706d90311f8447ec41d7ecf7d0864258f9992cbba7a9521d5afd5589197a25e3b3acece7c7c515ecfb2980daa8329639a678b
|
7
|
+
data.tar.gz: cefd86c0fc0053aa34d669b4cb94f78d38dc63ee4faea9c32b1a5519fc231f99bc1146e8f54bb50d38a60d89e1129a7e5145bc03107f05cf3925cd8687cf98fa
|
data/.yardopts
CHANGED
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# -*-
|
1
|
+
# -*- ruby -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2009-
|
3
|
+
# Copyright (C) 2009-2020 Sutou Kouhei <kou@clear-code.com>
|
4
4
|
# Copyright (C) 2017 Masafumi Yokoyama <yokoyama@clear-code.com>
|
5
5
|
#
|
6
6
|
# This library is free software; you can redistribute it and/or
|
@@ -16,15 +16,9 @@
|
|
16
16
|
# License along with this library; if not, write to the Free Software
|
17
17
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
18
|
|
19
|
-
require "find"
|
20
|
-
require "fileutils"
|
21
|
-
require "shellwords"
|
22
|
-
require "pathname"
|
23
|
-
require "erb"
|
24
|
-
require "yard"
|
25
19
|
require "bundler/gem_helper"
|
26
|
-
require "rake/extensiontask"
|
27
20
|
require "packnga"
|
21
|
+
require "yard"
|
28
22
|
|
29
23
|
base_dir = File.join(File.dirname(__FILE__))
|
30
24
|
|
@@ -52,73 +46,6 @@ Packnga::ReleaseTask.new(spec) do |task|
|
|
52
46
|
task.index_html_dir = ranguba_org_dir
|
53
47
|
end
|
54
48
|
|
55
|
-
module YARD
|
56
|
-
module CodeObjects
|
57
|
-
class Proxy
|
58
|
-
alias_method :initialize_original, :initialize
|
59
|
-
def initialize(namespace, name, type=nil)
|
60
|
-
name = name.to_s.gsub(/\AGrn(.*)\z/) do
|
61
|
-
suffix = $1
|
62
|
-
case suffix
|
63
|
-
when ""
|
64
|
-
"Groonga"
|
65
|
-
when "TableKeySupport"
|
66
|
-
"Groonga::Table::KeySupport"
|
67
|
-
else
|
68
|
-
"Groonga::#{suffix}"
|
69
|
-
end
|
70
|
-
end
|
71
|
-
initialize_original(namespace, name, type)
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
def windows?(platform=nil)
|
78
|
-
platform ||= RUBY_PLATFORM
|
79
|
-
platform =~ /mswin(?!ce)|mingw|cygwin|bccwin/
|
80
|
-
end
|
81
|
-
|
82
|
-
def collect_binary_files(binary_dir)
|
83
|
-
binary_files = []
|
84
|
-
Find.find(binary_dir) do |name|
|
85
|
-
next unless File.file?(name)
|
86
|
-
next if /\.zip\z/i =~ name
|
87
|
-
binary_files << name
|
88
|
-
end
|
89
|
-
binary_files
|
90
|
-
end
|
91
|
-
|
92
|
-
def windows_gem_name(spec, architecture)
|
93
|
-
"#{spec.name}-#{spec.version}-#{architecture}-mingw32.gem"
|
94
|
-
end
|
95
|
-
|
96
|
-
relative_vendor_dir = "vendor"
|
97
|
-
relative_binary_dir = File.join("vendor", "local")
|
98
|
-
vendor_dir = File.join(base_dir, relative_vendor_dir)
|
99
|
-
binary_dir = File.join(base_dir, relative_binary_dir)
|
100
|
-
|
101
|
-
groonga_win32_i386_p = ENV["RROONGA_USE_GROONGA_X64"].nil?
|
102
|
-
|
103
|
-
Rake::ExtensionTask.new("groonga", spec) do |ext|
|
104
|
-
if groonga_win32_i386_p
|
105
|
-
ext.cross_platform = ["x86-mingw32"]
|
106
|
-
else
|
107
|
-
ext.cross_platform = ["x64-mingw32"]
|
108
|
-
end
|
109
|
-
if windows?
|
110
|
-
ext.gem_spec.files += collect_binary_files(relative_binary_dir)
|
111
|
-
else
|
112
|
-
ext.cross_compile = true
|
113
|
-
ext.cross_compiling do |_spec|
|
114
|
-
if windows?(_spec.platform.to_s)
|
115
|
-
binary_files = collect_binary_files(relative_binary_dir)
|
116
|
-
_spec.files += binary_files
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
49
|
file "Makefile" => ["extconf.rb", "ext/groonga/extconf.rb"] do
|
123
50
|
extconf_args = []
|
124
51
|
if ENV["TRAVIS"]
|
@@ -136,74 +63,38 @@ task :test => :configure do
|
|
136
63
|
end
|
137
64
|
|
138
65
|
namespace :test do
|
139
|
-
task :install do
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
installed_path =
|
66
|
+
task :install => "install" do
|
67
|
+
rroonga_specs = Gem.source_index.find_name("rroonga")
|
68
|
+
target_rroonga_spec = rroonga_specs.find do |rroonga_spec|
|
69
|
+
rroonga_spec.version == helper.gemspec.version
|
70
|
+
end
|
71
|
+
installed_path = target_rroonga_spec.full_gem_path
|
145
72
|
ENV["NO_MAKE"] = "yes"
|
146
73
|
ruby("#{installed_path}/test/run-test.rb")
|
147
74
|
end
|
148
75
|
end
|
149
76
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
namespace :build do
|
160
|
-
namespace :windows do
|
161
|
-
ruby_versions = "2.3.0:2.4.0:2.5.0:2.6.0"
|
162
|
-
|
163
|
-
windows_architectures.each do |architecture|
|
164
|
-
desc "Build gem for Windows #{architecture}"
|
165
|
-
task architecture do
|
166
|
-
build_dir = "tmp/windows"
|
167
|
-
rm_rf build_dir
|
168
|
-
mkdir_p build_dir
|
169
|
-
|
170
|
-
commands = [
|
171
|
-
["git", "clone", "file://#{Dir.pwd}/.git", build_dir],
|
172
|
-
["cd", build_dir],
|
173
|
-
["gem", "install", "json"],
|
174
|
-
["bundle"],
|
175
|
-
["rake", "cross", "native", "gem", "RUBY_CC_VERSION=#{ruby_versions}"],
|
176
|
-
]
|
177
|
-
if architecture == :x64
|
178
|
-
commands.unshift(["export", "RROONGA_USE_GROONGA_X64=true"])
|
179
|
-
end
|
180
|
-
raw_commands = commands.collect do |command|
|
181
|
-
Shellwords.join(command)
|
182
|
-
end
|
183
|
-
raw_command_line = raw_commands.join(" && ")
|
184
|
-
|
185
|
-
require "rake_compiler_dock"
|
186
|
-
RakeCompilerDock.sh(raw_command_line)
|
187
|
-
|
188
|
-
cp("#{build_dir}/pkg/#{windows_gem_name(spec, architecture)}",
|
189
|
-
"pkg/")
|
190
|
-
end
|
77
|
+
def update_version(new_version)
|
78
|
+
splitted_new_version = new_version.split(".")
|
79
|
+
type_order = ["MAJOR", "MINOR", "MICRO"]
|
80
|
+
File.open("ext/groonga/rb-grn.h", "rb+") do |rb_grn_h|
|
81
|
+
content = rb_grn_h.read
|
82
|
+
content.gsub!(/(RB_GRN_(MAJOR|MINOR|MICRO)_VERSION) \d+/) do
|
83
|
+
name = $1
|
84
|
+
type = $2
|
85
|
+
"#{name} #{splitted_new_version[type_order.index(type)]}"
|
191
86
|
end
|
87
|
+
rb_grn_h.rewind
|
88
|
+
rb_grn_h.write(content)
|
192
89
|
end
|
193
|
-
|
194
|
-
desc "Build gems for Windows"
|
195
|
-
build_tasks = windows_architectures.collect do |architecture|
|
196
|
-
"windows:#{architecture}"
|
197
|
-
end
|
198
|
-
task :windows => build_tasks
|
199
90
|
end
|
200
91
|
|
201
|
-
namespace :
|
202
|
-
desc "
|
203
|
-
task :
|
204
|
-
|
205
|
-
|
206
|
-
|
92
|
+
namespace :version do
|
93
|
+
desc "Update version"
|
94
|
+
task :update do |_, args|
|
95
|
+
new_version = ENV["NEW_VERSION"]
|
96
|
+
raise "NEW_VERSION must be specified" if new_version.nil?
|
97
|
+
update_version(new_version)
|
207
98
|
end
|
208
99
|
end
|
209
100
|
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,83 @@
|
|
1
1
|
# NEWS
|
2
2
|
|
3
|
+
## 11.0.0: 2021-02-09 {#version-11-0-0}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* {Groonga::ConnectionReset} Added.
|
8
|
+
|
9
|
+
* {Groonga::Context.open} Added.
|
10
|
+
|
11
|
+
* Added support for Ractor.
|
12
|
+
|
13
|
+
* {Groonga::Database} Accept path like object in .open/.create.
|
14
|
+
|
15
|
+
## 10.0.6: 2020-09-01 {#version-10-0-6}
|
16
|
+
|
17
|
+
### Fixes
|
18
|
+
|
19
|
+
* Fixed a bug that failed `gem install rroonga` in Windows version.
|
20
|
+
|
21
|
+
## 10.0.2: 2020-04-29 {#version-10-0-2}
|
22
|
+
|
23
|
+
### Improvements
|
24
|
+
|
25
|
+
* Added support for Float32 in Groonga 10.0.2.
|
26
|
+
|
27
|
+
* [doc] Fixed markup of a image in tutorial [GitHub#192][Patched by takahashim]
|
28
|
+
|
29
|
+
### Thanks
|
30
|
+
|
31
|
+
* takahashim
|
32
|
+
|
33
|
+
## 10.0.1: 2020-04-02 {#version-10-0-1}
|
34
|
+
|
35
|
+
### Improvements
|
36
|
+
|
37
|
+
* Added support for creating a table with normalizer with options
|
38
|
+
|
39
|
+
* Windows: Added Ruby 2.7 support.
|
40
|
+
|
41
|
+
* Windows: Dropped Ruby 2.3.
|
42
|
+
|
43
|
+
* This version has been EOL.
|
44
|
+
|
45
|
+
* Dropped fat gem support.
|
46
|
+
|
47
|
+
## 9.0.7: 2019-08-29 {#version-9-0-7}
|
48
|
+
|
49
|
+
### Improvements
|
50
|
+
|
51
|
+
* {Groonga::Object#lexicon?} Added.
|
52
|
+
|
53
|
+
* {Groonga::IndexColumn} Added support "INDEX_LARGE".
|
54
|
+
|
55
|
+
* {Groonga::IndexCursor#set_min?} Added.
|
56
|
+
|
57
|
+
* {Groonga::IndexCursor#set_min=} Added.
|
58
|
+
|
59
|
+
* {Groonga::Context#force_match_escalation?} Added.
|
60
|
+
|
61
|
+
* {Groonga::Context#force_match_escalation=} Added.
|
62
|
+
|
63
|
+
* {Groonga::Object#id_accessor?} Added.
|
64
|
+
|
65
|
+
* {Groonga::Logger.flags} Added support for thread id option.
|
66
|
+
|
67
|
+
* {Groonga::Object#bulk?} Added.
|
68
|
+
|
69
|
+
* {Groonga::Object#value_accessor?} Added.
|
70
|
+
|
71
|
+
* {Groonga::Table} Delegate support_score? from Groonga::Record to Groonga::Table.
|
72
|
+
|
73
|
+
* Groonga::Flashable Added support dependent option.
|
74
|
+
|
75
|
+
* {Groonga::Object#score_accessor?} Added.
|
76
|
+
|
77
|
+
* {Groonga::Object#nsubrecs_accessor? } Added.
|
78
|
+
|
79
|
+
* Translate a part of explanation of Groonga::Table into English.
|
80
|
+
|
3
81
|
## 9.0.3: 2019-05-10 {#version-9-0-3}
|
4
82
|
|
5
83
|
### Improvements
|
@@ -15,7 +93,7 @@
|
|
15
93
|
* Added support for "--with-groonga-configure-options".
|
16
94
|
[GitHub#146][Reported by Tomás Pollak]
|
17
95
|
|
18
|
-
*
|
96
|
+
* Groonga::RegexpExpressionBuilder: Added support (?-mix:XXX) for searching of regular expression.
|
19
97
|
[groonga-dev,04694][Reported by Masatoshi SEKI]
|
20
98
|
|
21
99
|
* Use "groonga-latest.tar.gz" for build Groonga.
|
data/doc/text/tutorial.md
CHANGED
data/ext/groonga/extconf.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# Copyright (C) 2009-
|
3
|
+
# Copyright (C) 2009-2021 Sutou Kouhei <kou@clear-code.com>
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -23,6 +23,7 @@ require "shellwords"
|
|
23
23
|
require "open-uri"
|
24
24
|
require "uri"
|
25
25
|
|
26
|
+
require "native-package-installer"
|
26
27
|
require "pkg-config"
|
27
28
|
|
28
29
|
base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
|
@@ -49,30 +50,11 @@ def win32?
|
|
49
50
|
/cygwin|mingw|mswin/ =~ RUBY_PLATFORM
|
50
51
|
end
|
51
52
|
|
52
|
-
checking_for(checking_message("Win32 OS")) do
|
53
|
-
win32 = win32?
|
54
|
-
if win32
|
55
|
-
$defs << "-DRB_GRN_PLATFORM_WIN32"
|
56
|
-
import_library_name = "libruby-#{module_name}.a"
|
57
|
-
$DLDFLAGS << " -Wl,--out-implib=#{import_library_name}"
|
58
|
-
$cleanfiles << import_library_name
|
59
|
-
binary_base_dir = base_dir + "vendor" + "local"
|
60
|
-
pkg_config_dir = binary_base_dir + "lib" + "pkgconfig"
|
61
|
-
PKGConfig.add_path(pkg_config_dir.to_s)
|
62
|
-
PKGConfig.set_override_variable("prefix", binary_base_dir.to_s)
|
63
|
-
end
|
64
|
-
win32
|
65
|
-
end
|
66
|
-
|
67
53
|
def install_groonga_locally
|
68
54
|
FileUtils.mkdir_p(local_groonga_base_dir)
|
69
55
|
|
70
56
|
Dir.chdir(local_groonga_base_dir) do
|
71
|
-
|
72
|
-
extract_groonga_win32_binary
|
73
|
-
else
|
74
|
-
build_groonga
|
75
|
-
end
|
57
|
+
build_groonga
|
76
58
|
end
|
77
59
|
|
78
60
|
prepend_pkg_config_path_for_local_groonga
|
@@ -96,7 +78,7 @@ def download(url)
|
|
96
78
|
]
|
97
79
|
end
|
98
80
|
end
|
99
|
-
open(url, "rb", options) do |input|
|
81
|
+
URI.open(url, "rb", *options) do |input|
|
100
82
|
File.open(base_name, "wb") do |output|
|
101
83
|
while (buffer = input.read(1024))
|
102
84
|
output.print(buffer)
|
@@ -107,50 +89,6 @@ def download(url)
|
|
107
89
|
end
|
108
90
|
end
|
109
91
|
|
110
|
-
def extract_zip(filename, destrination_dir)
|
111
|
-
require "archive/zip"
|
112
|
-
|
113
|
-
Archive::Zip.extract(filename, destrination_dir)
|
114
|
-
rescue LoadError
|
115
|
-
command_line = ["unzip", filename, "-d", destrination_dir]
|
116
|
-
unless system(*command_line)
|
117
|
-
raise "Failed to unzip: #{command_line.join(' ')}"
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
def extract_groonga_win32_binary
|
122
|
-
if ENV["RROONGA_USE_GROONGA_X64"]
|
123
|
-
architecture = "x64"
|
124
|
-
else
|
125
|
-
architecture = "x86"
|
126
|
-
end
|
127
|
-
zip = "groonga-latest-#{architecture}.zip"
|
128
|
-
url = "https://packages.groonga.org/windows/groonga/#{zip}"
|
129
|
-
install_dir = local_groonga_install_dir
|
130
|
-
|
131
|
-
download(url)
|
132
|
-
|
133
|
-
message("extracting...")
|
134
|
-
before_paths = Dir.glob("*")
|
135
|
-
extract_zip(zip, ".")
|
136
|
-
extracted_dir = (Dir.glob("*") - before_paths).first
|
137
|
-
message(" done\n")
|
138
|
-
|
139
|
-
if File.exist?(install_dir)
|
140
|
-
message("removing old install... #{install_dir}")
|
141
|
-
FileUtils.rm_rf(install_dir)
|
142
|
-
message(" done\n")
|
143
|
-
end
|
144
|
-
|
145
|
-
message("installing...")
|
146
|
-
FileUtils.mv(extracted_dir, install_dir)
|
147
|
-
message(" done\n")
|
148
|
-
|
149
|
-
message("removing binary archive...")
|
150
|
-
FileUtils.rm_rf(zip)
|
151
|
-
message(" done\n")
|
152
|
-
end
|
153
|
-
|
154
92
|
def run_command(start_message, command)
|
155
93
|
message(start_message)
|
156
94
|
if xsystem(command)
|
@@ -247,6 +185,7 @@ def build_groonga_from_tar_gz
|
|
247
185
|
FileUtils.mkdir_p(groonga_source_dir)
|
248
186
|
|
249
187
|
message("extracting...")
|
188
|
+
# TODO: Use Zlip::GzipReader and Gem::Package::TarReader
|
250
189
|
if xsystem("tar xfz #{tar_gz} -C #{groonga_source_dir} --strip-components=1")
|
251
190
|
message(" done\n")
|
252
191
|
else
|
@@ -285,15 +224,18 @@ def install_local_groonga(package_name, major, minor, micro)
|
|
285
224
|
add_rpath_for_local_groonga
|
286
225
|
end
|
287
226
|
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
227
|
+
need_auto_groonga_install = false
|
228
|
+
unless PKGConfig.have_package(package_name, major, minor, micro)
|
229
|
+
if NativePackageInstaller.install(debian: "libgroonga-dev",
|
230
|
+
homebrew: "groonga",
|
231
|
+
msys2: "groonga")
|
232
|
+
need_auto_groonga_install =
|
233
|
+
!PKGConfig.have_package(package_name, major, minor, micro)
|
295
234
|
end
|
296
235
|
end
|
236
|
+
if need_auto_groonga_install
|
237
|
+
install_local_groonga(package_name, major, minor, micro)
|
238
|
+
end
|
297
239
|
|
298
240
|
real_version = PKGConfig.modversion(package_name)
|
299
241
|
real_major, real_minor, real_micro = real_version.split(/\./)
|
@@ -335,7 +277,7 @@ end
|
|
335
277
|
|
336
278
|
def enable_debug_build_flag(flags)
|
337
279
|
if gcc?
|
338
|
-
flags.gsub(/(^|\s)?-g\d?(\s|$)
|
280
|
+
flags.gsub(/(^|\s)?-g\d?(\s|$)/, '\\1-ggdb3\\2')
|
339
281
|
else
|
340
282
|
flags
|
341
283
|
end
|
@@ -347,6 +289,9 @@ checking_for(checking_message("--enable-debug-build option")) do
|
|
347
289
|
$CFLAGS = disable_optimization_build_flag($CFLAGS)
|
348
290
|
$CFLAGS = enable_debug_build_flag($CFLAGS)
|
349
291
|
|
292
|
+
CONFIG["optflags"] = disable_optimization_build_flag(CONFIG["optflags"])
|
293
|
+
CONFIG["debugflags"] = enable_debug_build_flag(CONFIG["debugflags"])
|
294
|
+
|
350
295
|
CONFIG["CXXFLAGS"] = disable_optimization_build_flag(CONFIG["CXXFLAGS"])
|
351
296
|
CONFIG["CXXFLAGS"] = enable_debug_build_flag(CONFIG["CXXFLAGS"])
|
352
297
|
end
|