summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 02:13:20 +0000
committerrouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 02:13:20 +0000
commitd51d07fbd4757886bd0b2b408e4585879c09e7d5 (patch)
tree9f10dcd162a7732d19a18ab61da4964175416ff9
parentedce7545f7dbe596df5cb4954b2e40bc44ae5867 (diff)
downloadchromium_src-d51d07fbd4757886bd0b2b408e4585879c09e7d5.zip
chromium_src-d51d07fbd4757886bd0b2b408e4585879c09e7d5.tar.gz
chromium_src-d51d07fbd4757886bd0b2b408e4585879c09e7d5.tar.bz2
[rac] 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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241447 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--third_party/libaddressinput/chromium/cpp/README5
-rw-r--r--third_party/libaddressinput/chromium/cpp/libaddressinput.gyp1
-rw-r--r--third_party/libaddressinput/chromium/cpp/re2.gyp37
-rw-r--r--third_party/libaddressinput/libaddressinput.gyp1
4 files changed, 43 insertions, 1 deletions
diff --git a/third_party/libaddressinput/chromium/cpp/README b/third_party/libaddressinput/chromium/cpp/README
index b9ecff2..1d21942 100644
--- a/third_party/libaddressinput/chromium/cpp/README
+++ b/third_party/libaddressinput/chromium/cpp/README
@@ -21,11 +21,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
@@ -38,6 +39,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
@@ -47,6 +49,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
=====
diff --git a/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp b/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp
index 43b76d3..4ecc940 100644
--- a/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp
+++ b/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp
@@ -54,6 +54,7 @@
'dependencies': [
'grit.gyp:generated_messages',
'rapidjson.gyp:rapidjson',
+ 're2.gyp:re2',
],
},
{
diff --git a/third_party/libaddressinput/chromium/cpp/re2.gyp b/third_party/libaddressinput/chromium/cpp/re2.gyp
new file mode 100644
index 0000000..961178c
--- /dev/null
+++ b/third_party/libaddressinput/chromium/cpp/re2.gyp
@@ -0,0 +1,37 @@
+# Copyright (C) 2013 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+{
+ 'variables': {
+ 're2_dir%': '/usr/include',
+ 're2_lib%': '/usr/lib/libre2.a',
+ },
+ 'targets': [
+ {
+ 'target_name': 're2',
+ 'type': 'none',
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ '<(re2_dir)',
+ ],
+ 'conditions': [
+ ['"<(component)" != "shared_library"', {
+ 'libraries': [
+ '<(re2_lib)',
+ ],
+ }],
+ ],
+ },
+ },
+ ],
+}
diff --git a/third_party/libaddressinput/libaddressinput.gyp b/third_party/libaddressinput/libaddressinput.gyp
index b551e4b..c8ccc72 100644
--- a/third_party/libaddressinput/libaddressinput.gyp
+++ b/third_party/libaddressinput/libaddressinput.gyp
@@ -92,6 +92,7 @@
'dependencies': [
'generated_messages',
'<(DEPTH)/base/base.gyp:base',
+ '<(DEPTH)/third_party/re2/re2.gyp:re2',
],
'direct_dependent_settings': {
'include_dirs': [