From a3cc8df4805e85c313e19a4d8c9b859c74208fce Mon Sep 17 00:00:00 2001 From: Rouslan Solomakhin Date: Fri, 11 Oct 2013 21:26:55 +0000 Subject: Boilerplate README and GYP file for C++ port This is the boilerplate of the C++ port of the library. The configuration file is able to build an empty unit test binary. There're 3 dependencies: GYP: Generates the build files. Ninja: Executes the build files. GTest: Used for unit tests. --- cpp/README | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 cpp/README (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README new file mode 100644 index 0000000..32c3cd9 --- /dev/null +++ b/cpp/README @@ -0,0 +1,66 @@ +Intro +===== + +The C++ version of libaddressinput library provides UI layout information and +validation for address input forms. + +The library does not provide a UI. The user of the library must provide the user +interface that uses libaddressinput. The user of the library must also provide a +way to store data on disk and download data from the internet. + +The first client of the library is Chrome web browser. This motivates not +providing UI or networking capabilities. Chrome will provide those. + +When including the library in your project, you can override the dependencies +and include directories in libaddressinput.gypi to link with your own +third-party libraries. + +Dependencies +============ + +The library depends on these tools and libraries: + +GYP: Generates the build files. +Ninja: Executes the build files. +GTest: Used for unit tests. + +Most of these packages are available on Debian-like distributions. You can +install them with this command: + +$ sudo apt-get install gyp ninja-build libgtest-dev + +Make sure that your version of GYP is at least 0.1~svn1395. Older versions of +GYP do not generate the Ninja build files correctly. You can download a +new-enough version from http://packages.ubuntu.com/saucy/gyp. + +If your distribution does not include the binary packages for the dependencies, +you can download them from these locations: + +http://packages.ubuntu.com/saucy/gyp +http://packages.ubuntu.com/saucy/ninja-build +http://packages.ubuntu.com/saucy/libgtest-dev + +Alternatively, you can download, build, and install these tools and libraries +from source code. Their home pages contain information on how to accomplish +that. + +https://code.google.com/p/gyp/ +http://martine.github.io/ninja/ +https://code.google.com/p/googletest/ + +Build +===== + +Building the library involves generating an out/Default/build.ninja file and +running ninja: + +$ export GYP_GENERATORS=ninja +$ gyp --depth . +$ ninja -C out/Default + +Test +==== + +This command will execute the unit tests for the library: + +$ out/Default/unit_tests -- cgit v1.2.3 From 5b904a153c1799252d2e7e3c83ee459e6f0c964b Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Thu, 24 Oct 2013 18:39:25 +0000 Subject: Update README information about specifying file system paths. --- cpp/README | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index 32c3cd9..53bf176 100644 --- a/cpp/README +++ b/cpp/README @@ -54,13 +54,23 @@ Build Building the library involves generating an out/Default/build.ninja file and running ninja: -$ export GYP_GENERATORS=ninja +$ export GYP_GENERATORS='ninja' $ gyp --depth . $ ninja -C out/Default +Overriding paths defined in the *.gyp files can be done by setting the +GYP_DEFINES environment variable before running gyp: + +$ export GYP_DEFINES="gtest_dir='/xxx/include' gtest_src_dir='/xxx'" + Test ==== This command will execute the unit tests for the library: $ out/Default/unit_tests + +When running on Mac OS X, it's necessary to explicitly specify the path to the +dynamically linked libraries, to run the tests out of the build directory: + +$ DYLD_LIBRARY_PATH='out/Default' out/Default/unit_tests -- cgit v1.2.3 From 3b18f892287f44bf09e19f8c90467b9f5fedb902 Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Wed, 13 Nov 2013 17:50:28 +0000 Subject: Add postbuilds for Mac OS X to set dylib path relative to executable. To make it possible to execute the unit tests directly from the build directory, without having to first set DYLD_LIBRARY_PATH or install the library, install_name_tool is executed in a postbuilds step to set the path to the library to be relative to the unit test executable (so that also the library will be loaded directly from the build directory). --- cpp/README | 5 ----- 1 file changed, 5 deletions(-) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index 53bf176..69ab112 100644 --- a/cpp/README +++ b/cpp/README @@ -69,8 +69,3 @@ Test This command will execute the unit tests for the library: $ out/Default/unit_tests - -When running on Mac OS X, it's necessary to explicitly specify the path to the -dynamically linked libraries, to run the tests out of the build directory: - -$ DYLD_LIBRARY_PATH='out/Default' out/Default/unit_tests -- cgit v1.2.3 From ed267f692cbac71f621f1ab38096c646ad63dd53 Mon Sep 17 00:00:00 2001 From: Rouslan Solomakhin Date: Thu, 14 Nov 2013 21:55:33 +0000 Subject: [cpp] GRIT messages This patch is part of a series of patches that enable showing an address input form. This patch adds a GRIT dependency and messages. The messages come from: https://code.google.com/p/libaddressinput/source/browse/trunk/java/res/values/address_strings.xml?r=124 --- cpp/README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index 69ab112..4f27635 100644 --- a/cpp/README +++ b/cpp/README @@ -23,11 +23,12 @@ The library depends on these tools and libraries: GYP: Generates the build files. Ninja: Executes the build files. GTest: Used for unit tests. +Python: Used by GRIT, which generates localization files. Most of these packages are available on Debian-like distributions. You can install them with this command: -$ sudo apt-get install gyp ninja-build libgtest-dev +$ sudo apt-get install gyp ninja-build libgtest-dev python Make sure that your version of GYP is at least 0.1~svn1395. Older versions of GYP do not generate the Ninja build files correctly. You can download a @@ -39,6 +40,7 @@ you can download them from these locations: http://packages.ubuntu.com/saucy/gyp http://packages.ubuntu.com/saucy/ninja-build http://packages.ubuntu.com/saucy/libgtest-dev +http://packages.ubuntu.com/saucy/python Alternatively, you can download, build, and install these tools and libraries from source code. Their home pages contain information on how to accomplish @@ -47,6 +49,7 @@ that. https://code.google.com/p/gyp/ http://martine.github.io/ninja/ https://code.google.com/p/googletest/ +http://python.org/ Build ===== -- cgit v1.2.3 From 5710f8fc7c2cbcdad347c443906644b8d44c8a3e Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Tue, 18 Feb 2014 20:06:44 +0000 Subject: Add re2 dependency to libaddressinput. This patch adds the re2 dependency to libaddressinput. The dependency will be used to validate postal code format of addresses. The addresses are provided by the user. The format regular expressions are from: https://i18napis.appspot.com/ssl-address For example, the US postal code has the following regular expression: \\d{5}([ \\-]\\d{4})? BUG=327046 Review URL: https://codereview.chromium.org/98543010 --- cpp/README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index 4f27635..8e60fc7 100644 --- a/cpp/README +++ b/cpp/README @@ -24,11 +24,12 @@ GYP: Generates the build files. Ninja: Executes the build files. GTest: Used for unit tests. Python: Used by GRIT, which generates localization files. +RE2: Used for validating postal code format. Most of these packages are available on Debian-like distributions. You can install them with this command: -$ sudo apt-get install gyp ninja-build libgtest-dev python +$ sudo apt-get install gyp ninja-build libgtest-dev python libre2-dev Make sure that your version of GYP is at least 0.1~svn1395. Older versions of GYP do not generate the Ninja build files correctly. You can download a @@ -41,6 +42,7 @@ http://packages.ubuntu.com/saucy/gyp http://packages.ubuntu.com/saucy/ninja-build http://packages.ubuntu.com/saucy/libgtest-dev http://packages.ubuntu.com/saucy/python +http://packages.debian.org/experimental/libre2-dev Alternatively, you can download, build, and install these tools and libraries from source code. Their home pages contain information on how to accomplish @@ -50,6 +52,7 @@ https://code.google.com/p/gyp/ http://martine.github.io/ninja/ https://code.google.com/p/googletest/ http://python.org/ +https://code.google.com/p/re2/ Build ===== -- cgit v1.2.3 From 68bab9d49c975b0ecc3143cdd0f9487e20ed3fe0 Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Tue, 18 Feb 2014 20:06:51 +0000 Subject: Update re2.gyp to work when building outside of Chromium. The variable "component" is not going to be defined when building libaddressinput following the instructions in README, so it's not permissible to test the value of this variable. Instead, add a requirement for at least version 20140111+dfsg-1 of the RE2 package (which will be needed for the set_never_capture() option, to be used by rule.cc, anyway), and then the package also provides a shared library so that it becomes possible to specify linking with libre2 using a normal "-lre2" linker directive. --- cpp/README | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index 8e60fc7..cf20750 100644 --- a/cpp/README +++ b/cpp/README @@ -35,6 +35,10 @@ Make sure that your version of GYP is at least 0.1~svn1395. Older versions of GYP do not generate the Ninja build files correctly. You can download a new-enough version from http://packages.ubuntu.com/saucy/gyp. +Make sure that your version of RE2 is at least 20140111+dfsg-1. Older versions +of RE2 don't support set_never_capture() and the packages don't provide shared +libraries. + If your distribution does not include the binary packages for the dependencies, you can download them from these locations: -- cgit v1.2.3 From 8a2c435f14608df7054620b80a92c9b80340f4c6 Mon Sep 17 00:00:00 2001 From: Rouslan Solomakhin Date: Tue, 13 May 2014 09:12:18 +0000 Subject: Add a link to a discussion group to README. --- cpp/README | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index cf20750..50da65f 100644 --- a/cpp/README +++ b/cpp/README @@ -79,3 +79,9 @@ Test This command will execute the unit tests for the library: $ out/Default/unit_tests + +Discussion +========== + +Do you need help with libaddressinput? +https://groups.google.com/forum/#!forum/libaddressinput-discuss -- cgit v1.2.3 From ddb3c2618d9d76fbe8dff0cc51346846f0c4e59e Mon Sep 17 00:00:00 2001 From: Rouslan Solomakhin Date: Thu, 5 Jun 2014 19:28:08 +0000 Subject: Point to the new location of RE2 library. The http://packages.debian.org/experimental/libre2-dev URL is no longer valid. You now can get the RE2 library from: http://packages.ubuntu.com/utopic/libre2-dev. TBR=roubert@google.com Review URL: https://codereview.appspot.com/103910045 --- cpp/README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index 50da65f..4dc96fe 100644 --- a/cpp/README +++ b/cpp/README @@ -46,7 +46,8 @@ http://packages.ubuntu.com/saucy/gyp http://packages.ubuntu.com/saucy/ninja-build http://packages.ubuntu.com/saucy/libgtest-dev http://packages.ubuntu.com/saucy/python -http://packages.debian.org/experimental/libre2-dev +http://packages.ubuntu.com/utopic/libre2-1 +http://packages.ubuntu.com/utopic/libre2-dev Alternatively, you can download, build, and install these tools and libraries from source code. Their home pages contain information on how to accomplish -- cgit v1.2.3 From ddc764fb6c2215b7cbf8ac308103f75746adf2f1 Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Wed, 3 Sep 2014 16:24:46 +0200 Subject: Updated README files. Moved information about the mailing list to the top-level README.md, and added a java/README with instructions for how to build the library and run the tests (both using Android and Java SE). --- cpp/README | 6 ------ 1 file changed, 6 deletions(-) (limited to 'cpp/README') diff --git a/cpp/README b/cpp/README index 4dc96fe..d6fbf44 100644 --- a/cpp/README +++ b/cpp/README @@ -80,9 +80,3 @@ Test This command will execute the unit tests for the library: $ out/Default/unit_tests - -Discussion -========== - -Do you need help with libaddressinput? -https://groups.google.com/forum/#!forum/libaddressinput-discuss -- cgit v1.2.3