From 1181b31e472bb1f24b9ded751a26f3309af366dc Mon Sep 17 00:00:00 2001 From: "wu@webrtc.org" Date: Tue, 21 Feb 2012 23:44:42 +0000 Subject: [PATCH] Pull chromium version of libjingle and webrtc and build peerconnection sample server and client. Review URL: https://webrtc-codereview.appspot.com/399001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1739 4adac7df-926f-26a2-2b94-8c16560cd09d --- peerconnection/DEPS | 119 +++ peerconnection/OWNERS | 5 + peerconnection/README | 10 + peerconnection/peerconnection.gyp | 113 +++ .../third_party/libjingle/libjingle.gyp | 698 ++++++++++++++++++ 5 files changed, 945 insertions(+) create mode 100644 peerconnection/OWNERS create mode 100644 peerconnection/README create mode 100644 peerconnection/peerconnection.gyp create mode 100644 peerconnection/third_party/libjingle/libjingle.gyp diff --git a/peerconnection/DEPS b/peerconnection/DEPS index e45052bf08..7f1e4fe6b7 100644 --- a/peerconnection/DEPS +++ b/peerconnection/DEPS @@ -4,10 +4,129 @@ vars = { "googlecode_url": "http://%s.googlecode.com/svn", "chromium_trunk" : "http://src.chromium.org/svn/trunk", "chromium_revision": "120526", + "webrtc_revision": "1538", + "libjingle_revision": "115", } # NOTE: Prefer revision numbers to tags for svn deps. Use http rather than # https; the latter can cause problems for users behind proxies. deps = { + # WebRTC deps. + "trunk/src": + (Var("googlecode_url") % "webrtc") + "/trunk/src@" + Var("webrtc_revision"), + + "trunk/tools": + (Var("googlecode_url") % "webrtc") + "/trunk/tools@" + Var("webrtc_revision"), + + "trunk/test": + (Var("googlecode_url") % "webrtc") + "/trunk/test@" + Var("webrtc_revision"), + + "trunk/third_party/google-gflags": + (Var("googlecode_url") % "webrtc") + "/trunk/third_party/google-gflags@" + Var("webrtc_revision"), + + "trunk/third_party/libvpx": + (Var("googlecode_url") % "webrtc") + "/trunk/third_party/libvpx@" + Var("webrtc_revision"), + + "trunk/build": + Var("chromium_trunk") + "/src/build@" + Var("chromium_revision"), + + "trunk/testing": + Var("chromium_trunk") + "/src/testing@" + Var("chromium_revision"), + + "trunk/testing/gtest": + (Var("googlecode_url") % "googletest") + "/trunk@573", + + "trunk/testing/gmock": + (Var("googlecode_url") % "googlemock") + "/trunk@386", + + "trunk/tools/gyp": + (Var("googlecode_url") % "gyp") + "/trunk@1187", + + # Needed by build/common.gypi. + "trunk/tools/win/supalink": + Var("chromium_trunk") + "/src/tools/win/supalink@" + Var("chromium_revision"), + + "trunk/tools/clang/scripts": + Var("chromium_trunk") + "/src/tools/clang/scripts@" + Var("chromium_revision"), + + "trunk/tools/python": + Var("chromium_trunk") + "/src/tools/python@" + Var("chromium_revision"), + + "trunk/tools/valgrind": + Var("chromium_trunk") + "/src/tools/valgrind@" + Var("chromium_revision"), + + "trunk/third_party/protobuf/": + Var("chromium_trunk") + "/src/third_party/protobuf@" + Var("chromium_revision"), + + "trunk/third_party/libvpx/source/libvpx": + "http://git.chromium.org/webm/libvpx.git@e479379a", + + "trunk/third_party/libjpeg_turbo/": + Var("chromium_trunk") + "/deps/third_party/libjpeg_turbo@119959", + + "trunk/third_party/libjpeg/": + Var("chromium_trunk") + "/src/third_party/libjpeg@" + Var("chromium_revision"), + + "trunk/third_party/yasm/": + Var("chromium_trunk") + "/src/third_party/yasm@" + Var("chromium_revision"), + + "trunk/third_party/expat/": + Var("chromium_trunk") + "/src/third_party/expat@" + Var("chromium_revision"), + + "trunk/third_party/google-gflags/src": + (Var("googlecode_url") % "google-gflags") + "/trunk/src@45", + + "trunk/third_party/yasm/source/patched-yasm": + Var("chromium_trunk") + "/deps/third_party/yasm/patched-yasm@73761", + + # Used by libjpeg-turbo + "trunk/third_party/yasm/binaries": + Var("chromium_trunk") + "/deps/third_party/yasm/binaries@74228", + + # TODO(andrew): roll to 164 after fixing: + # http://code.google.com/p/webrtc/issues/detail?id=267 + "trunk/third_party/libyuv": + (Var("googlecode_url") % "libyuv") + "/trunk@121", + + # libjingle deps. + "trunk/third_party/libjingle/source": + (Var("googlecode_url") % "libjingle") + "/trunk/@" + Var("libjingle_revision"), + + "trunk/third_party/libsrtp/": + Var("chromium_trunk") + "/deps/third_party/libsrtp@119742", + + "trunk/third_party/jsoncpp/": + Var("chromium_trunk") + "/src/third_party/jsoncpp@" + Var("chromium_revision"), + + "trunk/third_party/jsoncpp/source": + "http://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/jsoncpp@248", } +deps_os = { + "win": { + "trunk/third_party/cygwin/": + Var("chromium_trunk") + "/deps/third_party/cygwin@66844", + } +} + +hooks = [ + { + # Create a supplement.gypi file under trunk/. This file will be picked up + # by gyp and we use it to set Chromium related variables (inside_chromium_build) + # to 0 and enable the standalone build. + "pattern": ".", + "action": ["python", "trunk/tools/create_supplement_gypi.py", "trunk/src/supplement.gypi"], + }, + { + # Pull clang on mac. If nothing changed, or on non-mac platforms, this takes + # zero seconds to run. If something changed, it downloads a prebuilt clang. + "pattern": ".", + "action": ["python", "trunk/tools/clang/scripts/update.py", "--mac-only"], + }, + { + # A change to a .gyp, .gypi, or to GYP itself should run the generator. + "pattern": ".", + "action": ["python", "trunk/build/gyp_chromium", "--depth=trunk", "trunk/peerconnection.gyp"], + }, +] + diff --git a/peerconnection/OWNERS b/peerconnection/OWNERS new file mode 100644 index 0000000000..1527445ec7 --- /dev/null +++ b/peerconnection/OWNERS @@ -0,0 +1,5 @@ +henrike@webrtc.org +mallinath@webrtc.org +perkj@webrtc.org +wu@webrtc.org +tommi@webrtc.org diff --git a/peerconnection/README b/peerconnection/README new file mode 100644 index 0000000000..bfe123429f --- /dev/null +++ b/peerconnection/README @@ -0,0 +1,10 @@ +This folder can be used to pull together the chromium version of webrtc +and libjingle, and build the peerconnection sample client and server. + +Follow the instructions for WebRTC here: +http://www.webrtc.org/reference/getting-started + +but substitute this "gclient config" command: +gclient config --name trunk +http://webrtc.googlecode.com/svn/trunk/peerconnection + diff --git a/peerconnection/peerconnection.gyp b/peerconnection/peerconnection.gyp new file mode 100644 index 0000000000..e928194d26 --- /dev/null +++ b/peerconnection/peerconnection.gyp @@ -0,0 +1,113 @@ +# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +{ + 'includes': [ 'src/build/common.gypi', ], + 'variables': { + 'peerconnection_sample': 'third_party/libjingle/source/talk/examples/peerconnection', + }, + + 'targets': [ + { + 'target_name': 'peerconnection_server', + 'type': 'executable', + 'sources': [ + '<(peerconnection_sample)/server/data_socket.cc', + '<(peerconnection_sample)/server/data_socket.h', + '<(peerconnection_sample)/server/main.cc', + '<(peerconnection_sample)/server/peer_channel.cc', + '<(peerconnection_sample)/server/peer_channel.h', + '<(peerconnection_sample)/server/utils.cc', + '<(peerconnection_sample)/server/utils.h', + ], + 'include_dirs': [ + 'third_party/libjingle/source', + ], + }, + ], + 'conditions': [ + ['OS=="win"', { + 'targets': [ + { + 'target_name': 'peerconnection_client', + 'type': 'executable', + 'sources': [ + '<(peerconnection_sample)/client/conductor.cc', + '<(peerconnection_sample)/client/conductor.h', + '<(peerconnection_sample)/client/defaults.cc', + '<(peerconnection_sample)/client/defaults.h', + '<(peerconnection_sample)/client/main.cc', + '<(peerconnection_sample)/client/main_wnd.cc', + '<(peerconnection_sample)/client/main_wnd.h', + '<(peerconnection_sample)/client/peer_connection_client.cc', + '<(peerconnection_sample)/client/peer_connection_client.h', + 'third_party/libjingle/source/talk/base/win32socketinit.cc', + 'third_party/libjingle/source/talk/base/win32socketserver.cc', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '2', # Windows + }, + }, + 'dependencies': [ + 'third_party/libjingle/libjingle.gyp:libjingle_app', + ], + 'include_dirs': [ + 'src', + 'src/modules/interface', + 'third_party/libjingle/source', + ], + }, + ], # targets + }, ], # OS="win" + ['OS=="linux"', { + 'targets': [ + { + 'target_name': 'peerconnection_client', + 'type': 'executable', + 'sources': [ + '<(peerconnection_sample)/client/conductor.cc', + '<(peerconnection_sample)/client/conductor.h', + '<(peerconnection_sample)/client/defaults.cc', + '<(peerconnection_sample)/client/defaults.h', + '<(peerconnection_sample)/client/linux/main.cc', + '<(peerconnection_sample)/client/linux/main_wnd.cc', + '<(peerconnection_sample)/client/linux/main_wnd.h', + '<(peerconnection_sample)/client/peer_connection_client.cc', + '<(peerconnection_sample)/client/peer_connection_client.h', + ], + 'dependencies': [ + 'third_party/libjingle/libjingle.gyp:libjingle_app', + # TODO(tommi): Switch to this and remove specific gtk dependency + # sections below for cflags and link_settings. + # '<(DEPTH)/build/linux/system.gyp:gtk', + ], + 'include_dirs': [ + 'src', + 'src/modules/interface', + 'third_party/libjingle/source', + ], + 'cflags': [ + '