/
03_dev_tools.rb
73 lines (66 loc) · 1.37 KB
/
03_dev_tools.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module RubyInstaller
module Build # Use for: Build, Runtime
module Components
class DevTools < Base
def self.depends
%w[msys2]
end
def description
"MSYS2 and MINGW development toolchain"
end
PACKAGES_COMMON = %w[
autoconf
autogen
automake-wrapper
diffutils
file
gawk
grep
libtool
m4
make
patch
sed
texinfo
texinfo-tex
wget
mingw-w64-binutils
mingw-w64-crt-git
mingw-w64-gcc
mingw-w64-gcc-libs
mingw-w64-headers-git
mingw-w64-libmangle-git
mingw-w64-libwinpthread-git
mingw-w64-make
mingw-w64-tools-git
mingw-w64-winpthreads-git
]
PACKAGES_MINGW32 = PACKAGES_COMMON + %w[
pkg-config
mingw-w64-pkg-config
]
PACKAGES_MINGW64 = PACKAGES_COMMON + %w[
pkgconf
mingw-w64-pkgconf
]
PACKAGES = {
'mingw32' => PACKAGES_MINGW32,
'mingw64' => PACKAGES_MINGW64,
# 'ucrt64' => PACKAGES_UCRT64,
}
def execute(args)
msys.with_msys_apps_enabled do
puts "Install #{description} ..."
packages = PACKAGES[msys.mingwarch].map do |package|
package.sub(/^mingw-w64/, msys.mingw_package_prefix)
end
res = run_verbose("pacman", "-S", *pacman_args, *packages)
puts "Install #{description} #{res ? green("succeeded") : red("failed")}"
raise "pacman failed" unless res
autorebase
end
end
end
end
end
end