Philip Liard | a3802a3 | 2011-02-22 08:04:03 +0000 | [diff] [blame] | 1 | C++ version of the libphonenumber project. |
| 2 | Work in progress. |
| 3 | |
| 4 | This is a port of the Java version. |
| 5 | |
| 6 | This project uses some third-party code: |
| 7 | - src/base/ sources come from Chromium browser. |
| 8 | - src/utf/ sources come from lib9 which is also used in Go. |
| 9 | |
| 10 | Requirements: |
| 11 | - CMake build system |
| 12 | http://www.cmake.org |
| 13 | |
| 14 | You can install it very easily on a Debian-based GNU/Linux distribution: |
| 15 | $ sudo apt-get install cmake |
| 16 | |
Philip Liard | ff0ef17 | 2011-03-04 08:43:24 +0000 | [diff] [blame] | 17 | - Protocol Buffers |
| 18 | http://code.google.com/p/protobuf/ |
Shaopeng Jia | 4628c70 | 2011-03-24 09:10:31 +0000 | [diff] [blame^] | 19 | Version 2.4 or more recent is required. |
Philip Liard | ff0ef17 | 2011-03-04 08:43:24 +0000 | [diff] [blame] | 20 | |
| 21 | You can install it very easily on a Debian-based GNU/Linux distribution: |
| 22 | $ sudo apt-get install libprotobuf-dev |
| 23 | |
Shaopeng Jia | 4628c70 | 2011-03-24 09:10:31 +0000 | [diff] [blame^] | 24 | Note: if your GNU/Linux distribution doesn't provide the needed package, |
| 25 | please download and install it manually: |
| 26 | $ tar xjf protobuf-2.4.tar.bz2 |
| 27 | $ cd protobuf-2.4 |
| 28 | $ ./configure && make && sudo make install |
| 29 | |
Philip Liard | ff0ef17 | 2011-03-04 08:43:24 +0000 | [diff] [blame] | 30 | - Google Test |
| 31 | http://code.google.com/p/googletest/ |
| 32 | |
| 33 | You can install it very easily on a Debian-based GNU/Linux distribution: |
| 34 | $ sudo apt-get install libgtest-dev |
| 35 | |
Philip Liard | a3802a3 | 2011-02-22 08:04:03 +0000 | [diff] [blame] | 36 | - RE2 |
| 37 | http://code.google.com/p/re2/ |
| 38 | |
| 39 | You can install it very easily on Ubuntu Maverick and later: |
| 40 | $ sudo apt-get install libre2-dev |
| 41 | |
| 42 | Otherwise if you use a Debian-based distribution you can fetch the Ubuntu |
| 43 | package which should work: |
| 44 | http://packages.ubuntu.com/maverick/libre2-dev |
| 45 | |
| 46 | If you want to install it manually: |
| 47 | You need Mercurial to checkout its source code: |
| 48 | $ sudo apt-get install mercurial |
| 49 | |
| 50 | Then checkout, build and install it: |
| 51 | $ hg clone https://re2.googlecode.com/hg re2 |
| 52 | $ cd re2 |
| 53 | $ make test |
| 54 | $ make install |
| 55 | $ make testinstall |
| 56 | |
Philip Liard | 8e7e1b9 | 2011-03-03 14:35:27 +0000 | [diff] [blame] | 57 | - ICU |
| 58 | http://userguide.icu-project.org/ |
| 59 | |
| 60 | You can install it very easily on a Debian-based distribution: |
| 61 | $ sudo apt-get install libicu-dev |
| 62 | |
Philip Liard | a3802a3 | 2011-02-22 08:04:03 +0000 | [diff] [blame] | 63 | |
| 64 | How to build libphonenumber C++: |
| 65 | $ cd libphonenumber |
| 66 | $ mkdir build |
| 67 | $ cd build |
Philip Liard | ff0ef17 | 2011-03-04 08:43:24 +0000 | [diff] [blame] | 68 | $ cmake ../cpp/ |
Philip Liard | a3802a3 | 2011-02-22 08:04:03 +0000 | [diff] [blame] | 69 | $ make |