4.10.3-2: add gtktreeviewmodel fixes
[arch-packages.git] / libphonenumber / trunk / PKGBUILD
blobda0e619c291dc1aa01d25d7f01c5f57ad0eb48dd
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 pkgname=libphonenumber
4 pkgver=8.13.8
5 pkgrel=1
6 epoch=1
7 pkgdesc="Google's common library for parsing, formatting, and validating international phone numbers"
8 url="https://github.com/googlei18n/libphonenumber"
9 arch=(x86_64)
10 license=(Apache)
11 depends=(
12   abseil-cpp
13   icu
14   protobuf
16 makedepends=(
17   cmake
18   git
19   gtest
20   jre-openjdk-headless
22 _commit=07cd7bbb8a2faf9f2ef7c338e66f2ba303dfad0f  # tags/v8.13.8^0
23 source=("git+$url#commit=$_commit")
24 b2sums=('SKIP')
26 pkgver() {
27   cd $pkgname
28   git describe --tags | sed 's/^libphonenumber-\|^v//;s/[^-]*-g/r&/;s/-/+/g'
31 prepare() {
32   cd $pkgname
34   # Fix build with abseil-cpp 2023
35   sed -e 's|CMAKE_CXX_STANDARD 11|CMAKE_CXX_STANDARD 17|' -i tools/cpp/CMakeLists.txt
38 build() {
39   local cmake_options=(
40     -DCMAKE_INSTALL_PREFIX=/usr
41     -DCMAKE_BUILD_TYPE=None
42     -DCMAKE_CXX_STANDARD=17
43     -DUSE_BOOST=OFF
44     -DUSE_STDMUTEX=ON
45   )
47   cmake -S $pkgname/cpp -B build "${cmake_options[@]}"
48   cmake --build build
51 check() {
52   cmake --build build --target tests
55 package() {
56   depends+=(libicu{uc,i18n}.so libprotobuf.so)
57   provides+=(libgeocoding.so libphonenumber.so)
59   DESTDIR="$pkgdir" cmake --install build
62 # vim:set sw=2 sts=-1 et: