Sha256: b08fdc94177834e8927450756003d8d87e0b90b1bebe5a718fe385ef65c4c3b7

Contents?: true

Size: 1.45 KB

Versions: 22

Compression:

Stored size: 1.45 KB

Contents

# 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
    Dir.chdir("ext/libuv") do |path|
        system 'xcodebuild -project uv.xcodeproj -configuration Release -target libuv'
    end
end

file "ext/libuv/lib/libuv.#{FFI::Platform::LIBSUFFIX}" => "ext/libuv/build/Release/libuv.#{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}")

    # 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}")
end

CLEAN.include('ext/libuv/uv.xcodeproj')
CLOBBER.include("ext/libuv/build/Release/libuv.#{FFI::Platform::LIBSUFFIX}")

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
libuv-3.0.1 lib/libuv/ext/tasks/mac.rb
libuv-3.0.0 lib/libuv/ext/tasks/mac.rb