0

Final gyp patch to make use of the new cross-platform POSIX defines toolkit_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
This commit is contained in:
tony@chromium.org
2011-05-23 22:06:54 +00:00
parent fcc2d5f0e4
commit 6a654d4559
30 changed files with 77 additions and 81 deletions

@ -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:
@ -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:

@ -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$'] ]
@ -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$'],
],
@ -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': [
@ -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',
]

@ -52,7 +52,7 @@
'framework/window.h',
],
'conditions': [
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': ['../../build/linux/system.gyp:gtk'],
}],
],

@ -230,7 +230,7 @@
'command_buffer/service/texture_manager.cc',
],
'conditions': [
['OS == "linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],

@ -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/': [
@ -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': [

@ -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'
],

@ -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',
@ -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',
@ -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',
@ -310,7 +310,7 @@
'..',
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
'cflags': [
'-msse2',
],
@ -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
@ -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
@ -625,7 +625,7 @@
'tools/shader_bench/window.h',
],
'conditions': [
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
@ -665,7 +665,7 @@
},
],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['os_posix == 1 and OS != "mac"', {
'targets': [
{
'target_name': 'omx_test',
@ -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',
],

@ -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',
@ -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',
@ -1007,7 +1007,7 @@
],
}
],
[ 'OS == "linux"', {
[ 'os_posix == 1 and OS != "mac"', {
'conditions': [
['linux_use_tcmalloc==1', {
'dependencies': [
@ -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': [
@ -1184,7 +1184,7 @@
}],
],
}],
['OS == "linux"', {
['os_posix == 1 and OS != "mac"', {
'conditions': [
['linux_use_tcmalloc==1', {
'dependencies': [
@ -1292,7 +1292,7 @@
},
],
'conditions': [
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'targets': [
{
'target_name': 'flip_in_mem_edsm_server',

@ -4,7 +4,7 @@
{
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
'conditions': [
['sysroot!=""', {
'variables': {
@ -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.

@ -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,

@ -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'],

@ -89,7 +89,7 @@
],
},
'conditions': [
['OS!="linux" and OS!="freebsd" and OS!="openbsd"',{
['toolkit_uses_gtk == 0',{
'sources/': [['exclude', '_cairo\\.cc$']]
}],
['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
@ -97,7 +97,7 @@
}, { # 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',
@ -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',
],

@ -21,7 +21,7 @@
'plugin_extension': 'plugin',
'plugin_prefix': '',
}],
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'plugin_extension': 'so',
'plugin_prefix': 'lib',
}],
@ -46,7 +46,7 @@
},
'conditions': [
['OS=="linux" or OS=="mac"', {
['os_posix == 1', {
'targets': [
# Simple webserver for testing remoting client plugin.
{
@ -60,7 +60,7 @@
}],
# TODO(hclam): Enable this target for mac.
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['use_x11 == 1', {
'targets': [
{
@ -345,7 +345,7 @@
'host/user_authenticator_win.cc',
],
'conditions': [
['OS=="linux"', {
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
@ -575,7 +575,7 @@
'..',
],
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
'cflags': [
'-msse2',
],
@ -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:

@ -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': [
{

@ -724,7 +724,7 @@
['exclude', '_mac\\.(cc|cpp|mm?)$'],
['exclude', '/mac/'] ],
}],
[ 'OS != "linux" and OS != "freebsd" and OS != "openbsd" and OS != "solaris"', {
[ 'toolkit_uses_gtk == 0', {
'sources/': [ ['exclude', '_(linux|gtk)\\.(cc|cpp)$'] ],
'sources!': [
'../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
@ -760,7 +760,7 @@
'SK_RESTRICT=',
],
}],
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
[ 'toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gdk',
'../build/linux/system.gyp:fontconfig',
@ -891,7 +891,7 @@
'../third_party/skia/src/core',
],
'conditions': [
[ '(OS == "linux" or OS == "freebsd" or OS == "openbsd") and target_arch != "arm"', {
[ 'os_posix == 1 and OS != "mac" and target_arch != "arm"', {
'cflags': [
'-msse2',
],

@ -62,7 +62,7 @@
],
},
}],
['OS == "mac" or OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
['os_posix == 1', {
'defines': [
# gtest isn't able to figure out when RTTI is disabled for gcc
# versions older than 4.3.2, and assumes it's enabled. Our Mac

@ -5,10 +5,10 @@
{
'variables': {
'conditions': [
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
# Link to system .so since we already use it due to GTK.
'use_system_bzip2%': 1,
}, { # OS!="linux"
}, { # os_posix != 1 or OS == "mac"
'use_system_bzip2%': 0,
}],
],

@ -15,7 +15,7 @@
]
},
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['os_posix == 1 and OS != "mac"', {
# On Linux, we implicitly already depend on expat via fontconfig;
# let's not pull it in twice.
'targets': [

@ -50,7 +50,7 @@
],
},
}],
[ 'OS == "mac" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
[ 'OS == "mac" or OS == "freebsd" or OS == "openbsd"', {
'sources': [ 'kqueue.c' ],
'include_dirs': [ 'mac' ]
}],

@ -72,7 +72,7 @@
'OSX',
],
}],
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd"', {
['os_posix == 1', {
'defines': [
'POSIX',
],
@ -116,7 +116,7 @@
'OSX',
],
}],
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd"', {
['os_posix == 1', {
'defines': [
'POSIX',
],
@ -324,7 +324,7 @@
'source/talk/base/winping.h',
],
}],
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd"', {
['os_posix == 1', {
'sources': [
'source/talk/base/sslstreamadapter.cc',
'source/talk/base/sslstreamadapter.h',

@ -5,10 +5,10 @@
{
'variables': {
'conditions': [
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
# Link to system .so since we already use it due to GTK.
'use_system_libjpeg%': 1,
}, { # OS!="linux" and OS!="freebsd" and OS!="openbsd"
}, { # os_posix != 1 or OS == "mac"
'use_system_libjpeg%': 0,
}],
],

@ -5,10 +5,10 @@
{
'variables': {
'conditions': [
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[ 'os_posix == 1 and OS != "mac"', {
# Link to system .so since we already use it due to GTK.
'use_system_libpng%': 1,
}, { # OS!="linux" and OS!="freebsd" and OS!="openbsd"
}, { # os_posix != 1 or OS == "mac"
'use_system_libpng%': 0,
}],
],

@ -7,7 +7,7 @@
'conditions': [
# Define an "os_include" variable that points at the OS-specific generated
# headers. These were generated by running the configure script offline.
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['os_posix == 1 and OS != "mac"', {
'os_include': 'linux'
}],
['OS=="mac"', {'os_include': 'mac'}],
@ -19,8 +19,7 @@
{
'target_name': 'libxml',
'conditions': [
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") '
'and use_system_libxml', {
['os_posix == 1 and OS != "mac" and use_system_libxml', {
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
@ -38,7 +37,7 @@
'<!@(pkg-config --libs-only-l libxml-2.0)',
],
},
}, { # else: OS != "linux" or ! use_system_libxml
}, { # else: os_posix != 1 or OS == "mac" or ! use_system_libxml
'type': 'static_library',
'msvs_guid': 'F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7',
'sources': [

@ -5,7 +5,7 @@
{
'variables': {
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['os_posix == 1 and OS != "mac"', {
'os_include': 'linux'
}],
['OS=="mac"', {'os_include': 'mac'}],
@ -21,8 +21,7 @@
{
'target_name': 'libxslt',
'conditions': [
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") '
'and use_system_libxml', {
['os_posix == 1 and OS != "mac" and use_system_libxml', {
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
@ -37,7 +36,7 @@
'<!@(pkg-config --libs-only-l libxslt)',
],
},
}, { # else: OS != "linux" or ! use_system_libxml
}, { # else: os_posix != 1 or OS == "mac" or ! use_system_libxml
'type': 'static_library',
'msvs_guid': 'FC0E1FD0-5DD7-4041-A1C9-CD3C376E4EED',
'sources': [

@ -19,7 +19,7 @@
'HAVE_STRNLEN',
],
}],
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'cflags': [
'-fPIC',
],

@ -26,7 +26,7 @@
'bindings/npruntime.h',
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
['use_x11 == 1', {
'sources': [
'bindings/npapi_x11.h',
],

@ -23,7 +23,7 @@
],
},
'conditions': [
['OS=="linux" and (branding=="Chrome" or disable_sse2==1)', {
['os_posix == 1 and OS != "mac" and (branding == "Chrome" or disable_sse2 == 1)', {
'sources/': [
['exclude', 'transform-sse1.c'],
['exclude', 'transform-sse2.c'],

@ -7,7 +7,7 @@
'conditions': [
# Define an "os_include" variable that points at the OS-specific generated
# headers. These were generated by running the configure script offline.
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
['os_posix == 1 and OS != "mac"', {
'os_include': 'linux'
}],
['OS=="mac"', {'os_include': 'mac'}],

@ -41,7 +41,7 @@
],
},
}],
['(OS=="linux" or OS=="freebsd" or OS=="openbsd") and use_system_sqlite', {
['os_posix == 1 and OS != "mac" and use_system_sqlite', {
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
@ -64,7 +64,7 @@
'<!@(pkg-config --libs-only-l sqlite3)',
],
},
}, { # else: OS != "linux" or ! use_system_sqlite
}, { # else: os_posix == 1 or OS == "mac" or ! use_system_sqlite
'product_name': 'sqlite3',
'type': 'static_library',
'msvs_guid': '6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9',
@ -110,7 +110,7 @@
4018, 4244,
],
'conditions': [
['OS=="linux"', {
['os_posix == 1 and OS != "mac"', {
'cflags': [
# SQLite doesn't believe in compiler warnings,
# preferring testing.
@ -125,7 +125,7 @@
},
],
'conditions': [
['(OS=="linux" or OS=="freebsd" or OS=="openbsd") and not use_system_sqlite', {
['os_posix == 1 and OS != "mac" and not use_system_sqlite', {
'targets': [
{
'target_name': 'sqlite_shell',

@ -5,12 +5,12 @@
{
'variables': {
'conditions': [
[ 'OS=="linux" or OS=="freebsd"', {
[ 'os_posix == 1 and OS != "mac" and OS != "openbsd"', {
# Link to system .so since we already use it due to GTK.
# TODO(pvalchev): OpenBSD is purposefully left out, as the system
# zlib brings up an incompatibility that breaks rendering.
'use_system_zlib%': 1,
}, { # OS!="linux" and OS!="freebsd"
}, { # os_posix != 1 or OS == "mac" or OS == "openbsd"
'use_system_zlib%': 0,
}],
],