archrelease: copy trunk to extra-x86_64
[arch-packages.git] / zxing-cpp / trunk / PKGBUILD
blob39708a5c0b9ec949343efa33e5011c3a781d3033
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Maintainer: Maxime Arthaud <maxime@arthaud.me>
4 pkgname=zxing-cpp
5 pkgver=2.0.0
6 pkgrel=2
7 pkgdesc='A C++ library to decode QRCode'
8 arch=(x86_64)
9 url='https://github.com/nu-book/zxing-cpp'
10 license=(Apache)
11 depends=(gcc-libs)
12 makedepends=(cmake)
13 checkdepends=(gtest)
14 source=(https://github.com/nu-book/zxing-cpp/archive/v$pkgver/$pkgname-$pkgver.tar.gz
15         https://github.com/zxing-cpp/zxing-cpp/commit/5142600c.patch)
16 sha256sums=('12b76b7005c30d34265fc20356d340da179b0b4d43d2c1b35bcca86776069f76'
17             'bfc575e90fd2ce8d3d45d6a1a3cd1c50c04d206f1f5de31c6bb45f064c295887')
19 prepare() {
20   patch -d $pkgname-$pkgver -p1 < 5142600c.patch # Fix assert
23 build() {
24   cmake -B build -S $pkgname-$pkgver \
25     -DCMAKE_INSTALL_PREFIX=/usr \
26     -DCMAKE_BUILD_TYPE=None \
27     -DBUILD_EXAMPLES=OFF \
28     -DBUILD_UNIT_TESTS=ON
29   cmake --build build
32 check() {
33   ctest --test-dir build --output-on-failure
36 package() {
37   DESTDIR="$pkgdir" cmake --install build