summaryrefslogtreecommitdiffstats
path: root/third_party/libphonenumber/cpp/README
blob: 775348a1d60016c04fb762242341a786fa2305de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
C++ version of the libphonenumber project.
Work in progress.

This is a port of the Java version.

This project uses some third-party code:
  - src/base/ sources come from Chromium browser.
  - src/utf/ sources come from lib9 which is also used in Go.

Requirements:
  - CMake build system
    http://www.cmake.org

    You can install it very easily on a Debian-based GNU/Linux distribution:
    $ sudo apt-get install cmake

  - Protocol Buffers
    http://code.google.com/p/protobuf/
    Version 2.4 or more recent is required.

    You can install it very easily on a Debian-based GNU/Linux distribution:
    $ sudo apt-get install libprotobuf-dev

    Note: if your GNU/Linux distribution doesn't provide the needed package,
          please download and install it manually:
    $ tar xjf protobuf-2.4.tar.bz2
    $ cd protobuf-2.4
    $ ./configure && make && sudo make install

  - Google Test
    http://code.google.com/p/googletest/

    You can install it very easily on a Debian-based GNU/Linux distribution:
    $ sudo apt-get install libgtest-dev

  - RE2
    http://code.google.com/p/re2/

    You can install it very easily on Ubuntu Maverick and later:
    $ sudo apt-get install libre2-dev

    Otherwise if you use a Debian-based distribution you can fetch the Ubuntu
    package which should work:
    http://packages.ubuntu.com/maverick/libre2-dev

    If you want to install it manually:
    You need Mercurial to checkout its source code:
    $ sudo apt-get install mercurial

    Then checkout, build and install it:
    $ hg clone https://re2.googlecode.com/hg re2
    $ cd re2
    $ make test
    $ make install
    $ make testinstall

  - ICU
    http://userguide.icu-project.org/

    You can install it very easily on a Debian-based distribution:
    $ sudo apt-get install libicu-dev


How to build libphonenumber C++:
  $ cd libphonenumber
  $ mkdir build
  $ cd build
  $ cmake ../cpp/
  $ make