PKGBUILDs/extra/libphonenumber/PKGBUILD

51 lines
1.3 KiB
Bash
Raw Normal View History

2022-06-15 01:07:10 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - re-add makedepend on java
pkgname=libphonenumber
2022-07-20 19:55:00 +00:00
pkgver=8.12.52
2022-09-19 01:29:30 +00:00
pkgrel=4
2022-06-15 01:07:10 +00:00
epoch=1
pkgdesc="Google's common library for parsing, formatting, and validating international phone numbers"
url="https://github.com/googlei18n/libphonenumber"
arch=(x86_64)
license=(Apache)
depends=(icu protobuf boost-libs abseil-cpp)
makedepends=(boost cmake gtest git 'java-environment>=9')
options=(debug)
2022-07-20 19:55:00 +00:00
_commit=011d35d28fe8a7c201efe9164f55ebd0a2d43b0c # tags/v8.12.52^0
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')
2022-06-15 01:07:10 +00:00
pkgver() {
cd $pkgname
git describe --tags | sed 's/^libphonenumber-\|^v//;s/[^-]*-g/r&/;s/-/+/g'
}
prepare() {
cd $pkgname
}
build() {
CXXFLAGS+=" -Wno-error=deprecated-declarations" # readdir_r deprecation
CXXFLAGS+=" -Wno-error=unused-variable" # this is nuts
cmake -S $pkgname/cpp -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
2022-07-20 19:55:00 +00:00
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_CXX_STANDARD=17
2022-06-15 01:07:10 +00:00
cmake --build build
}
check() {
cmake --build build --target tests
}
package() {
depends+=(libicu{uc,i18n}.so libprotobuf.so libboost_thread.so)
provides+=(libgeocoding.so libphonenumber.so)
DESTDIR="$pkgdir" cmake --install build
}