diff options
Diffstat (limited to 'patches/chromium/tools')
3 files changed, 95 insertions, 0 deletions
diff --git a/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch b/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch new file mode 100644 index 000000000..9da214cc2 --- /dev/null +++ b/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zeno Albisser <zeno.albisser@digia.com> +Date: Wed, 24 Jul 2013 15:54:50 +0200 +Subject: GRIT: Allow grd files outside of chromium source dir. + +When replacing substrings with values from a dictionary, +the replacements should not be truncated to the length of src_root_dir. + +If the basename does not exist as a key in the resource_ids file, +then fall back to an absolute path. + +The precedence is like: +file in chromium > file basename > absolute file name. + +THIS SHOULD BE UPSTREAMABLE. +--- + grit/node/misc.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/grit/node/misc.py b/grit/node/misc.py +index 734c57a..33848b2 100755 +--- a/grit/node/misc.py ++++ b/grit/node/misc.py +@@ -49,7 +49,7 @@ def _ReadFirstIdsFromFile(filename, defines): + def ReplaceVariable(matchobj): + for key, value in defines.iteritems(): + if matchobj.group(1) == key: +- value = os.path.abspath(value)[len(src_root_dir) + 1:] ++ value = os.path.abspath(value) + return value + return '' + +@@ -427,6 +427,10 @@ class GritNode(base.Node): + abs_filename = os.path.abspath(filename_or_stream) + if abs_filename[:len(src_root_dir)] != src_root_dir: + filename = os.path.basename(filename_or_stream) ++ # If the file is not within src_root_dir and the basename is not ++ # found as a key, fall back to using the absolute file name. ++ if not filename in first_ids: ++ filename = abs_filename + else: + filename = abs_filename[len(src_root_dir) + 1:] + filename = filename.replace('\\', '/') diff --git a/patches/chromium/tools/gyp/0001-Fix-build-with-toplevel-dir.patch b/patches/chromium/tools/gyp/0001-Fix-build-with-toplevel-dir.patch new file mode 100644 index 000000000..0ab2861ee --- /dev/null +++ b/patches/chromium/tools/gyp/0001-Fix-build-with-toplevel-dir.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Pierre Rossi <pierre.rossi@digia.com> +Date: Mon, 13 May 2013 16:25:46 +0200 +Subject: Fix build with toplevel-dir + +--- + pylib/gyp/generator/ninja.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py +index 9011807..6fe07c5 100644 +--- a/pylib/gyp/generator/ninja.py ++++ b/pylib/gyp/generator/ninja.py +@@ -1476,9 +1476,13 @@ def CalculateVariables(default_variables, params): + default_variables.setdefault('SHARED_LIB_SUFFIX', '.so') + default_variables.setdefault('SHARED_LIB_DIR', + os.path.join('$!PRODUCT_DIR', 'lib')) ++ # Take into account the fact that toplevel_dir might not be equal to depth ++ toplevel_offset = '' ++ if 'options' in params: ++ options = params['options'] ++ toplevel_offset = os.path.relpath(options.depth, options.toplevel_dir) + default_variables.setdefault('LIB_DIR', +- os.path.join('$!PRODUCT_DIR', 'obj')) +- ++ os.path.join('$!PRODUCT_DIR', 'obj', toplevel_offset)) + + def OpenOutput(path, mode='w'): + """Open |path| for writing, creating directories if necessary.""" diff --git a/patches/chromium/tools/gyp/0002-Add-support-for-libc-to-xcode_emulation.py.patch b/patches/chromium/tools/gyp/0002-Add-support-for-libc-to-xcode_emulation.py.patch new file mode 100644 index 000000000..d12bad22b --- /dev/null +++ b/patches/chromium/tools/gyp/0002-Add-support-for-libc-to-xcode_emulation.py.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zeno Albisser <zeno.albisser@digia.com> +Date: Thu, 27 Jun 2013 20:04:51 +0200 +Subject: Add support for libc++ to xcode_emulation.py + +--- + pylib/gyp/xcode_emulation.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py +index b4af0fd..fb40048 100644 +--- a/pylib/gyp/xcode_emulation.py ++++ b/pylib/gyp/xcode_emulation.py +@@ -580,6 +580,9 @@ class XcodeSettings(object): + for ldflag in self._Settings().get('OTHER_LDFLAGS', []): + ldflags.append(self._MapLinkerFlagFilename(ldflag, gyp_to_build_path)) + ++ if self._Test('USE_LIBCPP', 'YES', default='NO'): ++ ldflags.append('-stdlib=libc++') ++ + if self._Test('DEAD_CODE_STRIPPING', 'YES', default='NO'): + ldflags.append('-Wl,-dead_strip') + |