Sha256: 9c0385666f25c47403a2ee95311f5a530cdde5352f2b234448aed04450a0e6ea

Contents?: true

Size: 967 Bytes

Versions: 27

Compression:

Stored size: 967 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)]
    end

    def object_paths
      [:base, :libplatform, :libbase, :snapshot].map do |name|
        Shellwords.escape libv8_object(name)
      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

27 entries across 27 versions & 1 rubygems

Version Path
libv8-5.0.71.48.3 ext/libv8/paths.rb
libv8-5.0.71.48.3-arm-linux ext/libv8/paths.rb
libv8-5.0.71.48.2 ext/libv8/paths.rb
libv8-5.0.71.48.3-amd64-freebsd-10 ext/libv8/paths.rb
libv8-5.0.71.48.3-universal-darwin-15 ext/libv8/paths.rb
libv8-5.0.71.48.3-x86_64-darwin-14 ext/libv8/paths.rb
libv8-5.0.71.48.3-x86_64-darwin-15 ext/libv8/paths.rb
libv8-5.0.71.48.3-x86-linux ext/libv8/paths.rb
libv8-5.0.71.48.3-x86_64-linux ext/libv8/paths.rb
libv8-5.0.71.48.1beta2-amd64-freebsd-10 ext/libv8/paths.rb
libv8-5.0.71.48.1beta2-x86-linux ext/libv8/paths.rb
libv8-5.0.71.48.1beta2-x86_64-linux ext/libv8/paths.rb
libv8-5.0.71.48.1beta2-x86_64-darwin-14 ext/libv8/paths.rb
libv8-5.0.71.48.1beta2-x86_64-darwin-15 ext/libv8/paths.rb
libv8-5.0.71.48.1beta2-universal-darwin-15 ext/libv8/paths.rb
libv8-5.0.71.48.0beta2 ext/libv8/paths.rb
libv8-4.5.95.5-amd64-freebsd-10 ext/libv8/paths.rb
libv8-4.5.95.5-x86-linux ext/libv8/paths.rb
libv8-4.5.95.5-x86_64-darwin-14 ext/libv8/paths.rb
libv8-4.5.95.5-x86_64-linux ext/libv8/paths.rb