forked from avalanche123/uvrb
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(submodule:build) update build process
Libuv uses make by preference over GYP
- Loading branch information
Stephen von Takach
committed
Jun 10, 2018
1 parent
7e5e932
commit 0d31f69
Showing
6 changed files
with
29 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ rvm: | |
- ruby-2.3.5 | ||
- ruby-2.4.2 | ||
- ruby-head | ||
- rubinius-3.86 | ||
- rubinius | ||
- jruby-9.1.13.0 | ||
- jruby-head | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
file 'ext/libuv/uv.xcodeproj' => 'ext/libuv/build/gyp' do | ||
target_arch = 'ia32'if FFI::Platform.ia32? | ||
target_arch = 'x64' if FFI::Platform.x64? | ||
|
||
abort "Don't know how to build on #{FFI::Platform::ARCH} (yet)" unless target_arch | ||
|
||
Dir.chdir("ext/libuv") do |path| | ||
system "./gyp_uv.py -f xcode -Dtarget_arch=#{target_arch} -Duv_library=shared_library -Dcomponent=shared_library" | ||
end | ||
end | ||
|
||
file "ext/libuv/build/Release/libuv.#{FFI::Platform::LIBSUFFIX}" => 'ext/libuv/uv.xcodeproj' do | ||
file "ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}" => 'ext/libuv/build' do | ||
Dir.chdir("ext/libuv") do |path| | ||
system 'xcodebuild -project uv.xcodeproj -configuration Release -target libuv' | ||
system "sh", "autogen.sh" | ||
system "./configure" | ||
system "make" | ||
end | ||
end | ||
|
||
file "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}" => "ext/libuv/build/Release/libuv.#{FFI::Platform::LIBSUFFIX}" do | ||
file "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}" => "ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}" do | ||
FileUtils.mkdir('ext/libuv/lib') unless File.directory?('ext/libuv/lib') | ||
|
||
user_lib = "#{ENV['HOME']}/lib" | ||
FileUtils.mkdir(user_lib) unless File.directory?(user_lib) | ||
|
||
# Useful for building other libraries that wish to use Libuv | ||
FileUtils.cp("ext/libuv/build/Release/libuv.#{FFI::Platform::LIBSUFFIX}", "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
FileUtils.cp("ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}", "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
|
||
# Primrary load location - falls back to above if not available | ||
FileUtils.cp("ext/libuv/build/Release/libuv.#{FFI::Platform::LIBSUFFIX}", "#{user_lib}/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
FileUtils.cp("ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}", "#{user_lib}/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
end | ||
|
||
CLEAN.include('ext/libuv/uv.xcodeproj') | ||
CLOBBER.include("ext/libuv/build/Release/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
CLOBBER.include("ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
file 'ext/libuv/out' => 'ext/libuv/build/gyp' do | ||
target_arch = 'ia32'if FFI::Platform.ia32? | ||
target_arch = 'x64' if FFI::Platform.x64? | ||
|
||
abort "Don't know how to build on #{FFI::Platform::ARCH} (yet)" unless target_arch | ||
|
||
Dir.chdir("ext/libuv") do |path| | ||
system "./gyp_uv.py -f make -Dtarget_arch=#{target_arch} -Duv_library=shared_library -Dcomponent=shared_library" | ||
end | ||
end | ||
|
||
file "ext/libuv/out/Release/lib.target/libuv.#{FFI::Platform::LIBSUFFIX}" => 'ext/libuv/out' do | ||
file "ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}" => 'ext/libuv/build' do | ||
Dir.chdir("ext/libuv") do |path| | ||
system 'make -C out BUILDTYPE=Release' | ||
system "sh", "autogen.sh" | ||
system "./configure" | ||
system "make" | ||
end | ||
end | ||
|
||
file "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}" => "ext/libuv/out/Release/lib.target/libuv.#{FFI::Platform::LIBSUFFIX}" do | ||
file "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}" => "ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}" do | ||
FileUtils.mkdir('ext/libuv/lib') unless File.directory?('ext/libuv/lib') | ||
begin | ||
FileUtils.cp("ext/libuv/out/Release/lib.target/libuv.#{FFI::Platform::LIBSUFFIX}", "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
rescue => e | ||
FileUtils.cp("ext/libuv/out/Release/lib.target/libuv.#{FFI::Platform::LIBSUFFIX}.1", "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
FileUtils.cp("ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}", "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
|
||
Dir.chdir("ext/libuv") do |path| | ||
system "make", "install" | ||
end | ||
end | ||
|
||
CLEAN.include('ext/libuv/out') | ||
CLOBBER.include("ext/libuv/out/Release/lib.target/libuv.#{FFI::Platform::LIBSUFFIX}") | ||
CLOBBER.include("ext/libuv/.libs/libuv.1.#{FFI::Platform::LIBSUFFIX}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Libuv | ||
VERSION = '4.0.2' | ||
VERSION = '4.0.3' | ||
end |