From 9e1d5a2a8ab99faaa0f195869afd6afe7c247398 Mon Sep 17 00:00:00 2001
From: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Date: Mon, 3 Mar 2014 15:25:35 +0100
Subject: [PATCH] Override path for perl, bison and gperf on Windows

Use these dependencies from environment. No need to include them
in the snapshot.

Change-Id: I81623cc15e8c1e9431c5569985c90a4fbac638e7
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
---
 ...deable-path-for-perl-gperf-and-bison.patch | 26 +++++++++++++++++++
 src/core/gyp_run.pro                          |  3 +++
 2 files changed, 29 insertions(+)
 create mode 100644 patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch

diff --git a/patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch b/patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch
new file mode 100644
index 000000000..f636afc4c
--- /dev/null
+++ b/patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Zoltan Arvai <zarvai@inf.u-szeged.hu>
+Date: Mon, 3 Mar 2014 14:18:12 +0100
+Subject: [PATCH] Overrideable path for perl, gperf and bison.
+
+---
+ Source/core/core.gypi |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Source/core/core.gypi b/Source/core/core.gypi
+index 3cd07aa..77879bb 100644
+--- a/Source/core/core.gypi
++++ b/Source/core/core.gypi
+@@ -3879,9 +3879,9 @@
+             ['OS=="win"', {
+                 # Using native perl rather than cygwin perl cuts execution time
+                 # of idl preprocessing rules by a bit more than 50%.
+-                'perl_exe': '<(DEPTH)/third_party/perl/perl/bin/perl.exe',
+-                'gperf_exe': '<(DEPTH)/third_party/gperf/bin/gperf.exe',
+-                'bison_exe': '<(DEPTH)/third_party/bison/bin/bison.exe',
++                'perl_exe%': '<(DEPTH)/third_party/perl/perl/bin/perl.exe',
++                'gperf_exe%': '<(DEPTH)/third_party/gperf/bin/gperf.exe',
++                'bison_exe%': '<(DEPTH)/third_party/bison/bin/bison.exe',
+                 # Using cl instead of cygwin gcc cuts the processing time from
+                 # 1m58s to 0m52s.
+                 'preprocessor': '--preprocessor "cl.exe -nologo -EP -TP"',
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 782859818..830844fe8 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -62,6 +62,9 @@ win32 {
 # Libvpx build needs additional search path on Windows.
 git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
 GYP_ARGS += "-D qtwe_chromium_obj_dir=\"$$getOutDir()/$$getConfigDir()/obj/$$git_chromium_src_dir\""
+
+# Use path from environment for perl, bison and gperf instead of values set in WebKit's core.gypi.
+GYP_ARGS += "-D perl_exe=\"perl.exe\" -D bison_exe=\"bison.exe\" -D gperf_exe=\"gperf.exe\""
 }
 
 !build_pass {
-- 
GitLab