Sha256: 7cababe36c265596f0ebdbb5050fe5ee2bbf64e413bd79783efc04c5b4fcd888

Contents?: true

Size: 970 Bytes

Versions: 59

Compression:

Stored size: 970 Bytes

Contents

require 'rbconfig'
require 'shellwords'
require File.expand_path '../arch', __FILE__

module Libv8
  module Paths
    module_function

    def include_paths
      [Shellwords.escape("#{vendored_source_path}/include")]
    end

    def object_paths
      [libv8_object(:base), libv8_object(:snapshot)].map do |path|
        Shellwords.escape path
      end
    end

    def config
      RbConfig::MAKEFILE_CONFIG
    end

    def libv8_object(name)
      filename = "#{libv8_profile}/libv8_#{name}.#{config['LIBEXT']}"
      unless File.exist? filename
        filename = "#{libv8_profile}/obj.target/tools/gyp/libv8_#{name}.#{config['LIBEXT']}"
      end
      return filename
    end

    def libv8_profile
      base = "#{vendored_source_path}/out/#{Libv8::Arch.libv8_arch}"
      debug = "#{base}.debug"
      File.exist?(debug) ? debug : "#{base}.release"
    end

    def vendored_source_path
      File.expand_path "../../../vendor/v8", __FILE__
    end
  end
end

Version data entries

59 entries across 58 versions & 4 rubygems

Version Path
libv8-3.16.14.19.1-x86_64-linux ext/libv8/paths.rb
libv8-3.16.14.19.1-x86_64-darwin ext/libv8/paths.rb
libv8-3.16.14.19.1-x86-linux ext/libv8/paths.rb
libv8-3.16.14.19.1-universal-darwin ext/libv8/paths.rb
libv8-3.16.14.19.1-armv7l-linux ext/libv8/paths.rb
libv8-3.16.14.19.1-arm-linux ext/libv8/paths.rb
libv8-3.16.14.19.1-amd64-freebsd-11 ext/libv8/paths.rb
libv8-3.16.14.19.1-amd64-freebsd-10 ext/libv8/paths.rb
libv8-3.16.14.19.1 ext/libv8/paths.rb
libv8-3.16.14.19-x86_64-darwin-18 ext/libv8/paths.rb
libv8-3.16.14.19-x86_64-darwin-17 ext/libv8/paths.rb
libv8-3.16.14.19-universal-darwin-17 ext/libv8/paths.rb
libv8-3.16.14.19-x86_64-darwin-16 ext/libv8/paths.rb
libv8-3.16.14.19-x86_64-darwin-15 ext/libv8/paths.rb
libv8-3.16.14.19-universal.x86_64-darwin-16 ext/libv8/paths.rb
libv8-3.16.14.19-universal.x86_64-darwin-15 ext/libv8/paths.rb
libv8-3.16.14.19-x86-linux ext/libv8/paths.rb
libv8-3.16.14.19-x86_64-linux ext/libv8/paths.rb
libv8-3.16.14.19 ext/libv8/paths.rb
libv8-3.16.14.19-armv7l-linux ext/libv8/paths.rb