rake-compiler-dock 1.0.1 → 1.2.1
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/ci.yml +168 -0
- data/.gitignore +11 -1
- data/Dockerfile.jruby +7 -6
- data/Dockerfile.mri.erb +170 -73
- data/History.md +42 -0
- data/README.md +95 -36
- data/Rakefile +45 -10
- data/build/math_h.patch +189 -0
- data/build/parallel_docker_build.rb +7 -3
- data/build/patches/{ruby-2.5.7 → ruby-2.5.9}/no_sendfile.patch +0 -0
- data/build/patches/{ruby-2.7.0 → ruby-3.1.0}/no_sendfile.patch +6 -6
- data/build/patches2/rake-compiler-1.1.6/0004-Enable-build-of-static-libruby.patch +28 -0
- data/build/rcd-env.sh +6 -0
- data/build/runas +1 -8
- data/build/sudoers +1 -1
- data/lib/rake_compiler_dock/starter.rb +3 -2
- data/lib/rake_compiler_dock/version.rb +2 -2
- data/mingw64-ucrt/Dockerfile +62 -0
- data/mingw64-ucrt/binutils-mingw-w64-ignore-check-errors.patch +13 -0
- data/mingw64-ucrt/gcc-mingw-w64-only-c-c++.patch +13 -0
- data/mingw64-ucrt/mingw-w64-enable-ucrt.patch +22 -0
- data/rake-compiler-dock.gemspec +2 -2
- data/test/env/Dockerfile.alpine +17 -0
- data/test/env/Dockerfile.centos +22 -0
- data/test/env/Dockerfile.debian +24 -0
- data/test/rcd_test/Gemfile +11 -0
- data/test/rcd_test/Rakefile +75 -0
- data/test/rcd_test/ext/java/RcdTestExtService.java +19 -0
- data/test/rcd_test/ext/java/RubyRcdTest.java +16 -0
- data/test/rcd_test/ext/mri/extconf.rb +23 -0
- data/test/rcd_test/ext/mri/rcd_test_ext.c +51 -0
- data/test/rcd_test/ext/mri/rcd_test_ext.h +6 -0
- data/test/rcd_test/lib/rcd_test.rb +6 -0
- data/test/rcd_test/rcd_test.gemspec +27 -0
- data/test/rcd_test/test/test_basic.rb +31 -0
- data/test/test_environment_variables.rb +56 -31
- data/test/test_parallel_docker_build.rb +19 -6
- data.tar.gz.sig +0 -0
- metadata +79 -19
- metadata.gz.sig +0 -0
- data/build/patches2/hoe-3.20.0/0001-Load-encrypted-private-key-using-ENV-GEM_PRIVATE_KEY.patch +0 -32
- data/build/patches2/rake-compiler-1.1.0/0001-Allow-parallel-builds-of-cross-rubies.patch +0 -119
- data/build/patches2/rake-compiler-1.1.0/0001-Enable-build-of-static-libruby.patch +0 -28
- data/build/patches2/rake-compiler-1.1.0/0001-Fix-determining-of-ruby-versions-in-rake-native-gem.patch +0 -44
- data/build/patches2/rake-compiler-1.1.0/0002-Extend-mingw-search-pattern-to-find-x86_64-gcc.patch +0 -26
- data/build/patches2/rake-compiler-1.1.0/0002-Strip-cross-built-shared-library-files-while-linking.patch +0 -29
- data/build/patches2/ruby-2.7.0/ruby2_keywords.patch +0 -15
metadata
CHANGED
@@ -1,43 +1,76 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-compiler-dock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lars Kanis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIETTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
|
14
|
+
L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yMjAyMTQxMzMwNTZaFw0yMzAy
|
15
|
+
MTQxMzMwNTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
|
16
|
+
PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
|
17
|
+
mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
|
18
|
+
eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
|
19
|
+
8nBMvR0mHo77kIkapHc26UzVq/G0nKLfDsIHXVylto3PjzOumjG6GhmFN4r3cP6e
|
20
|
+
SDfl1FSeRYVpt4kmQULz/zdSaOH3AjAq7PM2Z91iGwQvoUXMANH2v89OWjQO/NHe
|
21
|
+
JMNDFsmHK/6Ji4Kk48Z3TyscHQnipAID5GhS1oD21/WePdj7GhmbF5gBzkV5uepd
|
22
|
+
eJQPgWGwrQW/Z2oPjRuJrRofzWfrMWqbOahj9uth6WSxhNexUtbjk6P8emmXOJi5
|
23
|
+
chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
|
24
|
+
9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjgYEwfzAJ
|
25
|
+
BgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUOIdbSMr3VFrTCO9/cTM0
|
26
|
+
0exHzBcwIgYDVR0RBBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwIgYDVR0S
|
27
|
+
BBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwDQYJKoZIhvcNAQELBQADggGB
|
28
|
+
AFWP7F/y3Oq3NgrqUOnjKOeDaBa7AqNhHS+PZg+C90lnJzMgOs4KKgZYxqSQVSab
|
29
|
+
SCEmzIO/StkXY4NpJ4fYLrHemf/fJy1wPyu+fNdp5SEEUwEo+2toRFlzTe4u4LdS
|
30
|
+
QC636nPPTMt8H3xz2wf/lUIUeo2Qc95Qt2BQM465ibbG9kmA3c7Sopx6yOabYOAl
|
31
|
+
KPRbOSEPiWYcF9Suuz8Gdf8jxEtPlnZiwRvnYJ+IHMq3XQCJWPpMzdDMbtlgHbXE
|
32
|
+
vq1zOTLMSYAS0UB3uionR4yo1hLz60odwkCm7qf0o2Ci/5OjtB0a89VuyqRU2vUJ
|
33
|
+
QH95WBjDJ6lCCW7J0mrMPnJQSUFTmufsU6jOChvPaCeAzW1YwrsP/YKnvwueG7ip
|
34
|
+
VOdW6RitjtFxhS7evRL0201+KUvLz12zZWWjOcujlQs64QprxOtiv/MiisKb1Ng+
|
35
|
+
oL1mUdzB8KrZL4/WbG5YNX6UTtJbIOu9qEFbBAy4/jtIkJX+dlNoFwd4GXQW1YNO
|
36
|
+
nA==
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
39
|
dependencies:
|
13
40
|
- !ruby/object:Gem::Dependency
|
14
41
|
name: bundler
|
15
42
|
requirement: !ruby/object:Gem::Requirement
|
16
43
|
requirements:
|
17
|
-
- - "
|
44
|
+
- - ">="
|
18
45
|
- !ruby/object:Gem::Version
|
19
46
|
version: '1.7'
|
47
|
+
- - "<"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.0'
|
20
50
|
type: :development
|
21
51
|
prerelease: false
|
22
52
|
version_requirements: !ruby/object:Gem::Requirement
|
23
53
|
requirements:
|
24
|
-
- - "
|
54
|
+
- - ">="
|
25
55
|
- !ruby/object:Gem::Version
|
26
56
|
version: '1.7'
|
57
|
+
- - "<"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.0'
|
27
60
|
- !ruby/object:Gem::Dependency
|
28
61
|
name: rake
|
29
62
|
requirement: !ruby/object:Gem::Requirement
|
30
63
|
requirements:
|
31
|
-
- - "
|
64
|
+
- - ">="
|
32
65
|
- !ruby/object:Gem::Version
|
33
|
-
version: '12
|
66
|
+
version: '12'
|
34
67
|
type: :development
|
35
68
|
prerelease: false
|
36
69
|
version_requirements: !ruby/object:Gem::Requirement
|
37
70
|
requirements:
|
38
|
-
- - "
|
71
|
+
- - ">="
|
39
72
|
- !ruby/object:Gem::Version
|
40
|
-
version: '12
|
73
|
+
version: '12'
|
41
74
|
- !ruby/object:Gem::Dependency
|
42
75
|
name: test-unit
|
43
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,6 +95,7 @@ executables:
|
|
62
95
|
extensions: []
|
63
96
|
extra_rdoc_files: []
|
64
97
|
files:
|
98
|
+
- ".github/workflows/ci.yml"
|
65
99
|
- ".gitignore"
|
66
100
|
- Dockerfile.jruby
|
67
101
|
- Dockerfile.mri.erb
|
@@ -72,17 +106,13 @@ files:
|
|
72
106
|
- Rakefile
|
73
107
|
- bin/rake-compiler-dock
|
74
108
|
- build/gem_helper.rb
|
109
|
+
- build/math_h.patch
|
75
110
|
- build/mk_i686.rb
|
76
111
|
- build/parallel_docker_build.rb
|
77
|
-
- build/patches/ruby-2.5.
|
78
|
-
- build/patches/ruby-
|
79
|
-
- build/patches2/
|
80
|
-
- build/
|
81
|
-
- build/patches2/rake-compiler-1.1.0/0001-Enable-build-of-static-libruby.patch
|
82
|
-
- build/patches2/rake-compiler-1.1.0/0001-Fix-determining-of-ruby-versions-in-rake-native-gem.patch
|
83
|
-
- build/patches2/rake-compiler-1.1.0/0002-Extend-mingw-search-pattern-to-find-x86_64-gcc.patch
|
84
|
-
- build/patches2/rake-compiler-1.1.0/0002-Strip-cross-built-shared-library-files-while-linking.patch
|
85
|
-
- build/patches2/ruby-2.7.0/ruby2_keywords.patch
|
112
|
+
- build/patches/ruby-2.5.9/no_sendfile.patch
|
113
|
+
- build/patches/ruby-3.1.0/no_sendfile.patch
|
114
|
+
- build/patches2/rake-compiler-1.1.6/0004-Enable-build-of-static-libruby.patch
|
115
|
+
- build/rcd-env.sh
|
86
116
|
- build/runas
|
87
117
|
- build/sigfw.c
|
88
118
|
- build/strip_wrapper
|
@@ -93,7 +123,24 @@ files:
|
|
93
123
|
- lib/rake_compiler_dock/predefined_user_group.rb
|
94
124
|
- lib/rake_compiler_dock/starter.rb
|
95
125
|
- lib/rake_compiler_dock/version.rb
|
126
|
+
- mingw64-ucrt/Dockerfile
|
127
|
+
- mingw64-ucrt/binutils-mingw-w64-ignore-check-errors.patch
|
128
|
+
- mingw64-ucrt/gcc-mingw-w64-only-c-c++.patch
|
129
|
+
- mingw64-ucrt/mingw-w64-enable-ucrt.patch
|
96
130
|
- rake-compiler-dock.gemspec
|
131
|
+
- test/env/Dockerfile.alpine
|
132
|
+
- test/env/Dockerfile.centos
|
133
|
+
- test/env/Dockerfile.debian
|
134
|
+
- test/rcd_test/Gemfile
|
135
|
+
- test/rcd_test/Rakefile
|
136
|
+
- test/rcd_test/ext/java/RcdTestExtService.java
|
137
|
+
- test/rcd_test/ext/java/RubyRcdTest.java
|
138
|
+
- test/rcd_test/ext/mri/extconf.rb
|
139
|
+
- test/rcd_test/ext/mri/rcd_test_ext.c
|
140
|
+
- test/rcd_test/ext/mri/rcd_test_ext.h
|
141
|
+
- test/rcd_test/lib/rcd_test.rb
|
142
|
+
- test/rcd_test/rcd_test.gemspec
|
143
|
+
- test/rcd_test/test/test_basic.rb
|
97
144
|
- test/test_environment_variables.rb
|
98
145
|
- test/test_parallel_docker_build.rb
|
99
146
|
- test/test_starter.rb
|
@@ -116,12 +163,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
163
|
- !ruby/object:Gem::Version
|
117
164
|
version: '0'
|
118
165
|
requirements: []
|
119
|
-
rubygems_version: 3.
|
166
|
+
rubygems_version: 3.2.22
|
120
167
|
signing_key:
|
121
168
|
specification_version: 4
|
122
169
|
summary: Easy to use and reliable cross compiler environment for building Windows
|
123
170
|
and Linux binary gems.
|
124
171
|
test_files:
|
172
|
+
- test/env/Dockerfile.alpine
|
173
|
+
- test/env/Dockerfile.centos
|
174
|
+
- test/env/Dockerfile.debian
|
175
|
+
- test/rcd_test/Gemfile
|
176
|
+
- test/rcd_test/Rakefile
|
177
|
+
- test/rcd_test/ext/java/RcdTestExtService.java
|
178
|
+
- test/rcd_test/ext/java/RubyRcdTest.java
|
179
|
+
- test/rcd_test/ext/mri/extconf.rb
|
180
|
+
- test/rcd_test/ext/mri/rcd_test_ext.c
|
181
|
+
- test/rcd_test/ext/mri/rcd_test_ext.h
|
182
|
+
- test/rcd_test/lib/rcd_test.rb
|
183
|
+
- test/rcd_test/rcd_test.gemspec
|
184
|
+
- test/rcd_test/test/test_basic.rb
|
125
185
|
- test/test_environment_variables.rb
|
126
186
|
- test/test_parallel_docker_build.rb
|
127
187
|
- test/test_starter.rb
|
metadata.gz.sig
ADDED
Binary file
|
data/build/patches2/hoe-3.20.0/0001-Load-encrypted-private-key-using-ENV-GEM_PRIVATE_KEY.patch
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
From ecc5669223457ceaba6bd94c2947ae99ddfa8f10 Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Fri, 27 Dec 2019 15:57:07 +0100
|
4
|
-
Subject: [PATCH] Load encrypted private key using
|
5
|
-
ENV['GEM_PRIVATE_KEY_PASSPHRASE'] as passphrase.
|
6
|
-
|
7
|
-
This way the password can be avoided to be entered several times when building multiple gems.
|
8
|
-
It also allows parallel builds which are incompatible to interactive password prompts.
|
9
|
-
|
10
|
-
The same feature has been implemented in rubygems:
|
11
|
-
https://github.com/rubygems/rubygems/commit/c1a114396fcec124d3feabf74708b4bdec02eac3
|
12
|
-
---
|
13
|
-
lib/hoe/signing.rb | 3 ++-
|
14
|
-
1 file changed, 2 insertions(+), 1 deletion(-)
|
15
|
-
|
16
|
-
diff --git a/lib/hoe/signing.rb b/lib/hoe/signing.rb
|
17
|
-
index 4833c55..11c8c2f 100644
|
18
|
-
--- a/lib/hoe/signing.rb
|
19
|
-
+++ b/lib/hoe/signing.rb
|
20
|
-
@@ -70,7 +70,8 @@ module Hoe::Signing
|
21
|
-
end
|
22
|
-
|
23
|
-
if signing_key and cert_chain then
|
24
|
-
- spec.signing_key = OpenSSL::PKey::RSA.new File.read signing_key
|
25
|
-
+ passphrase = ENV['GEM_PRIVATE_KEY_PASSPHRASE']
|
26
|
-
+ spec.signing_key = OpenSSL::PKey::RSA.new(File.read(signing_key), passphrase)
|
27
|
-
spec.cert_chain = cert_chain
|
28
|
-
end
|
29
|
-
end
|
30
|
-
--
|
31
|
-
2.20.1
|
32
|
-
|
@@ -1,119 +0,0 @@
|
|
1
|
-
From e0be66410b32a41591d27c34e2163ed587ae427b Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Sun, 22 Dec 2019 21:37:07 +0100
|
4
|
-
Subject: [PATCH] Allow parallel builds of cross rubies
|
5
|
-
|
6
|
-
Download and extraction of sources can not run in parallel, since the sources are used for multiple targets.
|
7
|
-
Therefore this part can now be separately executed by
|
8
|
-
rake-compiler prepare-sources RUBY_CC_VERSION=...
|
9
|
-
|
10
|
-
Afterwards multiple cross rubies can be built in parallel by
|
11
|
-
rake-compiler cross-ruby RUBY_CC_VERSION=... HOST=...
|
12
|
-
|
13
|
-
Access to config.yml must be synchronized, when running in parallel, which is done per File#flock .
|
14
|
-
---
|
15
|
-
lib/rake/extensiontask.rb | 5 +++-
|
16
|
-
tasks/bin/cross-ruby.rake | 56 +++++++++++++++++++++------------------
|
17
|
-
2 files changed, 34 insertions(+), 27 deletions(-)
|
18
|
-
|
19
|
-
diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb
|
20
|
-
index d85b1a3..89f2198 100644
|
21
|
-
--- a/lib/rake/extensiontask.rb
|
22
|
-
+++ b/lib/rake/extensiontask.rb
|
23
|
-
@@ -376,7 +376,10 @@ Java extension should be preferred.
|
24
|
-
return
|
25
|
-
end
|
26
|
-
|
27
|
-
- config_file = YAML.load_file(config_path)
|
28
|
-
+ config_file = File.open(config_path) do |fd|
|
29
|
-
+ fd.flock(File::LOCK_SH)
|
30
|
-
+ YAML.load(fd.read)
|
31
|
-
+ end
|
32
|
-
|
33
|
-
# tmp_path
|
34
|
-
tmp_path = "#{@tmp_dir}/#{for_platform}/#{@name}/#{ruby_ver}"
|
35
|
-
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
|
36
|
-
index 37dd220..3fcfe1d 100644
|
37
|
-
--- a/tasks/bin/cross-ruby.rake
|
38
|
-
+++ b/tasks/bin/cross-ruby.rake
|
39
|
-
@@ -126,6 +126,8 @@ file makefile_in => [makefile_in_bak] do |t|
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
+task "prepare-sources" => makefile_in
|
44
|
-
+
|
45
|
-
task :mingw32 do
|
46
|
-
unless MINGW_HOST then
|
47
|
-
warn "You need to install mingw32 cross compile functionality to be able to continue."
|
48
|
-
@@ -174,40 +176,42 @@ task :install => ["#{USER_HOME}/ruby/#{MINGW_HOST}/#{RUBY_CC_VERSION}/bin/ruby.e
|
49
|
-
desc "Update rake-compiler list of installed Ruby versions"
|
50
|
-
task 'update-config' do
|
51
|
-
config_file = "#{USER_HOME}/config.yml"
|
52
|
-
- if File.exist?(config_file) then
|
53
|
-
- puts "Updating #{config_file}"
|
54
|
-
- config = YAML.load_file(config_file)
|
55
|
-
- else
|
56
|
-
- puts "Generating #{config_file}"
|
57
|
-
- config = {}
|
58
|
-
- end
|
59
|
-
+ File.open(config_file, File::RDWR|File::CREAT) do |config_fd|
|
60
|
-
+ config_fd.flock(File::LOCK_EX)
|
61
|
-
+ config = YAML.load(config_fd.read)
|
62
|
-
+ if config
|
63
|
-
+ puts "Updating #{config_file}"
|
64
|
-
+ else
|
65
|
-
+ puts "Generating #{config_file}"
|
66
|
-
+ config = {}
|
67
|
-
+ end
|
68
|
-
|
69
|
-
- files = Dir.glob("#{USER_HOME}/ruby/*/*/**/rbconfig.rb").sort
|
70
|
-
+ files = Dir.glob("#{USER_HOME}/ruby/*/*/**/rbconfig.rb").sort
|
71
|
-
|
72
|
-
- files.each do |rbconfig|
|
73
|
-
- version, platform = rbconfig.match(/.*-(\d.\d.\d).*\/([-\w]+)\/rbconfig/)[1,2]
|
74
|
-
- platforms = [platform]
|
75
|
-
+ files.each do |rbconfig|
|
76
|
-
+ version, platform = rbconfig.match(/.*-(\d.\d.\d).*\/([-\w]+)\/rbconfig/)[1,2]
|
77
|
-
+ platforms = [platform]
|
78
|
-
|
79
|
-
- # fake alternate (binary compatible) i386-mswin32-60 platform
|
80
|
-
- platform == "i386-mingw32" and
|
81
|
-
- platforms.push "i386-mswin32-60"
|
82
|
-
+ # fake alternate (binary compatible) i386-mswin32-60 platform
|
83
|
-
+ platform == "i386-mingw32" and
|
84
|
-
+ platforms.push "i386-mswin32-60"
|
85
|
-
|
86
|
-
- platforms.each do |plat|
|
87
|
-
- config["rbconfig-#{plat}-#{version}"] = rbconfig
|
88
|
-
+ platforms.each do |plat|
|
89
|
-
+ config["rbconfig-#{plat}-#{version}"] = rbconfig
|
90
|
-
|
91
|
-
- # also store RubyGems-compatible version
|
92
|
-
- gem_platform = Gem::Platform.new(plat)
|
93
|
-
- config["rbconfig-#{gem_platform}-#{version}"] = rbconfig
|
94
|
-
+ # also store RubyGems-compatible version
|
95
|
-
+ gem_platform = Gem::Platform.new(plat)
|
96
|
-
+ config["rbconfig-#{gem_platform}-#{version}"] = rbconfig
|
97
|
-
+ end
|
98
|
-
+
|
99
|
-
+ puts "Found Ruby version #{version} for platform #{platform} (#{rbconfig})"
|
100
|
-
end
|
101
|
-
|
102
|
-
- puts "Found Ruby version #{version} for platform #{platform} (#{rbconfig})"
|
103
|
-
+ when_writing("Saving changes into #{config_file}") {
|
104
|
-
+ config_fd.rewind
|
105
|
-
+ config_fd.puts config.to_yaml
|
106
|
-
+ }
|
107
|
-
end
|
108
|
-
-
|
109
|
-
- when_writing("Saving changes into #{config_file}") {
|
110
|
-
- File.open(config_file, 'w') do |f|
|
111
|
-
- f.puts config.to_yaml
|
112
|
-
- end
|
113
|
-
- }
|
114
|
-
end
|
115
|
-
|
116
|
-
task :default do
|
117
|
-
--
|
118
|
-
2.20.1
|
119
|
-
|
@@ -1,28 +0,0 @@
|
|
1
|
-
From 0b929b7027eb592c0971a400184f1dfa5a0bce7c Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Thu, 26 Dec 2019 19:13:48 +0100
|
4
|
-
Subject: [PATCH 1/2] Enable build of static libruby
|
5
|
-
|
6
|
-
This is used in rake-compiler-dock for linux targets.
|
7
|
-
The static libruby is postprocessed in a special way.
|
8
|
-
See rake-compiler-dock's Dockerfile.
|
9
|
-
---
|
10
|
-
tasks/bin/cross-ruby.rake | 2 ++
|
11
|
-
1 file changed, 2 insertions(+)
|
12
|
-
|
13
|
-
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
|
14
|
-
index c9b0bbb..2a73be7 100644
|
15
|
-
--- a/tasks/bin/cross-ruby.rake
|
16
|
-
+++ b/tasks/bin/cross-ruby.rake
|
17
|
-
@@ -108,6 +108,8 @@ end
|
18
|
-
file "#{build_dir}/Makefile" => [build_dir, makefile_in] do |t|
|
19
|
-
|
20
|
-
options = [
|
21
|
-
+ '--enable-static',
|
22
|
-
+ '--enable-install-static-library',
|
23
|
-
"--host=#{MINGW_HOST}",
|
24
|
-
"--target=#{MINGW_TARGET}",
|
25
|
-
"--build=#{RUBY_BUILD}",
|
26
|
-
--
|
27
|
-
2.20.1
|
28
|
-
|
@@ -1,44 +0,0 @@
|
|
1
|
-
From 365843bfe0bfc3f1c1b11e81e24ac7b6c7942bdf Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Fri, 27 Dec 2019 18:18:59 +0100
|
4
|
-
Subject: [PATCH] Fix determining of ruby versions in "rake native gem"
|
5
|
-
|
6
|
-
"rake native gem" without "cross" didn't set the ruby version constraint.
|
7
|
-
Instead it failed with NoMethodError like so:
|
8
|
-
|
9
|
-
/ffi $ rake native gem
|
10
|
-
no configuration section for specified version of Ruby (rbconfig-i386-mingw32-2.6.3)
|
11
|
-
no configuration section for specified version of Ruby (rbconfig-x64-mingw32-2.6.3)
|
12
|
-
install -c build/x86_64-linux/ffi_c/2.6.3/ffi_c.so lib/ffi_c.so
|
13
|
-
cp build/x86_64-linux/ffi_c/2.6.3/ffi_c.so build/x86_64-linux/stage/lib/ffi_c.so
|
14
|
-
rake aborted!
|
15
|
-
NoMethodError: undefined method `split' for nil:NilClass
|
16
|
-
/home/lars/.rvm/gems/ruby-2.6.3/gems/rake-compiler-1.0.9/lib/rake/extensiontask.rb:515:in `ruby_api_version'
|
17
|
-
/home/lars/.rvm/gems/ruby-2.6.3/gems/rake-compiler-1.0.9/lib/rake/extensiontask.rb:262:in `block in define_native_tasks'
|
18
|
-
/home/lars/.rvm/gems/ruby-2.6.3/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
|
19
|
-
/home/lars/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
|
20
|
-
/home/lars/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
|
21
|
-
Tasks: TOP => native => native:x86_64-linux => native:ffi:x86_64-linux
|
22
|
-
(See full trace by running task with --trace)
|
23
|
-
---
|
24
|
-
lib/rake/extensiontask.rb | 4 ++++
|
25
|
-
1 file changed, 4 insertions(+)
|
26
|
-
|
27
|
-
diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb
|
28
|
-
index d85b1a3..cb1ea12 100644
|
29
|
-
--- a/lib/rake/extensiontask.rb
|
30
|
-
+++ b/lib/rake/extensiontask.rb
|
31
|
-
@@ -242,6 +242,10 @@ Java extension should be preferred.
|
32
|
-
# lib_path
|
33
|
-
lib_path = lib_dir
|
34
|
-
|
35
|
-
+ # Update compiled platform/version combinations
|
36
|
-
+ ruby_versions = (@ruby_versions_per_platform[platf] ||= [])
|
37
|
-
+ ruby_versions << ruby_ver
|
38
|
-
+
|
39
|
-
# create 'native:gem_name' and chain it to 'native' task
|
40
|
-
unless Rake::Task.task_defined?("native:#{@gem_spec.name}:#{platf}")
|
41
|
-
task "native:#{@gem_spec.name}:#{platf}" do |t|
|
42
|
-
--
|
43
|
-
2.20.1
|
44
|
-
|
data/build/patches2/rake-compiler-1.1.0/0002-Extend-mingw-search-pattern-to-find-x86_64-gcc.patch
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
From 07b1a4909fa59324d309bb8a46867cacba97cafd Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Thu, 26 Dec 2019 18:31:25 +0100
|
4
|
-
Subject: [PATCH] Extend mingw search pattern to find x86_64 gcc
|
5
|
-
|
6
|
-
The previous pattern only recognized 32 bit compiler versions.
|
7
|
-
---
|
8
|
-
lib/rake/extensioncompiler.rb | 2 +-
|
9
|
-
1 file changed, 1 insertion(+), 1 deletion(-)
|
10
|
-
|
11
|
-
diff --git a/lib/rake/extensioncompiler.rb b/lib/rake/extensioncompiler.rb
|
12
|
-
index b3d336b..75f4694 100644
|
13
|
-
--- a/lib/rake/extensioncompiler.rb
|
14
|
-
+++ b/lib/rake/extensioncompiler.rb
|
15
|
-
@@ -37,7 +37,7 @@ module Rake
|
16
|
-
paths = ENV['PATH'].split(File::PATH_SEPARATOR)
|
17
|
-
|
18
|
-
# the pattern to look into (captures *nix and windows executables)
|
19
|
-
- pattern = "{mingw32-,i?86*mingw*}gcc{,.*}"
|
20
|
-
+ pattern = "{mingw32-,i?86*mingw*,x86*mingw*}gcc{,.*}"
|
21
|
-
|
22
|
-
@mingw_gcc_executable = paths.find do |path|
|
23
|
-
# cleanup paths before globbing
|
24
|
-
--
|
25
|
-
2.20.1
|
26
|
-
|
@@ -1,29 +0,0 @@
|
|
1
|
-
From 13e33405d4e51a52402e1e37e7e2df7f1f32892d Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Thu, 26 Dec 2019 19:18:02 +0100
|
4
|
-
Subject: [PATCH 2/2] Strip cross built shared library files while linking
|
5
|
-
|
6
|
-
The .so files of extensions are often stripped after compilation per task in a Rakefile.
|
7
|
-
However this can be omitted, if the cross ruby version is built with stripping enabled.
|
8
|
-
Stripping the files a second time doesn't make a difference then.
|
9
|
-
---
|
10
|
-
tasks/bin/cross-ruby.rake | 3 ++-
|
11
|
-
1 file changed, 2 insertions(+), 1 deletion(-)
|
12
|
-
|
13
|
-
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
|
14
|
-
index 2a73be7..a9eb16b 100644
|
15
|
-
--- a/tasks/bin/cross-ruby.rake
|
16
|
-
+++ b/tasks/bin/cross-ruby.rake
|
17
|
-
@@ -115,7 +115,8 @@ file "#{build_dir}/Makefile" => [build_dir, source_dir] do |t|
|
18
|
-
"--build=#{RUBY_BUILD}",
|
19
|
-
'--enable-shared',
|
20
|
-
'--disable-install-doc',
|
21
|
-
- '--with-ext='
|
22
|
-
+ '--with-ext=',
|
23
|
-
+ 'LDFLAGS=-pipe -s',
|
24
|
-
]
|
25
|
-
|
26
|
-
# Force Winsock2 for Ruby 1.8, 1.9 defaults to it
|
27
|
-
--
|
28
|
-
2.20.1
|
29
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
diff --git a/template/fake.rb.in b/template/fake.rb.in
|
2
|
-
index f1da719ecb..e0b649fb28 100644
|
3
|
-
--- a/template/fake.rb.in
|
4
|
-
+++ b/template/fake.rb.in
|
5
|
-
@@ -27,6 +27,10 @@ case "$0" in /*) r=-r"$0";; *) r=-r"./$0";; esac
|
6
|
-
exec $ruby "$r" "$@"
|
7
|
-
=end
|
8
|
-
=baseruby
|
9
|
-
+<% if RUBY_VERSION < "2.7" %>
|
10
|
-
+def ruby2_keywords(*)
|
11
|
-
+end
|
12
|
-
+<% end %>
|
13
|
-
class Object
|
14
|
-
remove_const :CROSS_COMPILING if defined?(CROSS_COMPILING)
|
15
|
-
CROSS_COMPILING = RUBY_PLATFORM
|