diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 00:20:29 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 00:20:29 +0000 |
commit | 944cab8c2053844039d0e44ddcdcc489ba2b1d6c (patch) | |
tree | 7a6ce5e91643a7054a6d0509951d8fa9c9007b06 /build/linux | |
parent | 74f50486fe54b57cb9ac2813aa97ff9e5dda4c94 (diff) | |
download | chromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.zip chromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.tar.gz chromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.tar.bz2 |
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
Diffstat (limited to 'build/linux')
-rw-r--r-- | build/linux/unbundle/bzip2.gyp | 22 | ||||
-rw-r--r-- | build/linux/unbundle/expat.gyp | 17 | ||||
-rw-r--r-- | build/linux/unbundle/jsoncpp.gyp | 39 | ||||
-rw-r--r-- | build/linux/unbundle/libevent.gyp | 27 | ||||
-rw-r--r-- | build/linux/unbundle/libjpeg.gyp | 29 | ||||
-rw-r--r-- | build/linux/unbundle/libpng.gyp | 38 | ||||
-rw-r--r-- | build/linux/unbundle/libusb.gyp | 34 | ||||
-rw-r--r-- | build/linux/unbundle/libwebp.gyp | 28 | ||||
-rw-r--r-- | build/linux/unbundle/libxml.gyp | 38 | ||||
-rw-r--r-- | build/linux/unbundle/libxslt.gyp | 25 | ||||
-rw-r--r-- | build/linux/unbundle/opus.gyp | 38 | ||||
-rw-r--r-- | build/linux/unbundle/re2.gyp | 37 | ||||
-rwxr-xr-x | build/linux/unbundle/replace_gyp_files.py | 14 | ||||
-rw-r--r-- | build/linux/unbundle/sqlite.gyp | 28 | ||||
-rw-r--r-- | build/linux/unbundle/zlib.gyp | 48 |
15 files changed, 462 insertions, 0 deletions
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': [ + '<!@(pkg-config --cflags libpng)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(pkg-config --libs-only-L --libs-only-other libpng)', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l libpng)', + ], + }, + 'variables': { + 'headers_root_path': '.', + 'header_filenames': [ + 'png.h', + 'pngconf.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + }, + ], +} diff --git a/build/linux/unbundle/libusb.gyp b/build/linux/unbundle/libusb.gyp new file mode 100644 index 0000000..1c18033 --- /dev/null +++ b/build/linux/unbundle/libusb.gyp @@ -0,0 +1,34 @@ +# 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': 'libusb', + 'type': 'none', + 'variables': { + 'headers_root_path': 'src/libusb', + 'header_filenames': [ + 'libusb.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + 'direct_dependent_settings': { + 'cflags': [ + '<!@(pkg-config --cflags libusb-1.0)', + ], + 'link_settings': { + 'ldflags': [ + '<!@(pkg-config --libs-only-L --libs-only-other libusb-1.0)', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l libusb-1.0)', + ], + }, + }, + }, + ], +} diff --git a/build/linux/unbundle/libwebp.gyp b/build/linux/unbundle/libwebp.gyp new file mode 100644 index 0000000..6dbce2e --- /dev/null +++ b/build/linux/unbundle/libwebp.gyp @@ -0,0 +1,28 @@ +# 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': 'libwebp', + 'type': 'none', + 'direct_dependent_settings': { + 'defines': [ + 'ENABLE_WEBP', + ], + }, + 'link_settings': { + 'libraries': [ + # Check for presence of webpdemux library, use it if present. + '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' + '--code "int main() { return 0; }" ' + '--run-linker ' + '--on-success "-lwebp -lwebpdemux" ' + '--on-failure "-lwebp" ' + '-- -lwebpdemux)', + ], + }, + } + ], +} diff --git a/build/linux/unbundle/libxml.gyp b/build/linux/unbundle/libxml.gyp new file mode 100644 index 0000000..bc4f9fc --- /dev/null +++ b/build/linux/unbundle/libxml.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': 'libxml', + 'type': 'static_library', + 'sources': [ + 'chromium/libxml_utils.h', + 'chromium/libxml_utils.cc', + ], + 'cflags': [ + '<!@(pkg-config --cflags libxml-2.0)', + ], + 'defines': [ + 'USE_SYSTEM_LIBXML', + ], + 'direct_dependent_settings': { + 'cflags': [ + '<!@(pkg-config --cflags libxml-2.0)', + ], + 'defines': [ + 'USE_SYSTEM_LIBXML', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(pkg-config --libs-only-L --libs-only-other libxml-2.0)', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l libxml-2.0)', + ], + }, + }, + ], +} diff --git a/build/linux/unbundle/libxslt.gyp b/build/linux/unbundle/libxslt.gyp new file mode 100644 index 0000000..f7f6bb9 --- /dev/null +++ b/build/linux/unbundle/libxslt.gyp @@ -0,0 +1,25 @@ +# 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': 'libxslt', + 'type': 'none', + 'direct_dependent_settings': { + 'cflags': [ + '<!@(pkg-config --cflags libxslt)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(pkg-config --libs-only-L --libs-only-other libxslt)', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l libxslt)', + ], + }, + }, + ], +} diff --git a/build/linux/unbundle/opus.gyp b/build/linux/unbundle/opus.gyp new file mode 100644 index 0000000..e8c30ba --- /dev/null +++ b/build/linux/unbundle/opus.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': 'opus', + 'type': 'none', + 'direct_dependent_settings': { + 'cflags': [ + '<!@(pkg-config --cflags opus)', + ], + }, + 'variables': { + 'headers_root_path': 'src/include', + 'header_filenames': [ + 'opus_custom.h', + 'opus_defines.h', + 'opus_multistream.h', + 'opus_types.h', + 'opus.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + 'link_settings': { + 'ldflags': [ + '<!@(pkg-config --libs-only-L --libs-only-other opus)', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l opus)', + ], + }, + }, + ], +} diff --git a/build/linux/unbundle/re2.gyp b/build/linux/unbundle/re2.gyp new file mode 100644 index 0000000..e2e567a --- /dev/null +++ b/build/linux/unbundle/re2.gyp @@ -0,0 +1,37 @@ +# 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': 're2', + 'type': 'none', + 'variables': { + 'headers_root_path': '.', + 'header_filenames': [ + 're2/filtered_re2.h', + 're2/re2.h', + 're2/set.h', + 're2/stringpiece.h', + 're2/variadic_function.h', + ], + 'shim_generator_additional_args': [ + # Chromium copy of re2 is patched to rename POSIX to POSIX_SYNTAX + # because of collision issues that break the build. + # Upstream refuses to make changes: + # http://code.google.com/p/re2/issues/detail?id=73 . + '--define', 'POSIX=POSIX_SYNTAX', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + 'link_settings': { + 'libraries': [ + '-lre2', + ], + }, + } + ], +} diff --git a/build/linux/unbundle/replace_gyp_files.py b/build/linux/unbundle/replace_gyp_files.py index bf29458..0a5f9fe 100755 --- a/build/linux/unbundle/replace_gyp_files.py +++ b/build/linux/unbundle/replace_gyp_files.py @@ -15,7 +15,21 @@ import sys REPLACEMENTS = { + 'use_system_bzip2': 'third_party/bzip2/bzip2.gyp', + 'use_system_expat': 'third_party/expat/expat.gyp', 'use_system_harfbuzz': 'third_party/harfbuzz-ng/harfbuzz.gyp', + 'use_system_jsoncpp': 'third_party/jsoncpp/jsoncpp.gyp', + 'use_system_libevent': 'third_party/libevent/libevent.gyp', + 'use_system_libjpeg': 'third_party/libjpeg/libjpeg.gyp', + 'use_system_libpng': 'third_party/libpng/libpng.gyp', + 'use_system_libusb': 'third_party/libusb/libusb.gyp', + 'use_system_libwebp': 'third_party/libwebp/libwebp.gyp', + 'use_system_libxml': 'third_party/libxml/libxml.gyp', + 'use_system_libxslt': 'third_party/libxslt/libxslt.gyp', + 'use_system_opus': 'third_party/opus/opus.gyp', + 'use_system_re2': 'third_party/re2/re2.gyp', + 'use_system_sqlite': 'third_party/sqlite/sqlite.gyp', + 'use_system_zlib': 'third_party/zlib/zlib.gyp', } diff --git a/build/linux/unbundle/sqlite.gyp b/build/linux/unbundle/sqlite.gyp new file mode 100644 index 0000000..918da92 --- /dev/null +++ b/build/linux/unbundle/sqlite.gyp @@ -0,0 +1,28 @@ +# 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': 'sqlite', + 'type': 'none', + 'direct_dependent_settings': { + 'cflags': [ + '<!@(pkg-config --cflags sqlite3)', + ], + 'defines': [ + 'USE_SYSTEM_SQLITE', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(pkg-config --libs-only-L --libs-only-other sqlite3)', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l sqlite3)', + ], + }, + }, + ], +} diff --git a/build/linux/unbundle/zlib.gyp b/build/linux/unbundle/zlib.gyp new file mode 100644 index 0000000..3992e2d --- /dev/null +++ b/build/linux/unbundle/zlib.gyp @@ -0,0 +1,48 @@ +# 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': 'zlib', + 'type': 'none', + 'variables': { + 'headers_root_path': '.', + 'header_filenames': [ + 'zlib.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + 'direct_dependent_settings': { + 'defines': [ + 'USE_SYSTEM_ZLIB', + ], + }, + 'link_settings': { + 'libraries': [ + '-lz', + ], + }, + }, + { + 'target_name': 'minizip', + 'type': 'static_library', + 'all_dependent_settings': { + 'defines': [ + 'USE_SYSTEM_MINIZIP', + ], + }, + 'defines': [ + 'USE_SYSTEM_MINIZIP', + ], + 'link_settings': { + 'libraries': [ + '-lminizip', + ], + }, + } + ], +} |