From 6a654d45598c2631f0009101a553fd14b866b62f Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Mon, 23 May 2011 22:06:54 +0000 Subject: 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 --- third_party/bzip2/bzip2.gyp | 4 ++-- third_party/expat/expat.gyp | 2 +- third_party/libevent/libevent.gyp | 2 +- third_party/libjingle/libjingle.gyp | 6 +++--- third_party/libjpeg/libjpeg.gyp | 4 ++-- third_party/libpng/libpng.gyp | 4 ++-- third_party/libxml/libxml.gyp | 7 +++---- third_party/libxslt/libxslt.gyp | 7 +++---- third_party/mesa/mesa.gyp | 2 +- third_party/npapi/npapi.gyp | 2 +- third_party/qcms/qcms.gyp | 2 +- third_party/snappy/snappy.gyp | 2 +- third_party/sqlite/sqlite.gyp | 8 ++++---- third_party/zlib/zlib.gyp | 4 ++-- 14 files changed, 27 insertions(+), 29 deletions(-) (limited to 'third_party') diff --git a/third_party/bzip2/bzip2.gyp b/third_party/bzip2/bzip2.gyp index b1548f9..ae31121 100644 --- a/third_party/bzip2/bzip2.gyp +++ b/third_party/bzip2/bzip2.gyp @@ -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, }], ], diff --git a/third_party/expat/expat.gyp b/third_party/expat/expat.gyp index 2d956e2..13fcae2 100644 --- a/third_party/expat/expat.gyp +++ b/third_party/expat/expat.gyp @@ -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': [ diff --git a/third_party/libevent/libevent.gyp b/third_party/libevent/libevent.gyp index ab732a2..01a5019 100644 --- a/third_party/libevent/libevent.gyp +++ b/third_party/libevent/libevent.gyp @@ -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' ] }], diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp index b78918d..f04091c 100644 --- a/third_party/libjingle/libjingle.gyp +++ b/third_party/libjingle/libjingle.gyp @@ -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', diff --git a/third_party/libjpeg/libjpeg.gyp b/third_party/libjpeg/libjpeg.gyp index e0f4f1d..9ca5b35f 100644 --- a/third_party/libjpeg/libjpeg.gyp +++ b/third_party/libjpeg/libjpeg.gyp @@ -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, }], ], diff --git a/third_party/libpng/libpng.gyp b/third_party/libpng/libpng.gyp index f565795..fdd3a57 100644 --- a/third_party/libpng/libpng.gyp +++ b/third_party/libpng/libpng.gyp @@ -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, }], ], diff --git a/third_party/libxml/libxml.gyp b/third_party/libxml/libxml.gyp index 2a1a6c8..85aeadc 100644 --- a/third_party/libxml/libxml.gyp +++ b/third_party/libxml/libxml.gyp @@ -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 @@ '