nokogiri 1.6.1-x86-mingw32 → 1.6.2.rc1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +7 -7
- data/.editorconfig +17 -0
- data/.travis.yml +4 -6
- data/CHANGELOG.ja.rdoc +37 -8
- data/CHANGELOG.rdoc +48 -3
- data/Gemfile +3 -3
- data/Manifest.txt +57 -1
- data/README.ja.rdoc +22 -16
- data/README.rdoc +24 -19
- data/ROADMAP.md +1 -2
- data/Rakefile +161 -58
- data/build_all +56 -31
- data/dependencies.yml +3 -3
- data/ext/nokogiri/extconf.rb +379 -121
- data/ext/nokogiri/html_document.c +2 -2
- data/ext/nokogiri/nokogiri.c +6 -1
- data/ext/nokogiri/xml_document.c +5 -4
- data/ext/nokogiri/xml_node.c +11 -4
- data/ext/nokogiri/xml_reader.c +1 -1
- data/ext/nokogiri/xml_sax_parser_context.c +40 -0
- data/ext/nokogiri/xml_syntax_error.c +10 -5
- data/ext/nokogiri/xml_syntax_error.h +1 -1
- data/ext/nokogiri/xml_xpath_context.c +2 -14
- data/ext/nokogiri/xslt_stylesheet.c +1 -1
- data/lib/nokogiri.rb +31 -22
- data/lib/nokogiri/1.9/nokogiri.so +0 -0
- data/lib/nokogiri/2.0/nokogiri.so +0 -0
- data/lib/nokogiri/2.1/nokogiri.so +0 -0
- data/lib/nokogiri/css/node.rb +0 -50
- data/lib/nokogiri/css/parser.rb +213 -218
- data/lib/nokogiri/css/parser.y +21 -30
- data/lib/nokogiri/css/xpath_visitor.rb +62 -14
- data/lib/nokogiri/html/document.rb +97 -18
- data/lib/nokogiri/html/sax/parser.rb +2 -2
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/builder.rb +1 -1
- data/lib/nokogiri/xml/document.rb +2 -2
- data/lib/nokogiri/xml/dtd.rb +10 -0
- data/lib/nokogiri/xml/node.rb +26 -1
- data/lib/nokogiri/xml/sax/parser.rb +1 -1
- data/suppressions/README.txt +1 -0
- data/suppressions/nokogiri_ree-1.8.7.358.supp +61 -0
- data/suppressions/nokogiri_ruby-1.8.7.370.supp +0 -0
- data/suppressions/nokogiri_ruby-1.9.2.320.supp +28 -0
- data/suppressions/nokogiri_ruby-1.9.3.327.supp +28 -0
- data/test/css/test_nthiness.rb +65 -2
- data/test/css/test_parser.rb +27 -10
- data/test/css/test_tokenizer.rb +1 -1
- data/test/css/test_xpath_visitor.rb +6 -1
- data/test/files/atom.xml +344 -0
- data/test/files/shift_jis_no_charset.html +9 -0
- data/test/helper.rb +10 -0
- data/test/html/test_document.rb +74 -7
- data/test/html/test_document_encoding.rb +10 -0
- data/test/html/test_document_fragment.rb +3 -3
- data/test/namespaces/test_namespaces_in_cloned_doc.rb +31 -0
- data/test/test_nokogiri.rb +6 -0
- data/test/test_reader.rb +7 -4
- data/test/test_xslt_transforms.rb +25 -0
- data/test/xml/sax/test_parser.rb +16 -0
- data/test/xml/sax/test_parser_context.rb +9 -0
- data/test/xml/test_builder.rb +9 -0
- data/test/xml/test_c14n.rb +12 -2
- data/test/xml/test_document.rb +66 -0
- data/test/xml/test_document_fragment.rb +5 -0
- data/test/xml/test_dtd.rb +84 -0
- data/test/xml/test_entity_reference.rb +3 -3
- data/test/xml/test_node.rb +21 -3
- data/test/xml/test_node_attributes.rb +17 -0
- data/test/xml/test_schema.rb +26 -0
- data/test/xml/test_xpath.rb +81 -0
- metadata +235 -176
- data/lib/nokogiri/nokogiri.rb +0 -1
- data/tasks/cross_compile.rb +0 -134
data/ROADMAP.md
CHANGED
@@ -77,8 +77,7 @@
|
|
77
77
|
## Encoding
|
78
78
|
|
79
79
|
We have a lot of issues open around encoding. How bad are things?
|
80
|
-
|
81
|
-
knows encoding well should head this up.
|
80
|
+
Somebody who knows encoding well should head this up.
|
82
81
|
|
83
82
|
* Extract EncodingReader as a real object that can be injected
|
84
83
|
https://groups.google.com/forum/#!msg/nokogiri-talk/arJeAtMqvkg/tGihB-iBRSAJ
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
require 'rubygems'
|
3
|
+
require 'shellwords'
|
3
4
|
|
4
5
|
gem 'hoe'
|
5
6
|
require 'hoe'
|
@@ -14,11 +15,92 @@ GENERATED_TOKENIZER = "lib/nokogiri/css/tokenizer.rb"
|
|
14
15
|
CROSS_DIR = File.join(File.dirname(__FILE__), 'ports')
|
15
16
|
|
16
17
|
def java?
|
17
|
-
|
18
|
+
/java/ === RUBY_PLATFORM
|
18
19
|
end
|
19
20
|
|
20
21
|
ENV['LANG'] = "en_US.UTF-8" # UBUNTU 10.04, Y U NO DEFAULT TO UTF-8?
|
21
22
|
|
23
|
+
CrossRuby = Struct.new(:version, :host) {
|
24
|
+
def ver
|
25
|
+
@ver ||= version[/\A[^-]+/]
|
26
|
+
end
|
27
|
+
|
28
|
+
def api_ver_suffix
|
29
|
+
case ver
|
30
|
+
when /\A([2-9])\.([0-9])\./
|
31
|
+
"#{$1}#{$2}0"
|
32
|
+
when /\A1\.9\./
|
33
|
+
'191'
|
34
|
+
else
|
35
|
+
raise "unsupported version: #{ver}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def platform
|
40
|
+
@platform ||=
|
41
|
+
case host
|
42
|
+
when /\Ax86_64-/
|
43
|
+
'x64-mingw32'
|
44
|
+
when /\Ai[3-6]86-/
|
45
|
+
'x86-mingw32'
|
46
|
+
else
|
47
|
+
raise "unsupported host: #{host}"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def tool(name)
|
52
|
+
(@binutils_prefix ||=
|
53
|
+
case platform
|
54
|
+
when 'x64-mingw32'
|
55
|
+
'x86_64-w64-mingw32-'
|
56
|
+
when 'x86-mingw32'
|
57
|
+
'i686-w64-mingw32-'
|
58
|
+
end) + name
|
59
|
+
end
|
60
|
+
|
61
|
+
def target
|
62
|
+
case platform
|
63
|
+
when 'x64-mingw32'
|
64
|
+
'pei-x86-64'
|
65
|
+
when 'x86-mingw32'
|
66
|
+
'pei-i386'
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def libruby_dll
|
71
|
+
case platform
|
72
|
+
when 'x64-mingw32'
|
73
|
+
"x64-msvcrt-ruby#{api_ver_suffix}.dll"
|
74
|
+
when 'x86-mingw32'
|
75
|
+
"msvcrt-ruby#{api_ver_suffix}.dll"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def dlls
|
80
|
+
[
|
81
|
+
'kernel32.dll',
|
82
|
+
'msvcrt.dll',
|
83
|
+
'ws2_32.dll',
|
84
|
+
*(case
|
85
|
+
when ver >= '2.0.0'
|
86
|
+
'user32.dll'
|
87
|
+
end),
|
88
|
+
libruby_dll
|
89
|
+
]
|
90
|
+
end
|
91
|
+
}
|
92
|
+
|
93
|
+
CROSS_RUBIES = File.read('.cross_rubies').lines.flat_map { |line|
|
94
|
+
case line
|
95
|
+
when /\A([^#]+):([^#]+)/
|
96
|
+
CrossRuby.new($1, $2)
|
97
|
+
else
|
98
|
+
[]
|
99
|
+
end
|
100
|
+
}
|
101
|
+
|
102
|
+
ENV['RUBY_CC_VERSION'] ||= CROSS_RUBIES.map(&:ver).uniq.join(":")
|
103
|
+
|
22
104
|
require 'tasks/nokogiri.org'
|
23
105
|
|
24
106
|
HOE = Hoe.spec 'nokogiri' do
|
@@ -26,25 +108,31 @@ HOE = Hoe.spec 'nokogiri' do
|
|
26
108
|
developer 'Mike Dalessio', 'mike.dalessio@gmail.com'
|
27
109
|
developer 'Yoko Harada', 'yokolet@gmail.com'
|
28
110
|
developer 'Tim Elliott', 'tle@holymonkey.com'
|
111
|
+
developer 'Akinori MUSHA', 'knu@idaemons.org'
|
29
112
|
|
30
113
|
self.readme_file = ['README', ENV['HLANG'], 'rdoc'].compact.join('.')
|
31
114
|
self.history_file = ['CHANGELOG', ENV['HLANG'], 'rdoc'].compact.join('.')
|
32
115
|
|
33
116
|
self.extra_rdoc_files = FileList['*.rdoc','ext/nokogiri/*.c']
|
34
117
|
|
35
|
-
self.licenses = ['MIT']
|
36
118
|
|
37
119
|
self.clean_globs += [
|
38
120
|
'nokogiri.gemspec',
|
39
121
|
'lib/nokogiri/nokogiri.{bundle,jar,rb,so}',
|
40
|
-
'lib/nokogiri/
|
122
|
+
'lib/nokogiri/[0-9].[0-9]',
|
123
|
+
'ports/*.installed',
|
124
|
+
'ports/{i[3-6]86,x86_64}-{w64-,}mingw32*',
|
125
|
+
'ports/libxml2',
|
126
|
+
'ports/libxslt',
|
41
127
|
# GENERATED_PARSER,
|
42
128
|
# GENERATED_TOKENIZER
|
43
129
|
]
|
44
130
|
|
45
|
-
|
46
|
-
[
|
47
|
-
|
131
|
+
unless java?
|
132
|
+
self.extra_deps += [
|
133
|
+
["mini_portile", "~> 0.5.2"],
|
134
|
+
]
|
135
|
+
end
|
48
136
|
|
49
137
|
self.extra_dev_deps += [
|
50
138
|
["hoe-bundler", ">= 1.1"],
|
@@ -53,7 +141,7 @@ HOE = Hoe.spec 'nokogiri' do
|
|
53
141
|
["hoe-git", ">= 1.4"],
|
54
142
|
["minitest", "~> 2.2.2"],
|
55
143
|
["rake", ">= 0.9"],
|
56
|
-
["rake-compiler", "~> 0.
|
144
|
+
["rake-compiler", "~> 0.9.2"],
|
57
145
|
["racc", ">= 1.4.6"],
|
58
146
|
["rexical", ">= 1.0.5"]
|
59
147
|
]
|
@@ -69,6 +157,7 @@ HOE = Hoe.spec 'nokogiri' do
|
|
69
157
|
|
70
158
|
self.testlib = :minitest
|
71
159
|
end
|
160
|
+
HOE.spec.licenses = ['MIT']
|
72
161
|
|
73
162
|
# ----------------------------------------
|
74
163
|
|
@@ -77,7 +166,7 @@ def add_file_to_gem relative_path
|
|
77
166
|
target_dir = File.dirname(target_path)
|
78
167
|
mkdir_p target_dir unless File.directory?(target_dir)
|
79
168
|
rm_f target_path
|
80
|
-
|
169
|
+
safe_ln relative_path, target_path
|
81
170
|
HOE.spec.files += [relative_path]
|
82
171
|
end
|
83
172
|
|
@@ -92,6 +181,8 @@ if java?
|
|
92
181
|
jruby_home = RbConfig::CONFIG['prefix']
|
93
182
|
ext.ext_dir = 'ext/java'
|
94
183
|
ext.lib_dir = 'lib/nokogiri'
|
184
|
+
ext.source_version = '1.6'
|
185
|
+
ext.target_version = '1.6'
|
95
186
|
jars = ["#{jruby_home}/lib/jruby.jar"] + FileList['lib/*.jar']
|
96
187
|
ext.classpath = jars.map { |x| File.expand_path x }.join ':'
|
97
188
|
end
|
@@ -100,9 +191,11 @@ if java?
|
|
100
191
|
add_file_to_gem 'lib/nokogiri/nokogiri.jar'
|
101
192
|
end
|
102
193
|
else
|
103
|
-
mingw_available = true
|
104
194
|
begin
|
105
|
-
require '
|
195
|
+
require 'rake/extensioncompiler'
|
196
|
+
# Ensure mingw compiler is installed
|
197
|
+
Rake::ExtensionCompiler.mingw_host
|
198
|
+
mingw_available = true
|
106
199
|
rescue
|
107
200
|
puts "WARNING: cross compilation not available: #{$!}"
|
108
201
|
mingw_available = false
|
@@ -111,18 +204,24 @@ else
|
|
111
204
|
|
112
205
|
HOE.spec.files.reject! { |f| f =~ %r{\.(java|jar)$} }
|
113
206
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
add_file_to_gem
|
125
|
-
|
207
|
+
dependencies = YAML.load_file("dependencies.yml")
|
208
|
+
|
209
|
+
task gem_build_path do
|
210
|
+
%w[libxml2 libxslt].each do |lib|
|
211
|
+
version = dependencies[lib]
|
212
|
+
archive = File.join("ports", "archives", "#{lib}-#{version}.tar.gz")
|
213
|
+
add_file_to_gem archive
|
214
|
+
patchesdir = File.join("ports", "patches", lib)
|
215
|
+
patches = `#{['git', 'ls-files', patchesdir].shelljoin}`.split("\n").grep(/\.patch\z/)
|
216
|
+
patches.each { |patch|
|
217
|
+
add_file_to_gem patch
|
218
|
+
}
|
219
|
+
(untracked = Dir[File.join(patchesdir, '*.patch')] - patches).empty? or
|
220
|
+
at_exit {
|
221
|
+
untracked.each { |patch|
|
222
|
+
puts "** WARNING: untracked patch file not added to gem: #{patch}"
|
223
|
+
}
|
224
|
+
}
|
126
225
|
end
|
127
226
|
end
|
128
227
|
|
@@ -131,12 +230,16 @@ else
|
|
131
230
|
ext.config_options << ENV['EXTOPTS']
|
132
231
|
if mingw_available
|
133
232
|
ext.cross_compile = true
|
134
|
-
ext.cross_platform =
|
135
|
-
ext.cross_config_options << "--
|
136
|
-
ext.
|
137
|
-
|
138
|
-
|
139
|
-
|
233
|
+
ext.cross_platform = CROSS_RUBIES.map(&:platform).uniq
|
234
|
+
ext.cross_config_options << "--enable-cross-build"
|
235
|
+
ext.cross_compiling do |spec|
|
236
|
+
libs = dependencies.map { |name, version| "#{name}-#{version}" }.join(', ')
|
237
|
+
|
238
|
+
spec.post_install_message = <<-EOS
|
239
|
+
Nokogiri is built with the packaged libraries: #{libs}.
|
240
|
+
EOS
|
241
|
+
spec.files.reject! { |path| File.fnmatch?('ports/*', path) }
|
242
|
+
end
|
140
243
|
end
|
141
244
|
end
|
142
245
|
end
|
@@ -193,9 +296,9 @@ task :java_debug do
|
|
193
296
|
end
|
194
297
|
|
195
298
|
if java?
|
196
|
-
task :
|
197
|
-
task :
|
198
|
-
ENV['JRUBY_OPTS'] = "--
|
299
|
+
task :test_19 => :test
|
300
|
+
task :test_20 do
|
301
|
+
ENV['JRUBY_OPTS'] = "--2.0"
|
199
302
|
Rake::Task["test"].invoke
|
200
303
|
end
|
201
304
|
end
|
@@ -212,37 +315,37 @@ end
|
|
212
315
|
|
213
316
|
# ----------------------------------------
|
214
317
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
318
|
+
def verify_dll(dll, cross_ruby)
|
319
|
+
dll_imports = cross_ruby.dlls
|
320
|
+
dump = `#{['env', 'LANG=C', cross_ruby.tool('objdump'), '-p', dll].shelljoin}`
|
321
|
+
raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target)}\s/ === dump
|
322
|
+
raise "export function Init_nokogiri not in dll #{dll}" unless /Table.*\sInit_nokogiri\s/mi === dump
|
323
|
+
|
324
|
+
# Verify that the expected DLL dependencies match the actual dependencies
|
325
|
+
# and that no further dependencies exist.
|
326
|
+
dll_imports_is = dump.scan(/DLL Name: (.*)$/).map(&:first).map(&:downcase).uniq
|
327
|
+
if dll_imports_is.sort != dll_imports.sort
|
328
|
+
raise "unexpected dll imports #{dll_imports_is.inspect} in #{dll}"
|
329
|
+
end
|
330
|
+
puts "#{dll}: Looks good!"
|
331
|
+
end
|
220
332
|
|
333
|
+
task :cross do
|
334
|
+
rake_compiler_config_path = File.expand_path("~/.rake-compiler/config.yml")
|
221
335
|
unless File.exists? rake_compiler_config_path
|
222
|
-
raise "rake-compiler has not installed any cross rubies.
|
223
|
-
end
|
224
|
-
rake_compiler_config = YAML.load_file(rake_compiler_config_path)
|
225
|
-
|
226
|
-
# check that rake-compiler config contains the right patchlevels. see #279 for background,
|
227
|
-
# and http://blog.mmediasys.com/2011/01/22/rake-compiler-updated-list-of-supported-ruby-versions-for-cross-compilation/
|
228
|
-
# for more up-to-date docs.
|
229
|
-
cross_rubies.each do |version|
|
230
|
-
majmin, patchlevel = version.split("-")
|
231
|
-
rbconfig = "rbconfig-#{majmin}"
|
232
|
-
unless rake_compiler_config.key?(rbconfig) && rake_compiler_config[rbconfig] =~ /-#{patchlevel}/
|
233
|
-
raise "rake-compiler '#{rbconfig}' not #{patchlevel}. try running 'env --unset=HOST rake-compiler cross-ruby VERSION=#{version}'"
|
234
|
-
end
|
336
|
+
raise "rake-compiler has not installed any cross rubies. Try using rake-compiler-dev-box for building binary windows gems.'"
|
235
337
|
end
|
236
338
|
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
pkg_config_path = %w[libxslt libxml2].collect { |pkg| File.join($recipes[pkg].path, "lib/pkgconfig") }.join(":")
|
245
|
-
sh("env PKG_CONFIG_PATH=#{pkg_config_path} RUBY_CC_VERSION=#{ruby_cc_version} rake cross native gem") || raise("build failed!")
|
339
|
+
CROSS_RUBIES.each do |cross_ruby|
|
340
|
+
task "tmp/#{cross_ruby.platform}/nokogiri/#{cross_ruby.ver}/nokogiri.so" do |t|
|
341
|
+
# To reduce the gem file size strip mingw32 dlls before packaging
|
342
|
+
sh [cross_ruby.tool('strip'), '-S', t.name].shelljoin
|
343
|
+
verify_dll t.name, cross_ruby
|
344
|
+
end
|
345
|
+
end
|
246
346
|
end
|
247
347
|
|
348
|
+
desc "build a windows gem without all the ceremony."
|
349
|
+
task "gem:windows" => %w[cross native gem]
|
350
|
+
|
248
351
|
# vim: syntax=Ruby
|
data/build_all
CHANGED
@@ -2,14 +2,19 @@
|
|
2
2
|
#
|
3
3
|
# script to build gems for all relevant platforms:
|
4
4
|
# - MRI et al (standard gem)
|
5
|
-
# - windows (x86-mingw32 and
|
5
|
+
# - windows (x86-mingw32 and x64-mingw32)
|
6
6
|
# - jruby
|
7
7
|
#
|
8
8
|
# here's what I recommend for building all the gems:
|
9
9
|
#
|
10
|
-
#
|
10
|
+
# set up a rake-compiler-dev-box as described here:
|
11
|
+
# https://github.com/tjschuck/rake-compiler-dev-box
|
12
|
+
# It is prepared with all the necessary build tools and environments.
|
13
|
+
#
|
14
|
+
# or alternatively do:
|
15
|
+
# 1. Setup a ubuntu 12.04+ machine
|
11
16
|
# 2. install rvm, and install 1.9.3, 2.0.0 and jruby.
|
12
|
-
# 3. `sudo apt-get install mingw32`
|
17
|
+
# 3. `sudo apt-get install mingw32 gcc-mingw-w64-i686 gcc-mingw-w64-x86-64`
|
13
18
|
#
|
14
19
|
# as you build, you may run into these problems:
|
15
20
|
#
|
@@ -34,6 +39,8 @@
|
|
34
39
|
# RUBY_ENGINE (just comment it out)
|
35
40
|
#
|
36
41
|
|
42
|
+
DEFAULT_RUBY=2.0.0
|
43
|
+
|
37
44
|
HOST=
|
38
45
|
|
39
46
|
# Load RVM into a shell session *as a function*
|
@@ -45,16 +52,37 @@ else
|
|
45
52
|
echo "ERROR: An RVM installation was not found.\n"
|
46
53
|
fi
|
47
54
|
|
48
|
-
|
55
|
+
rvm_use () {
|
49
56
|
current_ruby=$1
|
50
57
|
rvm use "${1}@nokogiri" --create || rvm -v
|
51
58
|
}
|
52
59
|
|
60
|
+
rvm_do () {
|
61
|
+
local ver=$1
|
62
|
+
shift
|
63
|
+
rvm "${ver}@nokogiri" do "$@"
|
64
|
+
}
|
65
|
+
|
66
|
+
cross_rubies () {
|
67
|
+
grep -v '#' .cross_rubies
|
68
|
+
}
|
69
|
+
|
70
|
+
ruby_vers () {
|
71
|
+
cross_rubies | while read -r line; do
|
72
|
+
echo "${line%%[-:]*}"
|
73
|
+
done | uniq
|
74
|
+
}
|
75
|
+
|
53
76
|
set -o errexit
|
54
77
|
|
55
|
-
|
56
|
-
rvm_use
|
57
|
-
|
78
|
+
for ver in `ruby_vers`; do
|
79
|
+
rvm_use $ver
|
80
|
+
gem install bundler --conservative
|
81
|
+
bundle install --quiet --local || bundle install
|
82
|
+
done
|
83
|
+
|
84
|
+
rvm_use $DEFAULT_RUBY
|
85
|
+
|
58
86
|
rm -rf tmp pkg
|
59
87
|
bundle exec rake clean
|
60
88
|
|
@@ -63,42 +91,39 @@ rm -rf gems
|
|
63
91
|
mkdir -p gems
|
64
92
|
|
65
93
|
# windows
|
66
|
-
platform=$(uname -i)
|
67
|
-
if [[ $platform =~ "64" ]] ; then
|
68
|
-
echo ""
|
69
|
-
echo "ERROR: You need to build the windows gem on a 32-bit machine!"
|
70
|
-
echo ""
|
71
|
-
exit 1
|
72
|
-
fi
|
73
|
-
rvm_use 1.8.7
|
74
|
-
if [[ ! -a ${HOME}/.rake-compiler/ruby/ruby-1.8.7-p358/lib/ruby/1.8.7/x86_64-linux/rbconfig.rb ]] ; then
|
75
94
|
|
76
|
-
|
77
|
-
|
78
|
-
|
95
|
+
for verspec in `cross_rubies`; do
|
96
|
+
version="${verspec%%:*}"
|
97
|
+
ver="${version%%-*}"
|
98
|
+
host="${verspec#*:}"
|
99
|
+
|
100
|
+
case $ver in
|
101
|
+
1.9.3)
|
102
|
+
# Parallel make does not work in 1.9.3, as it has a
|
103
|
+
# missing dependency problem with main.o.
|
104
|
+
make="make"
|
105
|
+
;;
|
106
|
+
*)
|
107
|
+
make="$MAKE"
|
108
|
+
esac
|
109
|
+
|
110
|
+
MAKE="$make" rvm_do $ver rake-compiler cross-ruby VERSION=$version HOST=$host debugflags="-g"
|
111
|
+
done
|
79
112
|
|
80
|
-
bundle exec rake-compiler cross-ruby VERSION=1.8.7-p358 # HOST=i386-mingw32
|
81
|
-
fi
|
82
|
-
if [[ ! -a ${HOME}/.rake-compiler/ruby/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb ]] ; then
|
83
|
-
bundle exec rake-compiler cross-ruby VERSION=1.9.3-p194
|
84
|
-
fi
|
85
|
-
if [[ ! -a ${HOME}/.rake-compiler/ruby/ruby-2.0.0-p0/lib/ruby/2.0.0/x86_64-linux/rbconfig.rb ]] ; then
|
86
|
-
bundle exec rake-compiler cross-ruby VERSION=2.0.0-p0
|
87
|
-
fi
|
88
|
-
bundle exec rake cross
|
89
113
|
bundle exec rake gem:windows
|
90
|
-
cp -v pkg/nokogiri*x86-
|
114
|
+
cp -v pkg/nokogiri*{x86,x64}-mingw32*.gem gems
|
91
115
|
|
92
116
|
# MRI
|
93
|
-
|
117
|
+
bundle exec rake clean
|
94
118
|
bundle exec rake gem
|
95
119
|
cp -v pkg/nokogiri*.gem gems # should only be one at this point in the script
|
96
120
|
|
97
121
|
# jruby
|
98
122
|
rvm_use jruby
|
123
|
+
gem install bundler --conservative
|
99
124
|
bundle install --quiet --local || bundle install
|
100
125
|
bundle exec rake clean clobber
|
101
|
-
rvm_use
|
126
|
+
rvm_use $DEFAULT_RUBY
|
102
127
|
bundle exec rake generate
|
103
128
|
rvm_use jruby
|
104
129
|
bundle exec rake gem
|