rake-compiler-dock 1.1.0 → 1.2.2
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 +240 -0
- data/.gitignore +11 -1
- data/Dockerfile.jruby +6 -5
- data/Dockerfile.mri.erb +91 -45
- data/History.md +34 -1
- data/README.md +92 -36
- data/Rakefile +39 -12
- data/build/math_h.patch +189 -0
- data/build/parallel_docker_build.rb +7 -3
- data/build/patches/{ruby-2.5.8 → ruby-2.5.9}/no_sendfile.patch +0 -0
- data/build/patches/{ruby-3.0.0 → ruby-3.1.0}/no_sendfile.patch +0 -0
- data/build/patches2/{rake-compiler-1.1.1 → rake-compiler-1.1.6}/0004-Enable-build-of-static-libruby.patch +3 -4
- data/build/rcd-env.sh +6 -0
- data/build/runas +1 -9
- 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 +76 -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 +29 -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 +75 -37
- metadata.gz.sig +2 -2
- 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.1/0001-Fix-determining-of-ruby-versions-in-rake-native-gem.patch +0 -44
- data/build/patches2/rake-compiler-1.1.1/0003-Allow-building-of-cross-rubies-in-parallel.patch +0 -214
- data/build/patches2/rake-compiler-1.1.1/0005-Don-t-mask-out-build-env-vars-for-cross-ruby.patch +0 -30
- data/build/patches2/rake-compiler-1.1.1/0006-Use-RAKE_EXTENSION_TASK_NO_NATIVE-env-var-as-the-def.patch +0 -26
- data/build/patches2/ruby-2.7.0/ruby2_keywords.patch +0 -15
- data/build/patches2/ruby-3.0.0/ruby2_keywords.patch +0 -15
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lars Kanis
|
@@ -10,55 +10,67 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
+
|
29
|
-
|
30
|
-
|
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==
|
31
37
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
38
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
33
39
|
dependencies:
|
34
40
|
- !ruby/object:Gem::Dependency
|
35
41
|
name: bundler
|
36
42
|
requirement: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
|
-
- - "
|
44
|
+
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
46
|
version: '1.7'
|
47
|
+
- - "<"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.0'
|
41
50
|
type: :development
|
42
51
|
prerelease: false
|
43
52
|
version_requirements: !ruby/object:Gem::Requirement
|
44
53
|
requirements:
|
45
|
-
- - "
|
54
|
+
- - ">="
|
46
55
|
- !ruby/object:Gem::Version
|
47
56
|
version: '1.7'
|
57
|
+
- - "<"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.0'
|
48
60
|
- !ruby/object:Gem::Dependency
|
49
61
|
name: rake
|
50
62
|
requirement: !ruby/object:Gem::Requirement
|
51
63
|
requirements:
|
52
|
-
- - "
|
64
|
+
- - ">="
|
53
65
|
- !ruby/object:Gem::Version
|
54
|
-
version: '12
|
66
|
+
version: '12'
|
55
67
|
type: :development
|
56
68
|
prerelease: false
|
57
69
|
version_requirements: !ruby/object:Gem::Requirement
|
58
70
|
requirements:
|
59
|
-
- - "
|
71
|
+
- - ">="
|
60
72
|
- !ruby/object:Gem::Version
|
61
|
-
version: '12
|
73
|
+
version: '12'
|
62
74
|
- !ruby/object:Gem::Dependency
|
63
75
|
name: test-unit
|
64
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,6 +95,7 @@ executables:
|
|
83
95
|
extensions: []
|
84
96
|
extra_rdoc_files: []
|
85
97
|
files:
|
98
|
+
- ".github/workflows/ci.yml"
|
86
99
|
- ".gitignore"
|
87
100
|
- Dockerfile.jruby
|
88
101
|
- Dockerfile.mri.erb
|
@@ -93,18 +106,13 @@ files:
|
|
93
106
|
- Rakefile
|
94
107
|
- bin/rake-compiler-dock
|
95
108
|
- build/gem_helper.rb
|
109
|
+
- build/math_h.patch
|
96
110
|
- build/mk_i686.rb
|
97
111
|
- build/parallel_docker_build.rb
|
98
|
-
- build/patches/ruby-2.5.
|
99
|
-
- build/patches/ruby-3.
|
100
|
-
- build/patches2/
|
101
|
-
- build/
|
102
|
-
- build/patches2/rake-compiler-1.1.1/0003-Allow-building-of-cross-rubies-in-parallel.patch
|
103
|
-
- build/patches2/rake-compiler-1.1.1/0004-Enable-build-of-static-libruby.patch
|
104
|
-
- build/patches2/rake-compiler-1.1.1/0005-Don-t-mask-out-build-env-vars-for-cross-ruby.patch
|
105
|
-
- build/patches2/rake-compiler-1.1.1/0006-Use-RAKE_EXTENSION_TASK_NO_NATIVE-env-var-as-the-def.patch
|
106
|
-
- build/patches2/ruby-2.7.0/ruby2_keywords.patch
|
107
|
-
- build/patches2/ruby-3.0.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
|
108
116
|
- build/runas
|
109
117
|
- build/sigfw.c
|
110
118
|
- build/strip_wrapper
|
@@ -115,7 +123,24 @@ files:
|
|
115
123
|
- lib/rake_compiler_dock/predefined_user_group.rb
|
116
124
|
- lib/rake_compiler_dock/starter.rb
|
117
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
|
118
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
|
119
144
|
- test/test_environment_variables.rb
|
120
145
|
- test/test_parallel_docker_build.rb
|
121
146
|
- test/test_starter.rb
|
@@ -138,12 +163,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
163
|
- !ruby/object:Gem::Version
|
139
164
|
version: '0'
|
140
165
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
166
|
+
rubygems_version: 3.2.22
|
142
167
|
signing_key:
|
143
168
|
specification_version: 4
|
144
169
|
summary: Easy to use and reliable cross compiler environment for building Windows
|
145
170
|
and Linux binary gems.
|
146
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
|
147
185
|
- test/test_environment_variables.rb
|
148
186
|
- test/test_parallel_docker_build.rb
|
149
187
|
- test/test_starter.rb
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
,1o�0����o����ɂl��4.y��ƖǙ^(���/�F^P�A��F��"M2��0����3O�tY��?��AYͨ\:L�4��M�QZͩY&~�w�����#t܆-�;鼍_�>�J06܉���X#E�M+�����K�;0-�I(N@*���M��J���2�2h�(cS�+��+L�C���6���/����Kr��N�2Kz����Ց��(����e� �R�D��߬ªRɲ��j��2[j���.P֭�OE���Op:z�zP�ɀ=�y�%Y飗^�MRjo�8b9�~W�#Uq�=�p�
|
2
|
+
\��AP�"�e(�3�\�2Xm���n��$����¼jU��c7����).�f|��y�v��mH��M�LՍ��
|
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,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.1/0003-Allow-building-of-cross-rubies-in-parallel.patch
DELETED
@@ -1,214 +0,0 @@
|
|
1
|
-
From 01fd7364bdcb37ac8709ffa48388b5cbe6478211 Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Fri, 10 Jan 2020 23:57:18 +0100
|
4
|
-
Subject: [PATCH] Allow building of cross rubies in parallel
|
5
|
-
|
6
|
-
Rubies can be build like so:
|
7
|
-
rake-compiler cross-ruby VERSION=2.7.0:2.6.0 HOST=x86_64-w64-mingw32:i686-w64-mingw32
|
8
|
-
|
9
|
-
This builds the cross product of all ":" separated ruby and host versions.
|
10
|
-
To force sequential builds add option "-j1".
|
11
|
-
---
|
12
|
-
tasks/bin/cross-ruby.rake | 161 +++++++++++++++++++-------------------
|
13
|
-
1 file changed, 80 insertions(+), 81 deletions(-)
|
14
|
-
|
15
|
-
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
|
16
|
-
index 278541c..8b88025 100644
|
17
|
-
--- a/tasks/bin/cross-ruby.rake
|
18
|
-
+++ b/tasks/bin/cross-ruby.rake
|
19
|
-
@@ -41,106 +41,105 @@ end
|
20
|
-
require 'rake/extensioncompiler'
|
21
|
-
|
22
|
-
MAKE = ENV['MAKE'] || %w[gmake make].find { |c| system("#{c} -v > /dev/null 2>&1") }
|
23
|
-
-USER_HOME = File.expand_path("~/.rake-compiler")
|
24
|
-
-RUBY_CC_VERSION = "ruby-" << ENV.fetch("VERSION", "1.8.7-p371")
|
25
|
-
+USER_HOME = File.realpath(File.expand_path("~/.rake-compiler"))
|
26
|
-
RUBY_SOURCE = ENV['SOURCE']
|
27
|
-
RUBY_BUILD = RbConfig::CONFIG["host"]
|
28
|
-
|
29
|
-
-# grab the major "1.8" or "1.9" part of the version number
|
30
|
-
-MAJOR = RUBY_CC_VERSION.match(/.*-(\d.\d).\d/)[1]
|
31
|
-
-
|
32
|
-
-# Use Rake::ExtensionCompiler helpers to find the proper host
|
33
|
-
-MINGW_HOST = ENV['HOST'] || Rake::ExtensionCompiler.mingw_host
|
34
|
-
-MINGW_TARGET = MINGW_HOST.gsub('msvc', '')
|
35
|
-
-
|
36
|
-
# Unset any possible variable that might affect compilation
|
37
|
-
["CC", "CXX", "CPPFLAGS", "LDFLAGS", "RUBYOPT"].each do |var|
|
38
|
-
ENV.delete(var)
|
39
|
-
end
|
40
|
-
|
41
|
-
-source_dir = "#{USER_HOME}/sources/#{RUBY_CC_VERSION}"
|
42
|
-
-build_dir = "#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}"
|
43
|
-
-
|
44
|
-
-# define a location where sources will be stored
|
45
|
-
-directory source_dir
|
46
|
-
-directory build_dir
|
47
|
-
-
|
48
|
-
-# clean intermediate files and folders
|
49
|
-
-CLEAN.include(source_dir)
|
50
|
-
-CLEAN.include(build_dir)
|
51
|
-
-
|
52
|
-
-# remove the final products and sources
|
53
|
-
-CLOBBER.include("#{USER_HOME}/sources")
|
54
|
-
-CLOBBER.include("#{USER_HOME}/builds")
|
55
|
-
-CLOBBER.include("#{USER_HOME}/ruby/#{MINGW_HOST}/#{RUBY_CC_VERSION}")
|
56
|
-
-CLOBBER.include("#{USER_HOME}/config.yml")
|
57
|
-
+RUBY_CC_VERSIONS = ENV.fetch("VERSION", "1.8.7-p371")
|
58
|
-
+RUBY_CC_VERSIONS.split(":").each do |ruby_cc_version|
|
59
|
-
+ ruby_cc_version = "ruby-" + ruby_cc_version
|
60
|
-
+ # grab the major "1.8" or "1.9" part of the version number
|
61
|
-
+ major = ruby_cc_version.match(/.*-(\d.\d).\d/)[1]
|
62
|
-
+
|
63
|
-
+ # define a location where sources will be stored
|
64
|
-
+ source_dir = "#{USER_HOME}/sources/#{ruby_cc_version}"
|
65
|
-
+ directory source_dir
|
66
|
-
+ # clean intermediate files and folders
|
67
|
-
+ CLEAN.include(source_dir)
|
68
|
-
+
|
69
|
-
+ # remove the final products and sources
|
70
|
-
+ CLOBBER.include("#{USER_HOME}/sources")
|
71
|
-
+ CLOBBER.include("#{USER_HOME}/builds")
|
72
|
-
+ CLOBBER.include("#{USER_HOME}/config.yml")
|
73
|
-
+
|
74
|
-
+ # Extract the sources
|
75
|
-
+ source_file = RUBY_SOURCE ? RUBY_SOURCE.split('/').last : "#{ruby_cc_version}.tar.bz2"
|
76
|
-
+ file source_dir => ["#{USER_HOME}/sources/#{source_file}"] do |t|
|
77
|
-
+ t.prerequisites.each { |f| sh "tar xf #{File.basename(f)}", chdir: File.dirname(t.name) }
|
78
|
-
+ end
|
79
|
-
|
80
|
-
-# ruby source file should be stored there
|
81
|
-
-file "#{USER_HOME}/sources/#{RUBY_CC_VERSION}.tar.bz2" => ["#{USER_HOME}/sources"] do |t|
|
82
|
-
- # download the source file using wget or curl
|
83
|
-
- chdir File.dirname(t.name) do
|
84
|
-
+ # ruby source file should be stored there
|
85
|
-
+ file "#{USER_HOME}/sources/#{ruby_cc_version}.tar.bz2" => ["#{USER_HOME}/sources"] do |t|
|
86
|
-
+ # download the source file using wget or curl
|
87
|
-
if RUBY_SOURCE
|
88
|
-
url = RUBY_SOURCE
|
89
|
-
else
|
90
|
-
- url = "http://cache.ruby-lang.org/pub/ruby/#{MAJOR}/#{File.basename(t.name)}"
|
91
|
-
+ url = "http://cache.ruby-lang.org/pub/ruby/#{major}/#{File.basename(t.name)}"
|
92
|
-
end
|
93
|
-
- sh "wget #{url} || curl -O #{url}"
|
94
|
-
+ sh "wget #{url} || curl -O #{url}", chdir: File.dirname(t.name)
|
95
|
-
end
|
96
|
-
-end
|
97
|
-
-
|
98
|
-
-# Extract the sources
|
99
|
-
-source_file = RUBY_SOURCE ? RUBY_SOURCE.split('/').last : "#{RUBY_CC_VERSION}.tar.bz2"
|
100
|
-
-file source_dir => ["#{USER_HOME}/sources/#{source_file}"] do |t|
|
101
|
-
- chdir File.dirname(t.name) do
|
102
|
-
- t.prerequisites.each { |f| sh "tar xf #{File.basename(f)}" }
|
103
|
-
- end
|
104
|
-
-end
|
105
|
-
|
106
|
-
-task :mingw32 do
|
107
|
-
- unless MINGW_HOST then
|
108
|
-
- warn "You need to install mingw32 cross compile functionality to be able to continue."
|
109
|
-
- warn "Please refer to your distribution/package manager documentation about installation."
|
110
|
-
- fail
|
111
|
-
- end
|
112
|
-
-end
|
113
|
-
+ # Create tasks for each host out of the ":" separated hosts list in the HOST variable.
|
114
|
-
+ # These tasks are processed in parallel as dependencies to the "install" task.
|
115
|
-
+ mingw_hosts = ENV['HOST'] || Rake::ExtensionCompiler.mingw_host
|
116
|
-
+ mingw_hosts.split(":").each do |mingw_host|
|
117
|
-
+
|
118
|
-
+ # Use Rake::ExtensionCompiler helpers to find the proper host
|
119
|
-
+ mingw_target = mingw_host.gsub('msvc', '')
|
120
|
-
+
|
121
|
-
+ # define a location where built files for each host will be stored
|
122
|
-
+ build_dir = "#{USER_HOME}/builds/#{mingw_host}/#{ruby_cc_version}"
|
123
|
-
+ directory build_dir
|
124
|
-
+ install_dir = "#{USER_HOME}/ruby/#{mingw_host}/#{ruby_cc_version}"
|
125
|
-
+
|
126
|
-
+ # clean intermediate files and folders
|
127
|
-
+ CLEAN.include(build_dir)
|
128
|
-
+ CLOBBER.include(install_dir)
|
129
|
-
+
|
130
|
-
+ task :mingw32 do
|
131
|
-
+ unless mingw_host then
|
132
|
-
+ warn "You need to install mingw32 cross compile functionality to be able to continue."
|
133
|
-
+ warn "Please refer to your distribution/package manager documentation about installation."
|
134
|
-
+ fail
|
135
|
-
+ end
|
136
|
-
+ end
|
137
|
-
|
138
|
-
-# generate the makefile in a clean build location
|
139
|
-
-file "#{build_dir}/Makefile" => [build_dir, source_dir] do |t|
|
140
|
-
-
|
141
|
-
- options = [
|
142
|
-
- "--host=#{MINGW_HOST}",
|
143
|
-
- "--target=#{MINGW_TARGET}",
|
144
|
-
- "--build=#{RUBY_BUILD}",
|
145
|
-
- '--enable-shared',
|
146
|
-
- '--disable-install-doc',
|
147
|
-
- '--with-ext=',
|
148
|
-
- 'LDFLAGS=-pipe -s',
|
149
|
-
- ]
|
150
|
-
-
|
151
|
-
- # Force Winsock2 for Ruby 1.8, 1.9 defaults to it
|
152
|
-
- options << "--with-winsock2" if MAJOR == "1.8"
|
153
|
-
-
|
154
|
-
- chdir File.dirname(t.name) do
|
155
|
-
- prefix = File.expand_path("../../../ruby/#{MINGW_HOST}/#{RUBY_CC_VERSION}")
|
156
|
-
- options << "--prefix=#{prefix}"
|
157
|
-
- sh File.expand_path("../../../sources/#{RUBY_CC_VERSION}/configure"), *options
|
158
|
-
- end
|
159
|
-
-end
|
160
|
-
+ # generate the makefile in a clean build location
|
161
|
-
+ file "#{build_dir}/Makefile" => [build_dir, source_dir] do |t|
|
162
|
-
+
|
163
|
-
+ options = [
|
164
|
-
+ "--host=#{mingw_host}",
|
165
|
-
+ "--target=#{mingw_target}",
|
166
|
-
+ "--build=#{RUBY_BUILD}",
|
167
|
-
+ '--enable-shared',
|
168
|
-
+ '--disable-install-doc',
|
169
|
-
+ '--with-ext=',
|
170
|
-
+ 'LDFLAGS=-pipe -s',
|
171
|
-
+ ]
|
172
|
-
+
|
173
|
-
+ # Force Winsock2 for Ruby 1.8, 1.9 defaults to it
|
174
|
-
+ options << "--with-winsock2" if major == "1.8"
|
175
|
-
+ options << "--prefix=#{install_dir}"
|
176
|
-
+ sh File.expand_path("#{USER_HOME}/sources/#{ruby_cc_version}/configure"), *options, chdir: File.dirname(t.name)
|
177
|
-
+ end
|
178
|
-
|
179
|
-
-# make
|
180
|
-
-file "#{build_dir}/ruby.exe" => ["#{build_dir}/Makefile"] do |t|
|
181
|
-
- chdir File.dirname(t.prerequisites.first) do
|
182
|
-
- sh MAKE
|
183
|
-
- end
|
184
|
-
-end
|
185
|
-
+ # make
|
186
|
-
+ file "#{build_dir}/ruby.exe" => ["#{build_dir}/Makefile"] do |t|
|
187
|
-
+ sh MAKE, chdir: File.dirname(t.prerequisites.first)
|
188
|
-
+ end
|
189
|
-
|
190
|
-
-# make install
|
191
|
-
-file "#{USER_HOME}/ruby/#{MINGW_HOST}/#{RUBY_CC_VERSION}/bin/ruby.exe" => ["#{build_dir}/ruby.exe"] do |t|
|
192
|
-
- chdir File.dirname(t.prerequisites.first) do
|
193
|
-
- sh "#{MAKE} install"
|
194
|
-
+ # make install
|
195
|
-
+ file "#{USER_HOME}/ruby/#{mingw_host}/#{ruby_cc_version}/bin/ruby.exe" => ["#{build_dir}/ruby.exe"] do |t|
|
196
|
-
+ sh "#{MAKE} install", chdir: File.dirname(t.prerequisites.first)
|
197
|
-
+ end
|
198
|
-
+ multitask :install => ["#{USER_HOME}/ruby/#{mingw_host}/#{ruby_cc_version}/bin/ruby.exe"]
|
199
|
-
end
|
200
|
-
end
|
201
|
-
-task :install => ["#{USER_HOME}/ruby/#{MINGW_HOST}/#{RUBY_CC_VERSION}/bin/ruby.exe"]
|
202
|
-
|
203
|
-
desc "Update rake-compiler list of installed Ruby versions"
|
204
|
-
task 'update-config' do
|
205
|
-
@@ -187,5 +186,5 @@ task :default do
|
206
|
-
Rake.application.display_tasks_and_comments
|
207
|
-
end
|
208
|
-
|
209
|
-
-desc "Build #{RUBY_CC_VERSION} suitable for cross-platform development."
|
210
|
-
+desc "Build rubies suitable for cross-platform development."
|
211
|
-
task 'cross-ruby' => [:mingw32, :install, 'update-config']
|
212
|
-
--
|
213
|
-
2.20.1
|
214
|
-
|
data/build/patches2/rake-compiler-1.1.1/0005-Don-t-mask-out-build-env-vars-for-cross-ruby.patch
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
From 783d3d380e6abf107e0747d229da0f5e001c623f Mon Sep 17 00:00:00 2001
|
2
|
-
From: Lars Kanis <lars@greiz-reinsdorf.de>
|
3
|
-
Date: Sun, 20 Dec 2020 19:08:22 +0100
|
4
|
-
Subject: [PATCH] Don't mask out build env vars for cross-ruby
|
5
|
-
|
6
|
-
This was introduced in commit a7c113e580c1565000166f9967da82ff2ecdaeaa to avoid interference with host build.
|
7
|
-
However it prohibits setting important flags for cross-build.
|
8
|
-
|
9
|
-
Also don't force 'LDFLAGS=-pipe -s' in configure, which doesn't work with clang targeting MacOS.
|
10
|
-
It can now be set externally.
|
11
|
-
---
|
12
|
-
tasks/bin/cross-ruby.rake | 3 +--
|
13
|
-
1 file changed, 1 insertion(+), 2 deletions(-)
|
14
|
-
|
15
|
-
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
|
16
|
-
index 8edf5cd..8317a2a 100644
|
17
|
-
--- a/tasks/bin/cross-ruby.rake
|
18
|
-
+++ b/tasks/bin/cross-ruby.rake
|
19
|
-
@@ -46,7 +46,7 @@ RUBY_SOURCE = ENV['SOURCE']
|
20
|
-
RUBY_BUILD = RbConfig::CONFIG["host"]
|
21
|
-
|
22
|
-
# Unset any possible variable that might affect compilation
|
23
|
-
-["CC", "CXX", "CPPFLAGS", "LDFLAGS", "RUBYOPT"].each do |var|
|
24
|
-
+["RUBYOPT"].each do |var|
|
25
|
-
ENV.delete(var)
|
26
|
-
end
|
27
|
-
|
28
|
-
--
|
29
|
-
2.27.0
|
30
|
-
|
@@ -1,26 +0,0 @@
|
|
1
|
-
From 15f630adc4325f9cafb762e15a051c2ec8bd21e2 Mon Sep 17 00:00:00 2001
|
2
|
-
From: Sutou Kouhei <kou@clear-code.com>
|
3
|
-
Date: Mon, 21 Dec 2020 04:30:44 +0900
|
4
|
-
Subject: [PATCH] Use RAKE_EXTENSION_TASK_NO_NATIVE env var as the default
|
5
|
-
value
|
6
|
-
|
7
|
-
---
|
8
|
-
lib/rake/extensiontask.rb | 2 +-
|
9
|
-
1 file changed, 1 insertion(+), 1 deletion(-)
|
10
|
-
|
11
|
-
diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb
|
12
|
-
index b0ab88e..49d59da 100644
|
13
|
-
--- a/lib/rake/extensiontask.rb
|
14
|
-
+++ b/lib/rake/extensiontask.rb
|
15
|
-
@@ -23,7 +23,7 @@ module Rake
|
16
|
-
@cross_compile = false
|
17
|
-
@cross_config_options = []
|
18
|
-
@cross_compiling = nil
|
19
|
-
- @no_native = false
|
20
|
-
+ @no_native = (ENV["RAKE_EXTENSION_TASK_NO_NATIVE"] == "true")
|
21
|
-
@config_includes = []
|
22
|
-
@ruby_versions_per_platform = {}
|
23
|
-
@make = nil
|
24
|
-
--
|
25
|
-
2.27.0
|
26
|
-
|
@@ -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
|
@@ -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
|