summaryrefslogtreecommitdiffstats
path: root/build/linux
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 23:13:26 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 23:13:26 +0000
commit9d384037786ac2912d2ffc82cd1718d8383d8d9f (patch)
treefc85e1d240d0b31c1dd488fcb1723133290d8291 /build/linux
parente66eaf0cc9fe5c6c17ffee01fc2d370270b9e07f (diff)
downloadchromium_src-9d384037786ac2912d2ffc82cd1718d8383d8d9f.zip
chromium_src-9d384037786ac2912d2ffc82cd1718d8383d8d9f.tar.gz
chromium_src-9d384037786ac2912d2ffc82cd1718d8383d8d9f.tar.bz2
Update the gyp Linux build:
* Add Linux settings to target_defaults in common.gypi so gyp-generated SConscript files no longer depend on build/SConscript.main or the Hammer infrastructure. * Copy the FilterOut() function from Hammer to the chromium_builders.py Tool module. * Add a ChromiumLoadableModule() builder to chromium_builders.py. * Add dependencies on the 'views' library to the chrome link (target 'app'). * Add missing views/*/*_unittest.cc modules to the 'unit_tests' target. Exclude all but the one that builds on Linux from the non-Windows builds. * Crib a list of chrome/views files to exclude from the Linux build from the old SCons configuration. * Add a new build/linux/system.gyp file with new 'settings' targets to encapsulate the pkg-config checks for gtk+-2.0, nss and pangoft2. * Add depenedencies in the other targets on the new gtk, nss and pangoft2 'settings' targets from build/linux/system.gyp. * Add a pkg_config_wrapper.py script that keeps gyp happy by simply exiting 0 if the package isn't found. * DEPS roll for latest gyp changes to support the above. Review URL: http://codereview.chromium.org/42340 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/linux')
-rw-r--r--build/linux/pkg_config_wrapper.py30
-rw-r--r--build/linux/system.gyp50
2 files changed, 80 insertions, 0 deletions
diff --git a/build/linux/pkg_config_wrapper.py b/build/linux/pkg_config_wrapper.py
new file mode 100644
index 0000000..3060340
--- /dev/null
+++ b/build/linux/pkg_config_wrapper.py
@@ -0,0 +1,30 @@
+#!/bin/env python
+# Copyright (c) 2009 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.
+
+__doc__ = """
+Wrapper script for executing pkg-config with the arguments supplied
+on the command line and suppressing the exit status and error output
+when the error is simply that the specified package isn't installed.
+"""
+
+import sys
+import subprocess
+
+p = subprocess.Popen(['pkg-config'] + sys.argv[1:],
+ stderr=subprocess.PIPE)
+(stdout, stderr) = p.communicate()
+
+exit_status = p.wait()
+
+if exit_status == 1:
+ import re
+ if re.search('No package.*found', stderr):
+ # Exit status of 1 with a presumably "normal" not found message.
+ # Just swallow the "error."
+ sys.exit(0)
+
+sys.stderr.write(stderr)
+
+sys.exit(exit_status)
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
new file mode 100644
index 0000000..c9452bd
--- /dev/null
+++ b/build/linux/system.gyp
@@ -0,0 +1,50 @@
+# Copyright (c) 2009 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'gtk',
+ 'type': 'settings',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(python ../build/linux/pkg_config_wrapper.py --cflags gtk+-2.0)',
+ ],
+ },
+ 'link_settings': {
+ 'libraries': [
+ '<!@(python ../build/linux/pkg_config_wrapper.py --libs gtk+-2.0)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'nss',
+ 'type': 'settings',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(python ../build/linux/pkg_config_wrapper.py --cflags nss)',
+ ],
+ },
+ 'link_settings': {
+ 'libraries': [
+ '<!@(python ../build/linux/pkg_config_wrapper.py --libs nss)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'pangoft2',
+ 'type': 'settings',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(python ../build/linux/pkg_config_wrapper.py --cflags pangoft2)',
+ ],
+ },
+ 'link_settings': {
+ 'libraries': [
+ '<!@(python ../build/linux/pkg_config_wrapper.py --libs pangoft2)',
+ ],
+ },
+ },
+ ],
+}