mingw-make 1.0.0-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +14 -0
- data/README.md +68 -0
- data/lib/mingw-make/mkmf.rb +25 -0
- data/lib/mingw-make.rb +5 -0
- data/lib/rubygems_plugin.rb +20 -0
- data/mingw-make.gemspec +27 -0
- metadata +56 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9706ca235794d928d5df706432b8fcc9f8ce1a5ff49607b39dd83c9c40e17795
|
4
|
+
data.tar.gz: fa576989d96e43aa0fc88b1b1fe759b5d3430e870c2d46b107db4d7076df1fb1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 55111f155992ecf15b6e65157cdc89a184010d06c6a117dc94ed13980ad9583c3bc40c33aa96466f06f38a4bf937fd94aeb0e4cd5d254c3f048a0c4595b1c5b4
|
7
|
+
data.tar.gz: eb79299cd21d25ba0409a48af05ade2ba3fb8f087c458e75bd5064907406cf3c31aa3459f7f94a4e5e257a8d2e60686f0d9b6afb2a84e5ffb79724b963107464
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2
|
+
Version 2, December 2004
|
3
|
+
|
4
|
+
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
5
|
+
|
6
|
+
Everyone is permitted to copy and distribute verbatim or modified
|
7
|
+
copies of this license document, and changing it is allowed as long
|
8
|
+
as the name is changed.
|
9
|
+
|
10
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12
|
+
|
13
|
+
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14
|
+
|
data/README.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
When it comes to C-based extension Ruby gems on Windows,
|
2
|
+
the status quo depends on the heavyweight [MSYS2](https://www.msys2.org) to build and install them.
|
3
|
+
However, [__Minimum__ GNU for Windows (MinGW)](https://github.com/niXman/mingw-builds-binaries/releases),
|
4
|
+
a key component of MSYS2, is sufficient for half of the jobs all on its own.
|
5
|
+
|
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.
|
8
|
+
With the aid of the secret [`ruby -run`](https://github.com/ruby/un) capability it has unleashed,
|
9
|
+
all it took was a couple of quick hacks and we have ourselves a lightweight Devkit.
|
10
|
+
|
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.
|
13
|
+
|
14
|
+
This is a newly published experiment; I have only tested with a couple of projects, `bigdecimal-3.1.6` among them.
|
15
|
+
In theory, it’s compatible with anything that doesn’t leave [`mkmf`](https://rubyapi.org/o/MakeMakefile)’s comfort zone,
|
16
|
+
which I expect to be the majority of C-based gems. (It *will indeed* “take a while” when “Building native extensions”.)
|
17
|
+
Please do [let me know](https://github.com/ParadoxV5/ruby-mingw-make/issues)
|
18
|
+
if it doesn’t meet the expectations on something not unusual.
|
19
|
+
|
20
|
+
|
21
|
+
## Setup
|
22
|
+
|
23
|
+
### Requirements
|
24
|
+
* Windows
|
25
|
+
* Linux need MinGW not.
|
26
|
+
* Ruby from RubyInstaller2 without DevKit (MSYS2)
|
27
|
+
* Does it work with other Rubies? Well… maybe?
|
28
|
+
* MinGW for the Universal C Runtime (UCRT), with the `bin`aries folder on the `PATH`
|
29
|
+
* Will it work with MSYS? Uhh… likely not.
|
30
|
+
|
31
|
+
### Installation
|
32
|
+
```sh
|
33
|
+
gem install mingw-make
|
34
|
+
```
|
35
|
+
|
36
|
+
|
37
|
+
## Usage
|
38
|
+
|
39
|
+
### Use with `gem`
|
40
|
+
|
41
|
+
Thanks to `gem`’s [plugins](https://guides.rubygems.org/plugins/) system, it’s online out of the box!
|
42
|
+
|
43
|
+
### Use with [`rake-compiler`](https://github.com/rake-compiler/rake-compiler)
|
44
|
+
|
45
|
+
Slap this somewhere in the `Rakefile`:
|
46
|
+
```ruby
|
47
|
+
begin
|
48
|
+
require 'mingw-make'
|
49
|
+
rescue LoadError
|
50
|
+
# ignore
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
### Use manually
|
55
|
+
Specify `mingw32-make` as the `MAKE` tool and prepend the `lib/mingw-make/mkmf.rb` script to the Ruby `$LOAD_PATH`.
|
56
|
+
```bat
|
57
|
+
set MAKE=mingw32-make
|
58
|
+
set RUBYOPT=-Ipath/to/gems/mingw-make/lib/mingw-make/
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
## How to Contribute
|
63
|
+
|
64
|
+
Ackchyually – I would much prefer you **don’t**, but instead forward my tinkering to their corresponding upstreams.
|
65
|
+
Windows users like me would love if our chérie lang doesn’t require more (WSL) or less (MSYS) a Linux Virtual Machine.
|
66
|
+
(Imagine… Ruby VM in a Linux VM in a Windows VM… 🫠)
|
67
|
+
After all, the [WTFPL](LICENSE.txt) means that I’ve decided to release my knowledge to the public domain,
|
68
|
+
so no need to thank me and go bring developer happiness to its next level!
|
@@ -0,0 +1,25 @@
|
|
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
|
+
|
20
|
+
require File.join RbConfig::CONFIG['rubylibdir'], 'mkmf'
|
21
|
+
|
22
|
+
module MakeMakefile
|
23
|
+
# Prevent translating to MSYS `/C/some/path/` for `mingw32-make`
|
24
|
+
def mkintpath(path) = path
|
25
|
+
end
|
data/lib/mingw-make.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Note:
|
4
|
+
# RubyInstaller2’s `rubygems/defaults/operating_system.rb`
|
5
|
+
# loads before this file, patch it immediately.
|
6
|
+
begin
|
7
|
+
require 'ruby_installer/runtime/msys2_installation'
|
8
|
+
rescue LoadError
|
9
|
+
# ignore
|
10
|
+
else
|
11
|
+
# Skip check MSYS2 when installing gems
|
12
|
+
class RubyInstaller::Runtime::Msys2Installation
|
13
|
+
alias _original_ruby_installer__enable_msys_apps enable_msys_apps
|
14
|
+
def enable_msys_apps(for_gem_install: nil, **kwargs)
|
15
|
+
_original_ruby_installer__enable_msys_apps(for_gem_install:, **kwargs) unless for_gem_install
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Gem.pre_install { require_relative 'mingw-make' }
|
data/mingw-make.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Gem::Specification.new do|spec|
|
4
|
+
spec.name = 'mingw-make'
|
5
|
+
spec.summary = 'Patches that enable Windows Ruby to install C extension gems with MinGW without MSYS2 (Devkit)'
|
6
|
+
spec.version = '1.0.0'
|
7
|
+
spec.author = 'ParadoxV5'
|
8
|
+
spec.license = 'WTFPL'
|
9
|
+
|
10
|
+
github_account = spec.author
|
11
|
+
github = "https://github.com/#{github_account}/ruby-#{spec.name}"
|
12
|
+
spec.metadata = {
|
13
|
+
'homepage_uri' => spec.homepage = github,
|
14
|
+
'changelog_uri' => File.join(github, 'releases'),
|
15
|
+
'bug_tracker_uri' => File.join(github, 'issues'),
|
16
|
+
'funding_uri' => "https://github.com/sponsors/#{github_account}"
|
17
|
+
}
|
18
|
+
|
19
|
+
spec.files = Dir['**/*']
|
20
|
+
|
21
|
+
spec.platform = 'x64-mingw-ucrt'
|
22
|
+
spec.required_ruby_version = '~> 3.1'
|
23
|
+
spec.requirements = [
|
24
|
+
'Ruby from RubyInstaller2 for Windows without DevKit (MSYS2)',
|
25
|
+
'UCRT MinGW'
|
26
|
+
]
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mingw-make
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: x64-mingw-ucrt
|
6
|
+
authors:
|
7
|
+
- ParadoxV5
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-02-10 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email:
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- Gemfile
|
20
|
+
- LICENSE.txt
|
21
|
+
- README.md
|
22
|
+
- lib/mingw-make.rb
|
23
|
+
- lib/mingw-make/mkmf.rb
|
24
|
+
- lib/rubygems_plugin.rb
|
25
|
+
- mingw-make.gemspec
|
26
|
+
homepage: https://github.com/ParadoxV5/ruby-mingw-make
|
27
|
+
licenses:
|
28
|
+
- WTFPL
|
29
|
+
metadata:
|
30
|
+
homepage_uri: https://github.com/ParadoxV5/ruby-mingw-make
|
31
|
+
changelog_uri: https://github.com/ParadoxV5/ruby-mingw-make/releases
|
32
|
+
bug_tracker_uri: https://github.com/ParadoxV5/ruby-mingw-make/issues
|
33
|
+
funding_uri: https://github.com/sponsors/ParadoxV5
|
34
|
+
post_install_message:
|
35
|
+
rdoc_options: []
|
36
|
+
require_paths:
|
37
|
+
- lib
|
38
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '3.1'
|
43
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
requirements:
|
49
|
+
- Ruby from RubyInstaller2 for Windows without DevKit (MSYS2)
|
50
|
+
- UCRT MinGW
|
51
|
+
rubygems_version: 3.5.3
|
52
|
+
signing_key:
|
53
|
+
specification_version: 4
|
54
|
+
summary: Patches that enable Windows Ruby to install C extension gems with MinGW without
|
55
|
+
MSYS2 (Devkit)
|
56
|
+
test_files: []
|