Sha256: ad55874a07de0889df1853d6e200317abb852f3a3a9f5b16b0ab584545016dd0

Contents?: true

Size: 877 Bytes

Versions: 44

Compression:

Stored size: 877 Bytes

Contents

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

module Libv8
  module Paths
    module_function

    def include_paths
      ["#{vendored_source_path}/include"]
    end

    def object_paths
      [libv8_object(:base), libv8_object(:snapshot)]
    end

    def config
      RbConfig::MAKEFILE_CONFIG
    end

    def libv8_object(name)
      filename = "#{libv8_profile}/libv8_#{name}.#{config['LIBEXT']}"
      unless File.exists? 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.exists?(debug) ? debug : "#{base}.release"
    end

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

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/libv8-3.11.8.17-x86_64-linux/ext/libv8/paths.rb
libv8-3.16.14.7-x86_64-darwin-14 ext/libv8/paths.rb
libv8-3.16.14.7-x86_64-darwin-13 ext/libv8/paths.rb
libv8-3.16.14.7-amd64-freebsd-10 ext/libv8/paths.rb
libv8-3.16.14.7-x86_64-linux ext/libv8/paths.rb
libv8-3.16.14.7 ext/libv8/paths.rb
libv8-3.16.14.6 ext/libv8/paths.rb
libv8-3.16.14.5-armv6l-linux ext/libv8/paths.rb
libv8-3.16.14.5-x86_64-darwin-13 ext/libv8/paths.rb
libv8-3.16.14.5 ext/libv8/paths.rb
libv8-3.16.14.4 ext/libv8/paths.rb
libv8-3.16.14.3-armv6l-linux ext/libv8/paths.rb
libv8-3.11.8.17-x86_64-darwin-13 ext/libv8/paths.rb
libv8-3.16.14.3-x86_64-solaris-2.11 ext/libv8/paths.rb
libv8-3.16.14.3-amd64-freebsd-9 ext/libv8/paths.rb
libv8-3.16.14.3-x86_64-darwin-13 ext/libv8/paths.rb
libv8-3.16.14.3-x86_64-darwin-12 ext/libv8/paths.rb
libv8-3.16.14.3-x86_64-linux ext/libv8/paths.rb
libv8-3.16.14.3 ext/libv8/paths.rb
libv8-3.16.14.2 ext/libv8/paths.rb