File tree Expand file tree Collapse file tree 4 files changed +103
-0
lines changed
lib/rubygems-requirements-system Expand file tree Collapse file tree 4 files changed +103
-0
lines changed Original file line number Diff line number Diff line change 9292 cd test/fixture/dummy-cairo
9393 gem build *.gemspec
9494 gem install ./*.gem
95+
96+ windows-msys2 :
97+ name : Windows ${{ matrix.msystem }}
98+ runs-on : ${{ matrix.runner }}
99+ timeout-minutes : 10
100+ strategy :
101+ fail-fast : false
102+ matrix :
103+ include :
104+ - msystem : CLANG64
105+ package-prefix : mingw-w64-clang-x86_64
106+ runner : windows-latest
107+ - msystem : CLANGARM64
108+ package-prefix : mingw-w64-clang-aarch64
109+ runner : windows-11-arm
110+ - msystem : MINGW32
111+ package-prefix : mingw-w64-i686
112+ runner : windows-latest
113+ - msystem : MINGW64
114+ package-prefix : mingw-w64-x86_64
115+ runner : windows-latest
116+ - msystem : UCRT64
117+ package-prefix : mingw-w64-ucrt-x86_64
118+ runner : windows-latest
119+ steps :
120+ - uses : actions/checkout@v6
121+ - uses : msys2/setup-msys2@v2
122+ with :
123+ msystem : ${{ matrix.msystem }}
124+ update : true
125+ install : >-
126+ base-devel
127+ ${{ matrix.package-prefix }}-ruby
128+ ${{ matrix.package-prefix }}-toolchain
129+ - name : Install
130+ shell : msys2 {0}
131+ run : |
132+ rake install
133+ - name : Install dummy-cairo gem
134+ shell : msys2 {0}
135+ run : |
136+ cd test/fixture/dummy-cairo
137+ gem build *.gemspec
138+ gem install ./*.gem
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ def detect(ui)
6262require_relative "platform/alpine-linux"
6363
6464
65+ # Windows
66+ require_relative "platform/msys2"
67+
68+
6569# Platform independent
6670require_relative "platform/homebrew"
6771require_relative "platform/conda"
Original file line number Diff line number Diff line change 1+ # Copyright (C) 2025 Ruby-GNOME Project Team
2+ #
3+ # This program is free software: you can redistribute it and/or modify
4+ # it under the terms of the GNU Lesser General Public License as published by
5+ # the Free Software Foundation, either version 3 of the License, or
6+ # (at your option) any later version.
7+ #
8+ # This program is distributed in the hope that it will be useful,
9+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ # GNU Lesser General Public License for more details.
12+ #
13+ # You should have received a copy of the GNU Lesser General Public License
14+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+ require_relative "base"
17+
18+ module RubyGemsRequirementsSystem
19+ module Platform
20+ class MSYS2 < Base
21+ Platform . register ( self )
22+
23+ class << self
24+ def current_platform?
25+ return false if Object . const_defined? ( :RubyInstaller )
26+ return false if package_prefix . nil?
27+ ExecutableFinder . exist? ( "pacman" )
28+ end
29+
30+ def package_prefix
31+ ENV [ "MINGW_PACKAGE_PREFIX" ]
32+ end
33+ end
34+
35+ def target? ( platform )
36+ platform == "msys2"
37+ end
38+
39+ private
40+ def install_command_line ( package )
41+ [
42+ "pacman" ,
43+ "-S" ,
44+ "--noconfirm" ,
45+ "#{ self . class . package_prefix } -#{ package } "
46+ ]
47+ end
48+
49+ def need_super_user_priviledge?
50+ false
51+ end
52+ end
53+ end
54+ end
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ Gem::Specification.new do |spec|
5252 spec . requirements << "system: cairo >= 1.2.0: gentoo_linux: x11-libs/cairo"
5353 spec . requirements << "system: cairo >= 1.2.0: homebrew: cairo"
5454 spec . requirements << "system: cairo >= 1.2.0: macports: cairo"
55+ spec . requirements << "system: cairo >= 1.2.0: msys2: cairo"
5556 spec . requirements << "system: cairo >= 1.2.0: pld_linux: cairo-devel"
5657 spec . requirements << "system: cairo >= 1.2.0: suse: cairo-devel"
5758end
You can’t perform that action at this time.
0 commit comments