Permalink
Browse files

Replace gclient/DEPS with git sub-modules.

With this CL, we check out dependent third party source code by using
git sub-modules rather than gclient/DEPS, which allows us to drop
hard dependency on gclient when checking out and building Mozc.

Although some prebuilt binaries in gclient are still useful for some
platforms, in principle OSS Mozc no longer depends on gclient.

This is a clean-up of source checking out process.  Build artifacts
should not be affected with this change.

BUG=
TEST=unittest
REF_BUG=
REF_CL=
  • Loading branch information...
1 parent 03c3155 commit 276fa5c362e68771b840dd5925317e310d6d75ff @yukawa yukawa committed Sep 19, 2015
View
@@ -0,0 +1,27 @@
+[submodule "src/third_party/breakpad"]
+ path = src/third_party/breakpad
+ url = https://chromium.googlesource.com/breakpad/breakpad
+[submodule "src/third_party/fontTools"]
+ path = src/third_party/fontTools
+ url = https://github.com/googlei18n/fonttools.git
+[submodule "src/third_party/gmock"]
+ path = src/third_party/gmock
+ url = https://github.com/google/googlemock.git
+[submodule "src/third_party/gtest"]
+ path = src/third_party/gtest
+ url = https://github.com/google/googletest.git
+[submodule "src/third_party/gyp"]
+ path = src/third_party/gyp
+ url = https://chromium.googlesource.com/external/gyp
+[submodule "src/third_party/japanese_usage_dictionary"]
+ path = src/third_party/japanese_usage_dictionary
+ url = https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git
+[submodule "src/third_party/jsoncpp"]
+ path = src/third_party/jsoncpp
+ url = https://github.com/open-source-parsers/jsoncpp.git
+[submodule "src/third_party/protobuf"]
+ path = src/third_party/protobuf
+ url = https://github.com/google/protobuf.git
+[submodule "src/third_party/zinnia"]
+ path = src/third_party/zinnia
+ url = https://github.com/taku910/zinnia.git
View
@@ -33,23 +33,7 @@ os:
language: objective-c
install:
- - git submodule add https://github.com/open-source-parsers/jsoncpp.git src/third_party/jsoncpp
- - git -C src/third_party/jsoncpp checkout 11086dd6a7eba04289944367ca82cea71299ed70
- - git submodule add https://github.com/google/googlemock.git src/third_party/gmock
- - git -C src/third_party/gmock checkout d478a1f46d51ac2baa3f3b3896139897f24dc2d1
- - git submodule add https://github.com/google/googletest.git src/third_party/gtest
- - git -C src/third_party/gtest checkout 1d53731f2c210557caab5660dbe2c578dce6114f
- - git submodule add https://chromium.googlesource.com/external/gyp src/third_party/gyp
- - git -C src/third_party/gyp checkout cdf037c1edc0ba3b5d25f8e3973661efe00980cc
- - git submodule add https://github.com/google/protobuf.git src/third_party/protobuf
- - git -C src/third_party/protobuf checkout 172019c40bf548908ab09bfd276074c929d48415
- - git submodule add https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git src/third_party/japanese_usage_dictionary
- - git -C src/third_party/japanese_usage_dictionary checkout e5b3425575734c323e1d947009dd74709437b684
- - git submodule add https://github.com/googlei18n/fonttools.git src/third_party/fontTools
- - git -C src/third_party/fontTools checkout 5ba7d98a4153fad57258fca23b0bcb238717aec3
- - git submodule add https://github.com/taku910/zinnia.git src/third_party/zinnia
- - git -C src/third_party/zinnia checkout 44dddcf96c0970a806d666030295706f45cbd045
- - git submodule add https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools
+ - git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- export PATH="$PATH":`pwd`/src/third_party/depot_tools
script:
View
@@ -34,26 +34,8 @@ clone_folder: c:\projects\mozc
init:
- git config --global core.autocrlf input
install:
-- git -C src\third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
-- set PATH=%PATH%;c:\projects\mozc\src\third_party\depot_tools
-- gclient
-- gclient
-- git submodule add https://github.com/open-source-parsers/jsoncpp.git src/third_party/jsoncpp
-- git -C src/third_party/jsoncpp checkout 11086dd6a7eba04289944367ca82cea71299ed70
-- git submodule add https://github.com/google/googlemock.git src/third_party/gmock
-- git -C src/third_party/gmock checkout d478a1f46d51ac2baa3f3b3896139897f24dc2d1
-- git submodule add https://github.com/google/googletest.git src/third_party/gtest
-- git -C src/third_party/gtest checkout 1d53731f2c210557caab5660dbe2c578dce6114f
-- git submodule add https://chromium.googlesource.com/external/gyp src/third_party/gyp
-- git -C src/third_party/gyp checkout cdf037c1edc0ba3b5d25f8e3973661efe00980cc
-- git submodule add https://github.com/google/protobuf.git src/third_party/protobuf
-- git -C src/third_party/protobuf checkout 172019c40bf548908ab09bfd276074c929d48415
-- git submodule add https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git src/third_party/japanese_usage_dictionary
-- git -C src/third_party/japanese_usage_dictionary checkout e5b3425575734c323e1d947009dd74709437b684
-- git submodule add https://chromium.googlesource.com/breakpad/breakpad src/third_party/breakpad
-- git -C src/third_party/breakpad checkout d2904bb42181bc32c17b26ac4a0604c0e57473cc
-- git submodule add https://github.com/taku910/zinnia.git src/third_party/zinnia
-- git -C src/third_party/zinnia checkout 44dddcf96c0970a806d666030295706f45cbd045
+- git submodule update --init --recursive
+- choco install ninja -version 1.6.0
build_script:
- python src\build_mozc.py gyp --noqt
- ninja -C src\out_win\Release mozc_cache_service mozc_renderer mozc_ime mozc_tip32 mozc_broker32 rewriter composer
@@ -29,15 +29,6 @@ sudo docker run --interactive --tty --rm $USER/mozc_fedora21
### Hint
Don't forget to rebuild Docker container when Dockerfile is updated.
-### Update the source tree
-If Dockerfile is not updated but GitHub Mozc repository is updated, you can fetch the latest source code as follows.
-
-```
-cd ../
-gclient sync
-cd src/
-```
-
# Build in the container
Before explaining detailed build configurations and options, let's walk through the simplest cases to see how it looks like.
@@ -8,43 +8,25 @@ We only support OS X 10.7 or later intel only.
# Software Requirements
Building on Mac requires the following software.
+
* Xcode
+ * [Ninja](https://github.com/martine/ninja)
If you don't need to run gui tools like about dialog, config dialog, or dictionary tool, you can omit installing Qt. Candidate window still shows without Qt. See below for the detailed information.
# Get the Code
-First, you'll need to download the gclient depot tool, and add depot\_tools to your PATH.
-
-```
-cd ~/
-git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
-export PATH=`pwd`/depot_tools:"$PATH"
-```
-
-Then, download the Mozc code from its SVN repository with the gclient command:
+You can download Mozc source code as follows:
```
-mkdir -p ~/work/mozc
-cd ~/work/mozc
-gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
-gclient sync
+mkdir -p ~/work
+cd ~/work
+git clone https://github.com/google/mozc.git --recursive
```
-This will also download source code of other programs such as googletest and Protocol Buffers.
-Update to the latest revision
-
-Execute the following command to update to the latest revision.
-
-```
-gclient sync
-```
-
-Updating the tree sometimes causes a mysterious build error. Try "build\_mozc.py clean" if it occurs.
-
# Compilation
-First, you'll need to generate Xcode project using a tool called GYP, which is automatically downloaded by "gclient sync":
+First, you'll need to generate Xcode project using a tool called [GYP](https://chromium.googlesource.com/external/gyp).
```
cd ~/work/mozc/src
@@ -13,36 +13,34 @@ Building Mozc on Windows requires the following software.
* (optinal) [Qt libraries](http://download.qt.io/archive/qt/)
* Commercial version and LGPL version are available.
-# Get the Code
+# Get dependent prebuilt binaries
-First, you'll need to download the gclient [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tools), and add ```depot_tools``` to your ```PATH```.
+If you do not have `git`, `python 2.7`, and `ninja` in your build environment, you can use prebuilt binaries in [depot\_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html). You need to manually unzip `depot_tools.zip` and add the extracted directory into your `PATH`.
```
set PATH=%PATH%;c:\work\depot_tools
```
-Then download the code:
+Then run `gclient` command twice so that dependent libraries can be installed automatically.
```
-mkdir c:\work\mozc
-cd c:\work\mozc
-gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
-gclient sync
+gclient
+gclient
```
-## Update to the latest revision
+# Get the Code
-Execute the following command to update to the latest revision.
+You can download Mozc source code as follows:
```
-gclient sync
+mkdir c:\work
+cd c:\work
+git clone https://github.com/google/mozc.git --recursive
```
-Updating the tree sometimes causes a mysterious build error. Try ```build_mozc.py clean``` if it occurs.
-
# Compilation
-First, you'll need to generate Visual C++ project files using a tool called GYP, which is automatically downloaded by ```gclient sync```:
+First, you'll need to generate Visual C++ project files using a tool called [GYP](https://chromium.googlesource.com/external/gyp).
```
cd c:\work\mozc\src
@@ -246,4 +244,4 @@ python build_mozc.py gyp --noqt
python build_mozc.py runtests -c Release
```
-Note that you can specify `--qtdir=` option instead of `--noqt' in GYP phase, currently there is no unit test that depends on Qt.
+Note that you can specify `--qtdir=` option instead of `--noqt` in GYP phase since currently there is no unit test that depends on Qt.
View
@@ -1,75 +0,0 @@
-# Copyright 2010-2015, Google Inc.
-# 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 Google Inc. 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 COPYRIGHT HOLDERS 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 COPYRIGHT
-# OWNER 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.
-
-vars = {
- "breakpad_revision": "d2904bb42181bc32c17b26ac4a0604c0e57473cc",
- "fonttools_revision": "5ba7d98a4153fad57258fca23b0bcb238717aec3",
- "gtest_revision": "1d53731f2c210557caab5660dbe2c578dce6114f",
- "gmock_revision": "d478a1f46d51ac2baa3f3b3896139897f24dc2d1",
- "gyp_revision": "cdf037c1edc0ba3b5d25f8e3973661efe00980cc",
- "jsoncpp_revision": "11086dd6a7eba04289944367ca82cea71299ed70",
- "protobuf_revision": "172019c40bf548908ab09bfd276074c929d48415",
- "zinnia_revision": "44dddcf96c0970a806d666030295706f45cbd045",
- "zlib_revision": "50893291621658f355bc5b4d450a8d06a563053d",
- "japanese_usage_dictionary_revision": "e5b3425575734c323e1d947009dd74709437b684",
-}
-
-deps = {
- "src/third_party/jsoncpp":
- "https://github.com/open-source-parsers/jsoncpp.git@" +
- Var("jsoncpp_revision"),
- "src/third_party/gmock":
- "https://github.com/google/googlemock.git@" + Var("gmock_revision"),
- "src/third_party/gtest":
- "https://github.com/google/googletest.git@" + Var("gtest_revision"),
- "src/third_party/gyp":
- "https://chromium.googlesource.com/external/gyp@" + Var("gyp_revision"),
- "src/third_party/protobuf":
- "https://github.com/google/protobuf.git@" + Var("protobuf_revision"),
- "src/third_party/japanese_usage_dictionary":
- "https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git@" +
- Var("japanese_usage_dictionary_revision"),
- "src/third_party/zinnia":
- "https://github.com/taku910/zinnia.git@" + Var("zinnia_revision"),
-}
-
-deps_os = {
- "win": {
- "src/third_party/breakpad":
- "https://chromium.googlesource.com/breakpad/breakpad@" +
- Var("breakpad_revision"),
- },
- "unix": {
- "src/third_party/fontTools":
- "https://github.com/googlei18n/fonttools.git@" +
- Var("fonttools_revision"),
- "src/third_party/zlib/v1_2_8":
- "https://github.com/madler/zlib.git@" + Var("zlib_revision"),
- },
-}
@@ -64,15 +64,12 @@ RUN curl -LO http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nac
RUN cd nacl_sdk && ./naclsdk install pepper_40
ENV NACL_SDK_ROOT /home/mozc_builder/work/nacl_sdk/pepper_40
-## depot_tools
+## depot_tools for Ninja prebuilt
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH $PATH:/home/mozc_builder/work/depot_tools
-# check out Mozc source
-RUN mkdir -p /home/mozc_builder/work/mozc
-WORKDIR /home/mozc_builder/work/mozc
-RUN gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
-RUN gclient sync
+# check out Mozc source with submodules
+RUN git clone https://github.com/google/mozc.git --recursive
WORKDIR /home/mozc_builder/work/mozc/src
ENTRYPOINT bash
@@ -69,15 +69,12 @@ RUN curl -LO http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nac
RUN cd nacl_sdk && ./naclsdk install pepper_40
ENV NACL_SDK_ROOT /home/mozc_builder/work/nacl_sdk/pepper_40
-## depot_tools
+## depot_tools for Ninja prebuilt
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH $PATH:/home/mozc_builder/work/depot_tools
-# check out Mozc source
-RUN mkdir -p /home/mozc_builder/work/mozc
-WORKDIR /home/mozc_builder/work/mozc
-RUN gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
-RUN gclient sync
+# check out Mozc source with submodules
+RUN git clone https://github.com/google/mozc.git --recursive
WORKDIR /home/mozc_builder/work/mozc/src
ENTRYPOINT bash
@@ -1,6 +1,6 @@
MAJOR=2
MINOR=17
-BUILD=2122
+BUILD=2123
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.
Submodule breakpad added at d2904b
Submodule fontTools added at 5ba7d9
Submodule gmock added at d478a1
Submodule gtest added at 1d5373
Submodule gyp added at cdf037
Submodule jsoncpp added at 11086d
Submodule protobuf added at 172019
Submodule zinnia added at 44dddc

0 comments on commit 276fa5c

Please sign in to comment.