diff options
-rw-r--r-- | DEPS | 13 | ||||
-rwxr-xr-x | chrome/chrome_tests.gypi | 3 | ||||
-rw-r--r-- | third_party/swig/LICENSE | 95 | ||||
-rw-r--r-- | third_party/swig/README.chromium | 15 | ||||
-rwxr-xr-x | tools/swig/swig.py | 36 |
5 files changed, 161 insertions, 1 deletions
@@ -5,6 +5,7 @@ vars = { "ffmpeg_revision": "34297", "skia_revision": "475", "chromium_git": "http://src.chromium.org/git", + "swig_revision": "37274", } deps = { @@ -98,6 +99,9 @@ deps = { "src/chrome/test/data/layout_tests/LayoutTests/websocket/tests/workers": Var("webkit_trunk") + "/LayoutTests/websocket/tests/workers@" + Var("webkit_revision"), + + "src/third_party/swig/Lib": + "/trunk/deps/third_party/swig/Lib@" + Var("swig_revision"), } @@ -131,6 +135,9 @@ deps_os = { # NSS, for SSLClientSocketNSS. "src/third_party/nss": "/trunk/deps/third_party/nss@36871", + + "src/third_party/swig/win": + "/trunk/deps/third_party/swig/win@" + Var("swig_revision"), }, "mac": { "src/chrome/tools/test/reference_build/chrome_mac": @@ -160,6 +167,9 @@ deps_os = { "src/third_party/ffmpeg/binaries/chromium/mac/ia32_dbg": "/trunk/deps/third_party/ffmpeg/binaries/mac_dbg@" + Var("ffmpeg_revision"), + + "src/third_party/swig/mac": + "/trunk/deps/third_party/swig/mac@" + Var("swig_revision"), }, "unix": { # Linux, really. @@ -189,6 +199,9 @@ deps_os = { "src/third_party/ffmpeg/binaries/chromium/linux/x64_dbg": "/trunk/deps/third_party/ffmpeg/binaries/linux_64_dbg@" + Var("ffmpeg_revision"), + + "src/third_party/swig/linux": + "/trunk/deps/third_party/swig/linux@" + Var("swig_revision"), }, } diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 0986369..01fe769 100755 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1857,7 +1857,8 @@ '<(INTERMEDIATE_DIR)/pyautolib_wrap.cc', '<(PRODUCT_DIR)/pyautolib.py', ], - 'action': [ 'swig', + 'action': [ 'python', + '../tools/swig/swig.py', '-python', '-c++', '-outdir', diff --git a/third_party/swig/LICENSE b/third_party/swig/LICENSE new file mode 100644 index 0000000..fdb73d9 --- /dev/null +++ b/third_party/swig/LICENSE @@ -0,0 +1,95 @@ +SWIG is distributed under the following terms: + +I. + +Copyright (c) 1995-1998 +The University of Utah and the Regents of the University of California +All Rights Reserved + +Permission is hereby granted, without written agreement and without +license or royalty fees, to use, copy, modify, and distribute this +software and its documentation for any purpose, provided that +(1) The above copyright notice and the following two paragraphs +appear in all copies of the source code and (2) redistributions +including binaries reproduces these notices in the supporting +documentation. Substantial modifications to this software may be +copyrighted by their authors and need not follow the licensing terms +described here, provided that the new terms are clearly indicated in +all files where they apply. + +IN NO EVENT SHALL THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, THE +UNIVERSITY OF UTAH OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY +PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, +EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + +THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, AND THE UNIVERSITY OF UTAH +SPECIFICALLY DISCLAIM ANY WARRANTIES,INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND +THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, +SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + + +II. + +This software includes contributions that are Copyright (c) 1998-2005 +University of Chicago. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. Redistributions +in binary form must reproduce the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. Neither the name of +the University of Chicago nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF CHICAGO AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF +CHICAGO OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +III. + +This software includes contributions that are Copyright (c) 2005-2006 +Arizona Board of Regents (University of Arizona). +All Rights Reserved + +Permission is hereby granted, without written agreement and without +license or royalty fees, to use, copy, modify, and distribute this +software and its documentation for any purpose, provided that +(1) The above copyright notice and the following two paragraphs +appear in all copies of the source code and (2) redistributions +including binaries reproduces these notices in the supporting +documentation. Substantial modifications to this software may be +copyrighted by their authors and need not follow the licensing terms +described here, provided that the new terms are clearly indicated in +all files where they apply. + +THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF ARIZONA AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF +ARIZONA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/third_party/swig/README.chromium b/third_party/swig/README.chromium new file mode 100644 index 0000000..7e17203 --- /dev/null +++ b/third_party/swig/README.chromium @@ -0,0 +1,15 @@ +URL: http://www.swig.org/download.html +Version: 1.3.40 +License: BSD +License File: LICENSE + +Description: +Simplified Wrapper and Interface Generator (SWIG) is an interface compiler +that connects programs written in C and C++ with scripting languages such as +Perl, Python, Ruby, and Tcl. It works by taking the declarations found in +C/C++ header files and using them to generate the wrapper code that scripting +languages need to access the underlying C/C++ code. + +Local Modifications: +Removed all non-python bindings from Lib/. + diff --git a/tools/swig/swig.py b/tools/swig/swig.py new file mode 100755 index 0000000..332ec2a --- /dev/null +++ b/tools/swig/swig.py @@ -0,0 +1,36 @@ +#!/usr/bin/python + +# Copyright (c) 2010 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. + +"""Wrapper around swig. + +Sets the SWIG_LIB environment var to point to Lib dir +and defers control to the platform-specific swig binary. + +Depends on swig binaries being available at ../../third_party/swig. +""" + +import os +import sys + + +def main(): + swig_dir = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), + os.pardir, os.pardir, 'third_party', 'swig')) + lib_dir = os.path.join(swig_dir, "Lib") + os.putenv("SWIG_LIB", lib_dir) + dir_map = { + 'darwin': 'mac', + 'linux2': 'linux', + 'win32': 'win', + 'cygwin': 'win', + } + swig_bin = os.path.join(swig_dir, dir_map[sys.platform], 'swig') + os.execv(swig_bin, [swig_bin] + sys.argv[1:]) + + +if __name__ == "__main__": + main() + |