Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for libuv-1.34 #84

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:
- MRUBY_VERSION=1.2.0
- MRUBY_VERSION=1.3.0
- MRUBY_VERSION=1.4.0
- MRUBY_VERSION=1.4.1
- MRUBY_VERSION=2.0.0
- MRUBY_VERSION=2.1.0
before_script:
# Add an IPv6 config - see the corresponding Travis issue
# https://github.com/travis-ci/travis-ci/issues/8361
Expand Down
18 changes: 17 additions & 1 deletion .travis_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,21 @@
gem :core => 'mruby-print'
gem :core => 'mruby-sprintf'
gem :core => 'mruby-time'
gem "#{MRUBY_ROOT}/.."
gem "#{MRUBY_ROOT}/.." do |c|
c.bundle_uv
end
end

MRuby::Build.new('libuv-v1.0.0') do |conf|
toolchain :gcc
enable_debug
enable_test

gem :core => 'mruby-print'
gem :core => 'mruby-sprintf'
gem :core => 'mruby-time'
ENV['SKIP_UV_BUNDLE'] = '1'
gem "#{MRUBY_ROOT}/.." do |c|
c.bundle_uv '1.0.0'
end
end
8 changes: 4 additions & 4 deletions mrbgem.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ MRuby::Gem::Specification.new('mruby-uv') do |spec|

def cross?; build.kind_of? MRuby::CrossBuild end

def self.bundle_uv
DEFAULT_UV_VERSION = '1.34.0'

def self.bundle_uv(version = DEFAULT_UV_VERSION)
visualcpp = ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']

# version = '1.0.0'
version = '1.19.1'
libuv_dir = "#{build_dir}/libuv-#{version}"
libuv_lib = libfile "#{libuv_dir}/.libs/libuv"
header = "#{libuv_dir}/include/uv.h"
Expand Down Expand Up @@ -99,7 +99,7 @@ MRuby::Gem::Specification.new('mruby-uv') do |spec|
if build.cc.respond_to? :search_header_path
next if build.cc.search_header_path 'uv.h'
end
if ENV['OS'] == 'Windows_NT'
if ENV['OS'] == 'Windows_NT' || ENV['SKIP_UV_BUNDLE']
next
end

Expand Down
6 changes: 5 additions & 1 deletion mrblib/yarn.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module UV
def self.sleep sec
current_yarn.sleep sec
if UV.current_loop.current_yarn
current_yarn.sleep sec
else
UV.sleep_milli sec * 1000
end
end

def self.quote cmd
Expand Down
Loading