From a3fe34e327bd7cc4a1d386c3c70e27e4a9a8682d Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Wed, 19 Jul 2017 12:30:51 +0300 Subject: [PATCH] Simplify dependency setup --- .gitignore | 3 --- .gitmodules | 3 +++ Rakefile | 1 - ext/libv8/builder.rb | 17 +++++------------ vendor/.gclient | 9 +++++++++ vendor/.gclient_entries | 23 +++++++++++++++++++++++ vendor/depot_tools | 2 +- vendor/v8 | 1 + 8 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 vendor/.gclient create mode 100644 vendor/.gclient_entries create mode 160000 vendor/v8 diff --git a/.gitignore b/.gitignore index feb1862..989499e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,3 @@ lib/libv8/VERSION /release/**/libv8 /release/**/.vagrant /release/**/.scaleway -/vendor/.gclient -/vendor/.gclient_entries -/vendor/v8/ diff --git a/.gitmodules b/.gitmodules index 37ac743..c0d3a57 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "vendor/depot_tools"] path = vendor/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git +[submodule "vendor/v8"] + path = vendor/v8 + url = https://chromium.googlesource.com/v8/v8.git diff --git a/Rakefile b/Rakefile index 15cbe51..932d1d4 100644 --- a/Rakefile +++ b/Rakefile @@ -102,7 +102,6 @@ end desc "clean up artifacts of the build" task :clean => [:clean_submodules] do sh "rm -rf pkg" - sh "rm -rf vendor/v8" sh "git clean -dxf -e .bundle -e vendor/bundle" end diff --git a/ext/libv8/builder.rb b/ext/libv8/builder.rb index ee5227c..5079ea1 100644 --- a/ext/libv8/builder.rb +++ b/ext/libv8/builder.rb @@ -112,19 +112,12 @@ module Libv8 # def setup_build_deps! ENV['PATH'] = "#{File.expand_path('../../../vendor/depot_tools', __FILE__)}:#{ENV['PATH']}" - Dir.chdir(File.expand_path('../../../vendor', __FILE__)) do - unless Dir.exists? 'v8' - system "env #{gyp_defines} fetch v8" or fail "unable to fetch v8 source" - else - system "env #{gyp_defines} gclient fetch" or fail "could not fetch v8 build dependencies commits" - end - Dir.chdir('v8') do - unless system "git checkout #{source_version}" - fail "unable to checkout source for v8 #{source_version}" - end - system "env #{gyp_defines} gclient sync" or fail "could not sync v8 build dependencies" - system "git checkout Makefile" # Work around a weird bug on FreeBSD + Dir.chdir(File.expand_path('../../../vendor/v8', __FILE__)) do + unless system "git checkout #{source_version}" + fail "unable to checkout source for v8 #{source_version}" end + system "env #{gyp_defines} gclient sync -n" or fail "could not sync v8 build dependencies" + system "git checkout Makefile" # Work around a weird bug on FreeBSD end end diff --git a/vendor/.gclient b/vendor/.gclient new file mode 100644 index 0000000..4d21324 --- /dev/null +++ b/vendor/.gclient @@ -0,0 +1,9 @@ +solutions = [ + { + "url": "https://chromium.googlesource.com/v8/v8.git", + "managed": False, + "name": "v8", + "deps_file": "DEPS", + "custom_deps": {}, + }, +] diff --git a/vendor/.gclient_entries b/vendor/.gclient_entries new file mode 100644 index 0000000..151dc7b --- /dev/null +++ b/vendor/.gclient_entries @@ -0,0 +1,23 @@ +entries = { + 'v8': 'https://chromium.googlesource.com/v8/v8.git', + 'v8/base/trace_event/common': 'https://chromium.googlesource.com/chromium/src/base/trace_event/common.git@39a3450531fc73432e963db8668695d2e8f13053', + 'v8/build': 'https://chromium.googlesource.com/chromium/src/build.git@1caf3a69f3b0379c9fef2493aa1b3cda96e17d7b', + 'v8/buildtools': 'https://chromium.googlesource.com/chromium/buildtools.git@98f00fa10dbad2cdbb2e297a66c3d6d5bc3994f3', + 'v8/test/benchmarks/data': 'https://chromium.googlesource.com/v8/deps/third_party/benchmarks.git@05d7188267b4560491ff9155c5ee13e207ecd65f', + 'v8/test/mozilla/data': 'https://chromium.googlesource.com/v8/deps/third_party/mozilla-tests.git@f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', + 'v8/test/test262/data': 'https://chromium.googlesource.com/external/github.com/tc39/test262.git@230f9fc5688ce76bfaa99aba5f680a159eaac9e2', + 'v8/test/test262/harness': 'https://chromium.googlesource.com/external/github.com/test262-utils/test262-harness-py.git@0f2acdd882c84cff43b9d60df7574a1901e2cdcd', + 'v8/test/wasm-js': 'https://chromium.googlesource.com/external/github.com/WebAssembly/spec.git@07fd6430f879d36928d179a62d9bdeed82286065', + 'v8/testing/gmock': 'https://chromium.googlesource.com/external/googlemock.git@0421b6f358139f02e102c9c332ce19a33faf75be', + 'v8/testing/gtest': 'https://chromium.googlesource.com/external/github.com/google/googletest.git@6f8a66431cb592dad629028a50b3dd418a408c87', + 'v8/third_party/icu': 'https://chromium.googlesource.com/chromium/deps/icu.git@c844075aa0f1758d04f9192825f1b1e7e607992e', + 'v8/third_party/instrumented_libraries': 'https://chromium.googlesource.com/chromium/src/third_party/instrumented_libraries.git@644afd349826cb68204226a16c38bde13abe9c3c', + 'v8/third_party/jinja2': 'https://chromium.googlesource.com/chromium/src/third_party/jinja2.git@d34383206fa42d52faa10bb9931d6d538f3a57e0', + 'v8/third_party/markupsafe': 'https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git@8f45f5cfa0009d2a70589bcda0349b8cb2b72783', + 'v8/tools/clang': 'https://chromium.googlesource.com/chromium/src/tools/clang.git@05f306039aa5029fa88768690e5c512097419f9d', + 'v8/tools/gyp': 'https://chromium.googlesource.com/external/gyp.git@eb296f67da078ec01f5e3a9ea9cdc6d26d680161', + 'v8/tools/swarming_client': 'https://chromium.googlesource.com/external/swarming.client.git@a941a089ff1000403078b74cb628eb430f07d271', + 'v8/buildtools/clang_format/script': 'https://chromium.googlesource.com/chromium/llvm-project/cfe/tools/clang-format.git@c09c8deeac31f05bd801995c475e7c8070f9ecda', + 'v8/buildtools/third_party/libc++/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxx.git@b1ece9c037d879843b0b0f5a2802e1e9d443b75a', + 'v8/buildtools/third_party/libc++abi/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxxabi.git@0edb61e2e581758fc4cd4cd09fc588b3fc91a653', +} diff --git a/vendor/depot_tools b/vendor/depot_tools index cfbb775..290f5f5 160000 --- a/vendor/depot_tools +++ b/vendor/depot_tools @@ -1 +1 @@ -Subproject commit cfbb775f9401c47dd78d521be52a3fcda34d449d +Subproject commit 290f5f566af895a1ac72b44e5439c2a878091c76 diff --git a/vendor/v8 b/vendor/v8 new file mode 160000 index 0000000..d96f5c4 --- /dev/null +++ b/vendor/v8 @@ -0,0 +1 @@ +Subproject commit d96f5c48c5f4885d3624198d0b58d05f6839b8d3