Skip to content

Commit

Permalink
Final gyp patch to make use of the new cross-platform POSIX defines t…
Browse files Browse the repository at this point in the history
…oolkit_uses_gtk, os_posix, and use_x11. For lists of source files that use a mix of POSIX and Gtk APIs, toolkit_uses_gtk was given precedence. Solaris was made to use ALSA also, as libasound has been ported to FreeBSD and Solaris as a wrapper around the native OSS.

Review URL: http://codereview.chromium.org/7055003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86352 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tony@chromium.org committed May 23, 2011
1 parent fcc2d5f commit 6a654d4
Show file tree
Hide file tree
Showing 30 changed files with 77 additions and 81 deletions.
4 changes: 2 additions & 2 deletions courgette/courgette.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
'../testing/gtest.gyp:gtest',
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'toolkit_uses_gtk == 1', {
'dependencies': [
# Workaround for gyp bug 69.
# Needed to handle the #include chain:
Expand All @@ -132,7 +132,7 @@
'../testing/gtest.gyp:gtest',
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'toolkit_uses_gtk == 1', {
'dependencies': [
# Workaround for gyp bug 69.
# Needed to handle the #include chain:
Expand Down
8 changes: 4 additions & 4 deletions crypto/crypto.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
4018,
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
[ 'os_posix == 1 and OS != "mac"', {
'conditions': [
[ 'chromeos==1', {
'sources/': [ ['include', '_chromeos\\.cc$'] ]
Expand All @@ -38,7 +38,7 @@
}
],
],
}, { # OS != "linux" and OS != "freebsd" and OS != "openbsd" and OS != "solaris"
}, { # os_posix != 1 or OS == "mac"
'sources/': [
['exclude', '_nss\.cc$'],
],
Expand Down Expand Up @@ -192,7 +192,7 @@
'../testing/gtest.gyp:gtest',
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
[ 'os_posix == 1 and OS != "mac"', {
'conditions': [
[ 'linux_use_tcmalloc==1', {
'dependencies': [
Expand All @@ -204,7 +204,7 @@
'dependencies': [
'../build/linux/system.gyp:nss',
],
}, { # OS != "linux" and OS != "freebsd" and OS != "openbsd" and OS != "solaris"
}, { # os_posix != 1 or OS == "mac"
'sources!': [
'rsa_private_key_nss_unittest.cc',
]
Expand Down
2 changes: 1 addition & 1 deletion gpu/demos/demos.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'framework/window.h',
],
'conditions': [
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': ['../../build/linux/system.gyp:gtk'],
}],
],
Expand Down
2 changes: 1 addition & 1 deletion gpu/gpu.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
'command_buffer/service/texture_manager.cc',
],
'conditions': [
['OS == "linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
Expand Down
6 changes: 3 additions & 3 deletions ipc/ipc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
['exclude', '/win_[^/]*\\.cc$'],
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {'sources/': [
['os_posix == 1 and OS != "mac"', {'sources/': [
['include', '_posix(_unittest)?\\.cc$'],
]}],
['OS=="mac"', {'sources/': [
Expand Down Expand Up @@ -58,12 +58,12 @@
'sync_socket_unittest.cc',
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
}],
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'conditions': [
['linux_use_tcmalloc==1', {
'dependencies': [
Expand Down
2 changes: 1 addition & 1 deletion jingle/jingle.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
'../third_party/libjingle/libjingle.gyp:libjingle',
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk'
],
Expand Down
18 changes: 9 additions & 9 deletions media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
'video/mft_h264_decode_engine.h',
],
}],
['OS=="linux" or OS=="freebsd"', {
['OS == "linux" or OS == "freebsd" or OS == "solaris"', {
'link_settings': {
'libraries': [
'-lasound',
Expand All @@ -228,7 +228,7 @@
'audio/openbsd/audio_manager_openbsd.h',
],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['os_posix == 1 and OS != "mac"', {
'sources': [
'filters/omx_video_decoder.cc',
'filters/omx_video_decoder.h',
Expand All @@ -237,7 +237,7 @@
'omx_wrapper',
]
}],
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'sources!': [
'video/capture/video_capture_device_dummy.cc',
'video/capture/video_capture_device_dummy.h',
Expand Down Expand Up @@ -310,7 +310,7 @@
'..',
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
'cflags': [
'-msse2',
],
Expand All @@ -337,7 +337,7 @@
'ffmpeg/ffmpeg_unittest.cc',
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
# Needed for the following #include chain:
# base/run_all_unittests.cc
Expand Down Expand Up @@ -422,7 +422,7 @@
'video/ffmpeg_video_decode_engine_unittest.cc',
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
# Needed for the following #include chain:
# base/run_all_unittests.cc
Expand Down Expand Up @@ -625,7 +625,7 @@
'tools/shader_bench/window.h',
],
'conditions': [
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
Expand Down Expand Up @@ -665,7 +665,7 @@
},
],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['os_posix == 1 and OS != "mac"', {
'targets': [
{
'target_name': 'omx_test',
Expand Down Expand Up @@ -697,7 +697,7 @@
'../testing/gtest.gyp:gtest',
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
Expand Down
12 changes: 6 additions & 6 deletions net/net.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@
],
},
],
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gconf',
'../build/linux/system.gyp:gdk',
Expand Down Expand Up @@ -995,7 +995,7 @@
'proxy/proxy_config_service_linux_unittest.cc',
],
}],
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
'../build/linux/system.gyp:nss',
Expand All @@ -1007,7 +1007,7 @@
],
}
],
[ 'OS == "linux"', {
[ 'os_posix == 1 and OS != "mac"', {
'conditions': [
['linux_use_tcmalloc==1', {
'dependencies': [
Expand Down Expand Up @@ -1171,7 +1171,7 @@
'../third_party/protobuf/protobuf.gyp:py_proto',
],
}],
['OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
['os_posix == 1 and OS != "mac"', {
'conditions': [
['use_openssl==1', {
'dependencies': [
Expand All @@ -1184,7 +1184,7 @@
}],
],
}],
['OS == "linux"', {
['os_posix == 1 and OS != "mac"', {
'conditions': [
['linux_use_tcmalloc==1', {
'dependencies': [
Expand Down Expand Up @@ -1292,7 +1292,7 @@
},
],
'conditions': [
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'targets': [
{
'target_name': 'flip_in_mem_edsm_server',
Expand Down
4 changes: 2 additions & 2 deletions net/third_party/nss/ssl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
'conditions': [
['sysroot!=""', {
'variables': {
Expand Down Expand Up @@ -105,7 +105,7 @@
],
},
],
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
'defines': [
# These macros are needed only for compiling the files in
# ssl/bodge.
Expand Down
2 changes: 1 addition & 1 deletion ppapi/ppapi.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# TODO(ajwong): For internal pepper plugins, which are statically linked
# into chrome, do we want to build w/o -fPIC? If so, how can we express
# that in the build system?
['OS=="linux" or OS=="openbsd" or OS=="freebsd" or OS=="solaris"', {
['os_posix == 1 and OS != "mac"', {
'cflags': ['-fPIC', '-fvisibility=hidden'],

# This is needed to make the Linux shlib build happy. Without this,
Expand Down
2 changes: 1 addition & 1 deletion ppapi/ppapi_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
],
},
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['os_posix == 1 and OS != "mac"', {
'product_name': 'ppapi_example',
'type': 'shared_library',
'cflags': ['-fvisibility=hidden'],
Expand Down
18 changes: 8 additions & 10 deletions printing/printing.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@
],
},
'conditions': [
['OS!="linux" and OS!="freebsd" and OS!="openbsd"',{
['toolkit_uses_gtk == 0',{
'sources/': [['exclude', '_cairo\\.cc$']]
}],
['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
}, { # else: OS=="win"
'sources/': [['exclude', '_posix\\.cc$']]
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['toolkit_uses_gtk == 1', {
'sources': [
'metafile_skia_wrapper.cc',
'metafile_skia_wrapper.h',
Expand Down Expand Up @@ -172,21 +172,19 @@
'units_unittest.cc',
],
'conditions': [
['OS!="linux"', {'sources/': [['exclude', '_cairo_unittest\\.cc$']]}],
['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_cairo_unittest\\.cc$']]}],
['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]
}, { # else: OS=="win"
'sources/': [['exclude', '_cairo_unittest\\.cc$']]
}
],
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
}],
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
'conditions': [
['linux_use_tcmalloc==1', {
['linux_use_tcmalloc == 1', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
12 changes: 6 additions & 6 deletions remoting/remoting.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'plugin_extension': 'plugin',
'plugin_prefix': '',
}],
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'plugin_extension': 'so',
'plugin_prefix': 'lib',
}],
Expand All @@ -46,7 +46,7 @@
},

'conditions': [
['OS=="linux" or OS=="mac"', {
['os_posix == 1', {
'targets': [
# Simple webserver for testing remoting client plugin.
{
Expand All @@ -60,7 +60,7 @@
}],

# TODO(hclam): Enable this target for mac.
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['use_x11 == 1', {

'targets': [
{
Expand Down Expand Up @@ -345,7 +345,7 @@
'host/user_authenticator_win.cc',
],
'conditions': [
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
Expand Down Expand Up @@ -575,7 +575,7 @@
'..',
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
'cflags': [
'-msse2',
],
Expand Down Expand Up @@ -670,7 +670,7 @@
'run_all_unittests.cc',
],
'conditions': [
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../app/app.gyp:app_base',
# Needed for the following #include chain:
Expand Down
2 changes: 1 addition & 1 deletion sandbox/sandbox.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
],
},
'conditions': [
[ 'OS=="freebsd" or OS=="openbsd"', {
[ 'os_posix == 1 and OS != "mac" and OS != "linux"', {
# GYP requires that each file have at least one target defined.
'targets': [
{
Expand Down
Loading

0 comments on commit 6a654d4

Please sign in to comment.