archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libphonenumber / repos / extra-x86_64 / PKGBUILD
blobb8adbbd146420fb82de2995107709d3776747b76
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 pkgname=libphonenumber
4 pkgver=8.13.4
5 pkgrel=2
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=(icu protobuf abseil-cpp)
12 makedepends=(cmake gtest git jre-openjdk-headless)
13 _commit=a27ae9774997a940cbe737a0575c1b870482c473  # tags/v8.13.4^0
14 source=("git+$url#commit=$_commit")
15 sha256sums=('SKIP')
17 pkgver() {
18   cd $pkgname
19   git describe --tags | sed 's/^libphonenumber-\|^v//;s/[^-]*-g/r&/;s/-/+/g'
22 prepare() {
23   cd $pkgname
24   sed -e 's|CMAKE_CXX_STANDARD 11|CMAKE_CXX_STANDARD 17|' -i tools/cpp/CMakeLists.txt # Fix build with abseil-cpp 2023
27 build() {
28   local cmake_options=(
29     -DCMAKE_INSTALL_PREFIX=/usr
30     -DCMAKE_BUILD_TYPE=None
31     -DCMAKE_CXX_STANDARD=17
32     -DUSE_BOOST=OFF
33     -DUSE_STDMUTEX=ON
34   )
36   cmake -S $pkgname/cpp -B build "${cmake_options[@]}"
37   cmake --build build
40 check() {
41   cmake --build build --target tests
44 package() {
45   depends+=(libicu{uc,i18n}.so libprotobuf.so)
46   provides+=(libgeocoding.so libphonenumber.so)
48   DESTDIR="$pkgdir" cmake --install build
51 # vim:set sw=2 sts=-1 et: