mingw-make 1.1.0-x64-mingw-ucrt → 1.2.0-x64-mingw-ucrt

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 464742e744f8cd5ef6d7d1cf17eb17ba7bbc1f00f081a33a79953e3ce3769574
4
- data.tar.gz: a5830fd8eb38b0c357e1bac919c2b56a057649695ba3284765ac29707c841db4
3
+ metadata.gz: ee69bb2bcae4f8e3cf824914e88bacf4d4e3dcea1884b85792f7c1794641a516
4
+ data.tar.gz: 456ce51aee4a68614fa8802337d7078b40bf54a7f6a19a57a46ee37663d1b02a
5
5
  SHA512:
6
- metadata.gz: e03015f78e7ad3e3a9ffd22cf5e5447b6b304d6470797e1c9c1a00f2ce0c10b1a38b138416941dae25becc9c463ac445c26f33279e74637dd304b5f69dae2110
7
- data.tar.gz: ac7c8b11b3ee4d2ab263bd88a3ee9cfac2fc306166943411f53540cfde26f7c3fda830df3a142309064289145c185938f5f29f4c68c37312f9136194f17fc205
6
+ metadata.gz: aa8b3f61669b40cb8c2e9c1ce99353e5c5466560bbc420727b1c7ec17fa2cfaf1ddb14a19708bb4a67487280f2eb100960e80207e3b640dcc32108ade60d0ece
7
+ data.tar.gz: 7fd22148216bd2ee246331db9a4416ec23c90ba03f3e2ec0f06c0a045c0948e419d7eeb71d46aba0ed2d3e7aacb3e63a04184fb0128c1e6b36f49ba6fbb1c1fa
data/README.md CHANGED
@@ -4,39 +4,52 @@ However, [__Minimum__ GNU for Windows (MinGW)](https://github.com/niXman/mingw-b
4
4
  a key component of MSYS2, is sufficient for half of the jobs all on its own.
5
5
 
6
6
  `mingw-make` is a set of tiny non-intrusive mods for [RubyInstaller2 for Windows](https://rubyinstaller.org)
7
- that solves the hurdles on the other half minimally.
7
+ that solves the hurdles on the other half minimally, namely by replacing `rbconfig` entries of compilation commands.
8
8
  With the aid of the secret [`ruby -run`](https://github.com/ruby/un) capability it has unleashed,
9
9
  all it took was a couple of quick hacks and we have ourselves a lightweight Devkit.
10
10
 
11
11
  Setups with MinGW and RubyInstaller’s prebuilds with these patches are ideal to keep footprints small,
12
- for experts strongly recommend WSL for a fully-fledged Ruby environment.
12
+ though experts strongly recommend WSL for a fully-fledged Ruby environment.
13
13
 
14
14
  ### Compatibility
15
15
 
16
- This is a newly published experiment; I have only tested with the following projects.
17
- In theory, it’s compatible with anything that doesn’t leave [`mkmf`](https://rubyapi.org/o/MakeMakefile)’s comfort zone,
16
+ I’m glad to announce that, except for Prism for which I have sent PRs,
17
+ **this experiment works with `gem update` versions of every [Default and Bundled C extension](https://stdgems.org) 📈**.
18
+
19
+ While I have only tested this experiment with the following projects,
20
+ In theory, it’s compatible with anything that doesn’t leave
21
+ [`rbconfig`](https://rubyapi.org/o/RbConfig)+[`mkmf`](https://rubyapi.org/o/MakeMakefile)’s comfort zone,
18
22
  which I expect to be the majority of C-based gems. (It *will indeed* “take a while” when “Building native extensions”.)
19
23
  Please do [let me know](https://github.com/ParadoxV5/ruby-mingw-make/issues)
20
24
  if it doesn’t meet the expectations on something not unusual.
21
25
 
22
26
  #### builds
23
- * `bigdecimal 3.1.6..3.1.7`
27
+
28
+ * __`railties 7.1.3`__
29
+ * `bigdecimal 3.1.6..3.1.8`
30
+ * `racc 1.7.3..1.8.0`
31
+ * `io-console 0.7.2`
24
32
  * `json 2.7.2`
25
- * `io-console 0.7.2`
26
33
  * `nkf 0.2.0`
34
+ * [`prism 9bb8710`](https://github.com/ruby/prism/pull/2711)
27
35
  * `strscan 3.1.0`
28
36
  * `debug 1.9.2`
29
- * `racc 1.7.3`
37
+ * `rbs 3.4.4`
30
38
 
31
39
  #### fails
32
- * `prism 0.24.0`:
40
+ * `prism ..0.29.0`:
33
41
  > * It must be possible to build prism without needing ruby/rake/etc.
34
42
  > Because once prism is the single parser in TruffleRuby, JRuby or CRuby there won't be another Ruby parser around to parse such Ruby code.
35
43
  > \[…]
36
44
  >
37
45
  > The main solution for the second point seems a Makefile, otherwise many of the usages would have to duplicate the logic to build prism.
46
+ >
38
47
  > ⸺ https://github.com/ruby/prism/blob/19c67fb/docs/build_system.md#requirements
39
- * `ffi 1.16.3`: see also https://github.com/ffi/ffi/issues/1091
48
+ * `ffi` (the platform-agnostic edition)
49
+ * RubyGems will instead prefer [the prebuilt gem](https://rubygems.org/gems/ffi/versions/1.17.0.rc2-x64-mingw-ucrt)
50
+ once it leaves RC. For now, you can join the preview manually with `gem install --prerelease ffi`.
51
+ * This transitive dependency is the last obstable before
52
+ [`steep`](https://github.com/soutaro/steep) becomes available!
40
53
 
41
54
  ### not thoroughly tested
42
55
  * `syslog 0.1.2`: [It’s UNIX-specific.](https://stackoverflow.com/a/9503254)
@@ -74,10 +87,15 @@ end
74
87
  ```
75
88
 
76
89
  ### Use manually
77
- Specify `mingw32-make` as the `MAKE` tool and prepend the `lib/mingw-make/mkmf.rb` script to the Ruby `$LOAD_PATH`.
90
+ *Prepend* (so it takes precedence) the [`lib/mingw-make/mkmf.rb`](lib/mingw-make/mkmf.rb)
91
+ script to the Ruby `$LOAD_PATH`. Because RubyGems `require 'rbconfig'`,
92
+ we must explicitly apply [the `rbconfig` replacements](lib/mingw-make/rbconfig-patch.rb).
93
+ ```bat
94
+ set RUBYOPT=-Ipath/to/gems/mingw-make/lib/mingw-make/ -rrbconfig-patch
95
+ ```
96
+ You may also need to specify a fallback for the `MAKE` tool, e.g.:
78
97
  ```bat
79
98
  set MAKE=mingw32-make
80
- set RUBYOPT=-Ipath/to/gems/mingw-make/lib/mingw-make/
81
99
  ```
82
100
 
83
101
 
@@ -1,22 +1,5 @@
1
1
  # frozen_string_literal: true
2
-
3
- require 'rbconfig'
4
-
5
- # Get `mkmf` to fall back to `ruby -run`
6
- %w[
7
- RM
8
- RMALL
9
- RMDIRS
10
- MAKEDIRS
11
- INSTALL
12
- INSTALL_PROG
13
- INSTALL_DATA
14
- CP
15
- ].each do|key|
16
- RbConfig::CONFIG.delete key
17
- RbConfig::MAKEFILE_CONFIG.delete key
18
- end
19
-
2
+ require_relative 'rbconfig-patch'
20
3
  require File.join RbConfig::CONFIG['rubylibdir'], 'mkmf'
21
4
 
22
5
  module MakeMakefile
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Normally, RubyGems `require`s `rbconfig` itself, so overloading `require 'rbconfig'` may be ineffective.
4
+ # Howëver, if RubyGems are disabled (`--disable-gems`), nameing this file `rbconfig.rb` would conflict with the design,
5
+ # which depends on the original {RbConfig} to bypass the modified `$LOAD_PATH` to fetch the original {MakeMakefile}.
6
+
7
+ require 'rbconfig'
8
+
9
+ # Use `ruby -run` fall-backs
10
+ install = 'ruby -run -e install -- -p'
11
+ fixed = {
12
+ 'RM' => 'ruby -run -e rm -- -f',
13
+ 'RMALL' => 'ruby -run -e rm -- -rf',
14
+ 'RMDIRS' => 'ruby -run -e rmdir -- -p',
15
+ 'MAKEDIRS' => 'ruby -run -e mkdir -- -p',
16
+ 'CP' => 'ruby -run -e cp --',
17
+ 'INSTALL' => install
18
+ }
19
+ install_args = {
20
+ 'INSTALL_PROG' => '-m 0755',
21
+ 'INSTALL_DATA' => '-m 0644'
22
+ }
23
+ RbConfig::MAKEFILE_CONFIG.merge! fixed, install_args.transform_values { "$(INSTALL) #{_1}" }
24
+ RbConfig::CONFIG.merge! fixed, install_args.transform_values { "#{install} #{_1}" }
data/lib/mingw-make.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Set up `RUBYOPT=-I/absolute/path/to/lib/mingw-make/` for subprocesses
4
- ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -I#{File.join __dir__, 'mingw-make'}"
3
+ # Set up `RUBYOPT=-I/absolute/path/to/lib/mingw-make/ -rrbconfig-patch` for subprocesses
4
+ ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -I#{File.join __dir__, 'mingw-make'} -rrbconfig-patch"
5
5
  ENV['MAKE'] ||= 'make'
data/mingw-make.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do|spec|
4
4
  spec.name = 'mingw-make'
5
5
  spec.summary = 'Patches that enable Windows Ruby to install C extension gems with MinGW without MSYS2 (Devkit)'
6
- spec.version = '1.1.0'
6
+ spec.version = '1.2.0'
7
7
  spec.author = 'ParadoxV5'
8
8
  spec.license = 'WTFPL'
9
9
 
@@ -15,8 +15,8 @@ Gem::Specification.new do|spec|
15
15
  'bug_tracker_uri' => File.join(github, 'issues'),
16
16
  'funding_uri' => "https://github.com/sponsors/#{github_account}"
17
17
  }
18
-
19
- spec.files = Dir['**/*']
18
+
19
+ spec.files = Dir['**/*'].grep_v 'Gemfile'
20
20
  spec.executable = 'make'
21
21
 
22
22
  spec.platform = 'x64-mingw-ucrt'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mingw-make
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - ParadoxV5
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-05 00:00:00.000000000 Z
11
+ date: 2024-05-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -17,12 +17,12 @@ executables:
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - Gemfile
21
20
  - LICENSE.txt
22
21
  - README.md
23
22
  - bin/make
24
23
  - lib/mingw-make.rb
25
24
  - lib/mingw-make/mkmf.rb
25
+ - lib/mingw-make/rbconfig-patch.rb
26
26
  - lib/rubygems_plugin.rb
27
27
  - mingw-make.gemspec
28
28
  homepage: https://github.com/ParadoxV5/ruby-mingw-make
@@ -50,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - Ruby from RubyInstaller2 for Windows without DevKit (MSYS2)
52
52
  - UCRT MinGW
53
- rubygems_version: 3.5.3
53
+ rubygems_version: 3.5.9
54
54
  signing_key:
55
55
  specification_version: 4
56
56
  summary: Patches that enable Windows Ruby to install C extension gems with MinGW without
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
- source 'https://rubygems.org'
3
- gemspec