Skip to content

Commit 2f5a8f6

Browse files
committed
fix broken Windows builds
First issue: pgroup is not available on Windows. new_pgroup should be used instead. This broke in commit 790755c (#763). Fixes #791. Second issue: the mingw libssh2 package, which is required for building rugged, is not installed out of the box on RubyInstaller with MSYS2. This PR adds it to the dependency list so that installing the rugged gem automatically pulls in the mingw libssh2 package as documented here: https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#-msys2-library-dependency (related to PR #770).
1 parent 33873e5 commit 2f5a8f6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ext/rugged/extconf.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class CMakeTimeout < StandardError
3030

3131
def self.run_cmake(timeout, args)
3232
# Set to process group so we can kill it and its children
33-
pid = Process.spawn("cmake #{args}", pgroup: true)
33+
pgroup = Gem.win_platform? ? :new_pgroup : :pgroup
34+
pid = Process.spawn("cmake #{args}", pgroup => true)
3435

3536
Timeout.timeout(timeout) do
3637
Process.waitpid(pid)

rugged.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ desc
3131
s.add_development_dependency "rake-compiler", ">= 0.9.0"
3232
s.add_development_dependency "pry"
3333
s.add_development_dependency "minitest", "~> 5.0"
34+
s.metadata["msys2_mingw_dependencies"] = "libssh2"
3435
end

0 commit comments

Comments
 (0)