Make checking out Skia and V8 optional.

In the root DEPS file, add variables for controlling whether Skia and V8
get checked out or not. Then set the default values for these variables
based on where the variable checkout_configuration is set to 'minimal'
or not.

This allows PDFium embedders that just want the most basic build
configuration to avoid ~1 GB of unnecessary downloads.

Bug: pdfium:1852
Change-Id: I54a517e5e9ae196cdbd48347738d61ca8c748ec8
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/95571
Reviewed-by: Nigi <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/DEPS b/DEPS
index 8231826..6e607db 100644
--- a/DEPS
+++ b/DEPS
@@ -9,11 +9,18 @@
   # things are not strictly needed to build pdfium for development purposes,
   # by adding the following line to the .gclient file inside a solutions entry:
   #      "custom_vars": { "checkout_configuration": "small" },
+  # Similarly, this var can be set to 'minimal' to also skip the Skia and V8
+  # checkouts for the smallest possible checkout, where some features will not
+  # work.
   'checkout_configuration': 'default',
 
-  'checkout_instrumented_libraries': 'checkout_linux and checkout_configuration != "small"',
+  'checkout_instrumented_libraries': 'checkout_linux and checkout_configuration != "small" and checkout_configuration != "minimal"',
 
-  'checkout_testing_corpus': 'checkout_configuration != "small"',
+  'checkout_skia': 'checkout_configuration != "minimal"',
+
+  'checkout_testing_corpus': 'checkout_configuration != "small" and checkout_configuration != "minimal"',
+
+  'checkout_v8': 'checkout_configuration != "minimal"',
 
   # By default, download the fuchsia sdk from the public sdk directory.
   'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/gn/',
@@ -283,8 +290,10 @@
     Var('chromium_git') + '/chromium/deps/nasm.git@' +
         Var('nasm_source_revision'),
 
-  'third_party/skia':
-    Var('skia_git') + '/skia.git@' + Var('skia_revision'),
+  'third_party/skia': {
+    'url': Var('skia_git') + '/skia.git@' + Var('skia_revision'),
+    'condition': 'checkout_skia',
+  },
 
   'third_party/test_fonts':
     Var('chromium_git') + '/chromium/src/third_party/test_fonts.git@' +
@@ -350,8 +359,11 @@
     'condition': 'checkout_win',
   },
 
-  'v8':
-    Var('chromium_git') + '/v8/v8.git@' + Var('v8_revision'),
+  'v8': {
+    'url': Var('chromium_git') + '/v8/v8.git@' + Var('v8_revision'),
+    'condition': 'checkout_v8',
+  },
+
 }
 
 recursedeps = []