summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xthird_party/instrumented_libraries/download_build_install.py11
-rw-r--r--third_party/instrumented_libraries/instrumented_libraries.gyp25
-rwxr-xr-xthird_party/instrumented_libraries/libcups2.sh9
-rwxr-xr-xthird_party/instrumented_libraries/libfontconfig.sh8
-rwxr-xr-xthird_party/instrumented_libraries/libnspr4.sh8
-rwxr-xr-xthird_party/instrumented_libraries/nss.sh8
-rw-r--r--third_party/instrumented_libraries/patches/libcups2.diff (renamed from third_party/instrumented_libraries/libcups2.diff)0
-rw-r--r--third_party/instrumented_libraries/patches/libfontconfig.diff (renamed from third_party/instrumented_libraries/libfontconfig.diff)0
-rw-r--r--third_party/instrumented_libraries/patches/libgdk-pixbuf2.0-0.diff (renamed from third_party/instrumented_libraries/libgdk-pixbuf2.0-0.diff)0
-rw-r--r--third_party/instrumented_libraries/patches/libgtk2.0-0.diff (renamed from third_party/instrumented_libraries/libgtk2.0-0.diff)0
-rw-r--r--third_party/instrumented_libraries/patches/nss.diff (renamed from third_party/instrumented_libraries/nss.diff)0
-rw-r--r--third_party/instrumented_libraries/patches/pulseaudio.diff (renamed from third_party/instrumented_libraries/pulseaudio.diff)0
-rw-r--r--third_party/instrumented_libraries/patches/zlib1g.diff (renamed from third_party/instrumented_libraries/zlib1g.diff)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/freetype.sh (renamed from third_party/instrumented_libraries/freetype.sh)2
-rwxr-xr-xthird_party/instrumented_libraries/scripts/libasound2.sh (renamed from third_party/instrumented_libraries/libasound2.sh)2
-rwxr-xr-xthird_party/instrumented_libraries/scripts/libgdk-pixbuf2.0-0.sh (renamed from third_party/instrumented_libraries/libgdk-pixbuf2.0-0.sh)1
-rwxr-xr-xthird_party/instrumented_libraries/scripts/libgtk2.0-0.sh (renamed from third_party/instrumented_libraries/libgtk2.0-0.sh)1
-rwxr-xr-xthird_party/instrumented_libraries/scripts/libnspr4.sh (renamed from third_party/instrumented_libraries/zlib1g.sh)4
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pulseaudio.sh (renamed from third_party/instrumented_libraries/pulseaudio.sh)5
-rw-r--r--third_party/instrumented_libraries/standard_instrumented_package_target.gypi15
20 files changed, 43 insertions, 56 deletions
diff --git a/third_party/instrumented_libraries/download_build_install.py b/third_party/instrumented_libraries/download_build_install.py
index 1135ee3..ce31c4a 100755
--- a/third_party/instrumented_libraries/download_build_install.py
+++ b/third_party/instrumented_libraries/download_build_install.py
@@ -286,6 +286,12 @@ def download_build_install(parsed_arguments):
'a package %s' % parsed_arguments.package))
with ScopedChangeDirectory(subdirectories[0]):
# Here we are in the package directory.
+ if parsed_arguments.patch:
+ shell_call(
+ 'patch -p1 -i %s/%s' %
+ (os.path.relpath(cd_package.old_path),
+ parsed_arguments.patch),
+ parsed_arguments.verbose)
if parsed_arguments.run_before_build:
shell_call(
'%s/%s' %
@@ -330,8 +336,9 @@ def main():
argument_parser.add_argument('--check-build-deps', action='store_true')
argument_parser.add_argument('--cc')
argument_parser.add_argument('--cxx')
- # This should be a shell script to run before building specific libraries
- # e.g. extracting archives with sources, patching makefiles, etc.
+ argument_parser.add_argument('--patch', default='')
+ # This should be a shell script to run before building specific libraries.
+ # This will be run after applying the patch above.
argument_parser.add_argument('--run-before-build', default='')
argument_parser.add_argument('--build-method', default='destdir')
argument_parser.add_argument('--sanitizer-blacklist', default='')
diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp
index 479d7db..7ab04c1 100644
--- a/third_party/instrumented_libraries/instrumented_libraries.gyp
+++ b/third_party/instrumented_libraries/instrumented_libraries.gyp
@@ -46,6 +46,7 @@
# $ character in a way that would work for every package.
'-Wl,-R,XORIGIN/.'
],
+ 'patch': '',
'run_before_build': '',
'conditions': [
@@ -176,7 +177,7 @@
{
'package_name': 'freetype',
'dependencies=': [],
- 'run_before_build': 'freetype.sh',
+ 'run_before_build': 'scripts/freetype.sh',
'includes': ['standard_instrumented_package_target.gypi'],
},
{
@@ -223,7 +224,7 @@
# From debian/rules.
'--with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts',
],
- 'run_before_build': 'libfontconfig.sh',
+ 'patch': 'patches/libfontconfig.diff',
'includes': ['standard_instrumented_package_target.gypi'],
},
{
@@ -255,7 +256,7 @@
# TSan reports data races on debug variables.
'--disable-debug',
],
- 'run_before_build': 'libnspr4.sh',
+ 'run_before_build': 'scripts/libnspr4.sh',
'includes': ['standard_instrumented_package_target.gypi'],
},
{
@@ -371,7 +372,7 @@
{
'package_name': 'zlib1g',
'dependencies=': [],
- 'run_before_build': 'zlib1g.sh',
+ 'patch': 'patches/zlib1g.diff',
'includes': ['standard_instrumented_package_target.gypi'],
},
{
@@ -379,7 +380,7 @@
'dependencies=': [
'<(_sanitizer_type)-libnspr4',
],
- 'run_before_build': 'nss.sh',
+ 'patch': 'patches/nss.diff',
'build_method': 'custom_nss',
'includes': ['standard_instrumented_package_target.gypi'],
},
@@ -388,20 +389,21 @@
'dependencies=': [
'<(_sanitizer_type)-libdbus-1-3',
],
- 'run_before_build': 'pulseaudio.sh',
+ 'patch': 'patches/pulseaudio.diff',
+ 'run_before_build': 'scripts/pulseaudio.sh',
'jobs': 1,
'includes': ['standard_instrumented_package_target.gypi'],
},
{
'package_name': 'libasound2',
'dependencies=': [],
- 'run_before_build': 'libasound2.sh',
+ 'run_before_build': 'scripts/libasound2.sh',
'includes': ['standard_instrumented_package_target.gypi'],
},
{
'package_name': 'libcups2',
'dependencies=': [],
- 'run_before_build': 'libcups2.sh',
+ 'patch': 'patches/libcups2.diff',
'jobs': 1,
'extra_configure_flags': [
# All from debian/rules.
@@ -487,7 +489,8 @@
'--with-xinput=yes',
],
'dependencies=': [],
- 'run_before_build': 'libgtk2.0-0.sh',
+ 'patch': 'patches/libgtk2.0-0.diff',
+ 'run_before_build': 'scripts/libgtk2.0-0.sh',
'includes': ['standard_instrumented_package_target.gypi'],
},
{
@@ -500,7 +503,8 @@
'--disable-introspection',
],
'dependencies=': [],
- 'run_before_build': 'libgdk-pixbuf2.0-0.sh',
+ 'patch': 'patches/libgdk-pixbuf2.0-0.diff',
+ 'run_before_build': 'scripts/libgdk-pixbuf2.0-0.sh',
'includes': ['standard_instrumented_package_target.gypi'],
},
{
@@ -553,6 +557,7 @@
],
'dependencies=': [],
'build_method': 'custom_libappindicator1',
+ 'jobs': 1,
'includes': ['standard_instrumented_package_target.gypi'],
},
{
diff --git a/third_party/instrumented_libraries/libcups2.sh b/third_party/instrumented_libraries/libcups2.sh
deleted file mode 100755
index e614cfb..0000000
--- a/third_party/instrumented_libraries/libcups2.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This script does some preparations before build of instrumented libcups2.
-
-# Disable problematic assembly in clang builds.
-patch -p1 < $(dirname ${BASH_SOURCE[0]})/libcups2.diff
diff --git a/third_party/instrumented_libraries/libfontconfig.sh b/third_party/instrumented_libraries/libfontconfig.sh
deleted file mode 100755
index 7f58edf..0000000
--- a/third_party/instrumented_libraries/libfontconfig.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This script does some preparations before build of instrumented libfontconfig.
-
-patch -p1 < $(dirname ${BASH_SOURCE[0]})/libfontconfig.diff
diff --git a/third_party/instrumented_libraries/libnspr4.sh b/third_party/instrumented_libraries/libnspr4.sh
deleted file mode 100755
index bd52eab..0000000
--- a/third_party/instrumented_libraries/libnspr4.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This script does some preparations before build of instrumented libnspr4.
-
-mv mozilla/nsprpub/* .
diff --git a/third_party/instrumented_libraries/nss.sh b/third_party/instrumented_libraries/nss.sh
deleted file mode 100755
index 7522f68..0000000
--- a/third_party/instrumented_libraries/nss.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This script does some preparations before build of instrumented nss.
-
-patch -p1 < $(dirname ${BASH_SOURCE[0]})/nss.diff
diff --git a/third_party/instrumented_libraries/libcups2.diff b/third_party/instrumented_libraries/patches/libcups2.diff
index 49b262f..49b262f 100644
--- a/third_party/instrumented_libraries/libcups2.diff
+++ b/third_party/instrumented_libraries/patches/libcups2.diff
diff --git a/third_party/instrumented_libraries/libfontconfig.diff b/third_party/instrumented_libraries/patches/libfontconfig.diff
index 19f85f7..19f85f7 100644
--- a/third_party/instrumented_libraries/libfontconfig.diff
+++ b/third_party/instrumented_libraries/patches/libfontconfig.diff
diff --git a/third_party/instrumented_libraries/libgdk-pixbuf2.0-0.diff b/third_party/instrumented_libraries/patches/libgdk-pixbuf2.0-0.diff
index 5bc3963..5bc3963 100644
--- a/third_party/instrumented_libraries/libgdk-pixbuf2.0-0.diff
+++ b/third_party/instrumented_libraries/patches/libgdk-pixbuf2.0-0.diff
diff --git a/third_party/instrumented_libraries/libgtk2.0-0.diff b/third_party/instrumented_libraries/patches/libgtk2.0-0.diff
index 71a0224..71a0224 100644
--- a/third_party/instrumented_libraries/libgtk2.0-0.diff
+++ b/third_party/instrumented_libraries/patches/libgtk2.0-0.diff
diff --git a/third_party/instrumented_libraries/nss.diff b/third_party/instrumented_libraries/patches/nss.diff
index 24adde7..24adde7 100644
--- a/third_party/instrumented_libraries/nss.diff
+++ b/third_party/instrumented_libraries/patches/nss.diff
diff --git a/third_party/instrumented_libraries/pulseaudio.diff b/third_party/instrumented_libraries/patches/pulseaudio.diff
index fc2ca0d..fc2ca0d 100644
--- a/third_party/instrumented_libraries/pulseaudio.diff
+++ b/third_party/instrumented_libraries/patches/pulseaudio.diff
diff --git a/third_party/instrumented_libraries/zlib1g.diff b/third_party/instrumented_libraries/patches/zlib1g.diff
index 18a6a33..18a6a33 100644
--- a/third_party/instrumented_libraries/zlib1g.diff
+++ b/third_party/instrumented_libraries/patches/zlib1g.diff
diff --git a/third_party/instrumented_libraries/freetype.sh b/third_party/instrumented_libraries/scripts/freetype.sh
index 2355dc0..2a3ac3f 100755
--- a/third_party/instrumented_libraries/freetype.sh
+++ b/third_party/instrumented_libraries/scripts/freetype.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2013 The Chromium Authors. All rights reserved.
+# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/third_party/instrumented_libraries/libasound2.sh b/third_party/instrumented_libraries/scripts/libasound2.sh
index 0d1e609..78ea02d 100755
--- a/third_party/instrumented_libraries/libasound2.sh
+++ b/third_party/instrumented_libraries/scripts/libasound2.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2013 The Chromium Authors. All rights reserved.
+# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/third_party/instrumented_libraries/libgdk-pixbuf2.0-0.sh b/third_party/instrumented_libraries/scripts/libgdk-pixbuf2.0-0.sh
index ddeea37..e143344 100755
--- a/third_party/instrumented_libraries/libgdk-pixbuf2.0-0.sh
+++ b/third_party/instrumented_libraries/scripts/libgdk-pixbuf2.0-0.sh
@@ -5,5 +5,4 @@
# This script does some preparations before build of instrumented libgdk-pixbuf2.0-0.
-patch -p1 < $(dirname ${BASH_SOURCE[0]})/libgdk-pixbuf2.0-0.diff
autoreconf
diff --git a/third_party/instrumented_libraries/libgtk2.0-0.sh b/third_party/instrumented_libraries/scripts/libgtk2.0-0.sh
index 938959f..e3c7360 100755
--- a/third_party/instrumented_libraries/libgtk2.0-0.sh
+++ b/third_party/instrumented_libraries/scripts/libgtk2.0-0.sh
@@ -5,5 +5,4 @@
# This script does some preparations before build of instrumented libgtk2.0-0.
-patch -p1 < $(dirname ${BASH_SOURCE[0]})/libgtk2.0-0.diff
autoreconf
diff --git a/third_party/instrumented_libraries/zlib1g.sh b/third_party/instrumented_libraries/scripts/libnspr4.sh
index 85cdc7b..9ca669c 100755
--- a/third_party/instrumented_libraries/zlib1g.sh
+++ b/third_party/instrumented_libraries/scripts/libnspr4.sh
@@ -3,6 +3,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# This script does some preparations before build of instrumented zlib1g.
+# This script does some preparations before build of instrumented libnspr4.
-patch -p1 < $(dirname ${BASH_SOURCE[0]})/zlib1g.diff
+mv mozilla/nsprpub/* .
diff --git a/third_party/instrumented_libraries/pulseaudio.sh b/third_party/instrumented_libraries/scripts/pulseaudio.sh
index 8e4c0e2..da9aa66 100755
--- a/third_party/instrumented_libraries/pulseaudio.sh
+++ b/third_party/instrumented_libraries/scripts/pulseaudio.sh
@@ -1,12 +1,9 @@
#!/bin/bash
-# Copyright 2013 The Chromium Authors. All rights reserved.
+# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script does some preparations before build of instrumented pulseaudio.
-# Disable problematic assembly in clang builds.
-patch -p1 < $(dirname ${BASH_SOURCE[0]})/pulseaudio.diff
-
# The configure script enforces FORTIFY_SOURCE=2, but we can't live with that.
sed -i "s/-D_FORTIFY_SOURCE=2/-U_FORTIFY_SOURCE/g" ./configure
diff --git a/third_party/instrumented_libraries/standard_instrumented_package_target.gypi b/third_party/instrumented_libraries/standard_instrumented_package_target.gypi
index 83b1edd..195adab 100644
--- a/third_party/instrumented_libraries/standard_instrumented_package_target.gypi
+++ b/third_party/instrumented_libraries/standard_instrumented_package_target.gypi
@@ -27,6 +27,7 @@
'--extra-configure-flags=>(_extra_configure_flags)',
'--cflags=>(_package_cflags)',
'--ldflags=>(_package_ldflags)',
+ '--patch=>(_patch)',
'--run-before-build=>(_run_before_build)',
'--cc=<(_cc)',
'--cxx=<(_cxx)',
@@ -40,7 +41,19 @@
'--verbose',
],
}],
- ]
+ ],
+ 'target_conditions': [
+ ['">(_patch)"!=""', {
+ 'inputs+': [
+ '>(_patch)',
+ ],
+ }],
+ ['">(_run_before_build)"!=""', {
+ 'inputs+': [
+ '>(_run_before_build)',
+ ],
+ }],
+ ],
},
],
}