Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / libaddressinput / src / cpp / README
1 Intro
2 =====
3
4 The C++ version of libaddressinput library provides UI layout information and
5 validation for address input forms.
6
7 The library does not provide a UI. The user of the library must provide the user
8 interface that uses libaddressinput. The user of the library must also provide a
9 way to store data on disk and download data from the internet.
10
11 The first client of the library is Chrome web browser. This motivates not
12 providing UI or networking capabilities. Chrome will provide those.
13
14 When including the library in your project, you can override the dependencies
15 and include directories in libaddressinput.gypi to link with your own
16 third-party libraries.
17
18 Dependencies
19 ============
20
21 The library depends on these tools and libraries:
22
23 GYP: Generates the build files.
24 Ninja: Executes the build files.
25 GTest: Used for unit tests.
26 Python: Used by GRIT, which generates localization files.
27 RE2: Used for validating postal code format.
28
29 Most of these packages are available on Debian-like distributions. You can
30 install them with this command:
31
32 $ sudo apt-get install gyp ninja-build libgtest-dev python libre2-dev
33
34 Make sure that your version of GYP is at least 0.1~svn1395. Older versions of
35 GYP do not generate the Ninja build files correctly. You can download a
36 new-enough version from http://packages.ubuntu.com/saucy/gyp.
37
38 Make sure that your version of RE2 is at least 20140111+dfsg-1. Older versions
39 of RE2 don't support set_never_capture() and the packages don't provide shared
40 libraries.
41
42 If your distribution does not include the binary packages for the dependencies,
43 you can download them from these locations:
44
45 http://packages.ubuntu.com/saucy/gyp
46 http://packages.ubuntu.com/saucy/ninja-build
47 http://packages.ubuntu.com/saucy/libgtest-dev
48 http://packages.ubuntu.com/saucy/python
49 http://packages.ubuntu.com/utopic/libre2-1
50 http://packages.ubuntu.com/utopic/libre2-dev
51
52 Alternatively, you can download, build, and install these tools and libraries
53 from source code. Their home pages contain information on how to accomplish
54 that.
55
56 https://code.google.com/p/gyp/
57 http://martine.github.io/ninja/
58 https://code.google.com/p/googletest/
59 http://python.org/
60 https://code.google.com/p/re2/
61
62 Build
63 =====
64
65 Building the library involves generating an out/Default/build.ninja file and
66 running ninja:
67
68 $ export GYP_GENERATORS='ninja'
69 $ gyp --depth .
70 $ ninja -C out/Default
71
72 Overriding paths defined in the *.gyp files can be done by setting the
73 GYP_DEFINES environment variable before running gyp:
74
75 $ export GYP_DEFINES="gtest_dir='/xxx/include' gtest_src_dir='/xxx'"
76
77 Test
78 ====
79
80 This command will execute the unit tests for the library:
81
82 $ out/Default/unit_tests