From 944cab8c2053844039d0e44ddcdcc489ba2b1d6c Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Fri, 26 Apr 2013 00:20:29 +0000 Subject: Extract use_system_foo logic out of gyp files, patch 2 This removes use_system_foo logic completely from: * jsoncpp.gyp * libevent.gyp * libpng.gyp * libusb.gyp * libwebp.gyp * opus.gyp * re2.gyp * zlib.gyp R=rsleevi TBR=darin BUG=226860 Review URL: https://codereview.chromium.org/14203006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196551 0039d316-1c4b-4281-b951-d872f2087c98 --- build/linux/unbundle/bzip2.gyp | 22 ++ build/linux/unbundle/expat.gyp | 17 + build/linux/unbundle/jsoncpp.gyp | 39 ++ build/linux/unbundle/libevent.gyp | 27 ++ build/linux/unbundle/libjpeg.gyp | 29 ++ build/linux/unbundle/libpng.gyp | 38 ++ build/linux/unbundle/libusb.gyp | 34 ++ build/linux/unbundle/libwebp.gyp | 28 ++ build/linux/unbundle/libxml.gyp | 38 ++ build/linux/unbundle/libxslt.gyp | 25 ++ build/linux/unbundle/opus.gyp | 38 ++ build/linux/unbundle/re2.gyp | 37 ++ build/linux/unbundle/replace_gyp_files.py | 14 + build/linux/unbundle/sqlite.gyp | 28 ++ build/linux/unbundle/zlib.gyp | 48 +++ third_party/jsoncpp/jsoncpp.gyp | 107 ++---- third_party/libevent/libevent.gyp | 129 +++---- third_party/libpng/libpng.gyp | 189 ++++------ third_party/libusb/libusb.gyp | 137 +++---- third_party/libwebp/libwebp.gyp | 292 +++++++-------- third_party/opus/opus.gyp | 600 ++++++++++++++---------------- third_party/re2/re2.gyp | 187 ++++------ third_party/zlib/zlib.gyp | 193 ++++------ 23 files changed, 1218 insertions(+), 1078 deletions(-) create mode 100644 build/linux/unbundle/bzip2.gyp create mode 100644 build/linux/unbundle/expat.gyp create mode 100644 build/linux/unbundle/jsoncpp.gyp create mode 100644 build/linux/unbundle/libevent.gyp create mode 100644 build/linux/unbundle/libjpeg.gyp create mode 100644 build/linux/unbundle/libpng.gyp create mode 100644 build/linux/unbundle/libusb.gyp create mode 100644 build/linux/unbundle/libwebp.gyp create mode 100644 build/linux/unbundle/libxml.gyp create mode 100644 build/linux/unbundle/libxslt.gyp create mode 100644 build/linux/unbundle/opus.gyp create mode 100644 build/linux/unbundle/re2.gyp create mode 100644 build/linux/unbundle/sqlite.gyp create mode 100644 build/linux/unbundle/zlib.gyp diff --git a/build/linux/unbundle/bzip2.gyp b/build/linux/unbundle/bzip2.gyp new file mode 100644 index 0000000..ddcf509 --- /dev/null +++ b/build/linux/unbundle/bzip2.gyp @@ -0,0 +1,22 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'bzip2', + 'type': 'none', + 'direct_dependent_settings': { + 'defines': [ + 'USE_SYSTEM_LIBBZ2', + ], + }, + 'link_settings': { + 'libraries': [ + '-lbz2', + ], + }, + }, + ], +} diff --git a/build/linux/unbundle/expat.gyp b/build/linux/unbundle/expat.gyp new file mode 100644 index 0000000..030fb85 --- /dev/null +++ b/build/linux/unbundle/expat.gyp @@ -0,0 +1,17 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'expat', + 'type': 'none', + 'link_settings': { + 'libraries': [ + '-lexpat', + ], + }, + }, + ], +} diff --git a/build/linux/unbundle/jsoncpp.gyp b/build/linux/unbundle/jsoncpp.gyp new file mode 100644 index 0000000..c397f64 --- /dev/null +++ b/build/linux/unbundle/jsoncpp.gyp @@ -0,0 +1,39 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'jsoncpp', + 'type': 'none', + 'variables': { + 'headers_root_path': 'source/include', + 'header_filenames': [ + 'json/assertions.h', + 'json/autolink.h', + 'json/config.h', + 'json/features.h', + 'json/forwards.h', + 'json/json.h', + 'json/reader.h', + 'json/value.h', + 'json/writer.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '/usr/include/jsoncpp', + ], + }, + 'link_settings': { + 'libraries': [ + '-ljsoncpp', + ], + }, + } + ], +} diff --git a/build/linux/unbundle/libevent.gyp b/build/linux/unbundle/libevent.gyp new file mode 100644 index 0000000..99d7435 --- /dev/null +++ b/build/linux/unbundle/libevent.gyp @@ -0,0 +1,27 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'libevent', + 'type': 'none', + 'toolsets': ['host', 'target'], + 'variables': { + 'headers_root_path': '.', + 'header_filenames': [ + 'event.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + 'link_settings': { + 'libraries': [ + '-levent', + ], + }, + } + ], +} diff --git a/build/linux/unbundle/libjpeg.gyp b/build/linux/unbundle/libjpeg.gyp new file mode 100644 index 0000000..f56e7aa --- /dev/null +++ b/build/linux/unbundle/libjpeg.gyp @@ -0,0 +1,29 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'libjpeg', + 'type': 'none', + 'direct_dependent_settings': { + 'defines': [ + 'USE_SYSTEM_LIBJPEG', + ], + 'conditions': [ + ['os_bsd==1', { + 'include_dirs': [ + '/usr/local/include', + ], + }], + ], + }, + 'link_settings': { + 'libraries': [ + '-ljpeg', + ], + }, + } + ], +} diff --git a/build/linux/unbundle/libpng.gyp b/build/linux/unbundle/libpng.gyp new file mode 100644 index 0000000..d6933fc --- /dev/null +++ b/build/linux/unbundle/libpng.gyp @@ -0,0 +1,38 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'libpng', + 'type': 'none', + 'dependencies': [ + '../zlib/zlib.gyp:zlib', + ], + 'direct_dependent_settings': { + 'cflags': [ + '