# Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=zxing-cpp pkgver=2.1.0 pkgrel=0 arch="all" url="https://github.com/zxing-cpp/zxing-cpp" pkgdesc="C++ port of ZXing" license="Apache-2.0" makedepends=" cmake gtest-dev samurai stb " source="https://github.com/zxing-cpp/zxing-cpp/archive/v$pkgver/zxing-cpp-v$pkgver.tar.gz" subpackages="$pkgname-dev zxing" build() { cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_BLACKBOX_TESTS=OFF \ -DBUILD_EXAMPLES=ON \ -DBUILD_UNIT_TESTS="$(want_check && echo ON || echo OFF)" cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest -j1 } package() { DESTDIR="$pkgdir" cmake --install build } zxing() { amove usr/bin } sha512sums=" a00778c1fb7bb664176f7035aa96db4bab3e7ca28b5be2862182cb591d18edd4c3dfcbd34b4af08e0797bb4af893299d523f98aa84d266b68e4c766410e2e26d zxing-cpp-v2.1.0.tar.gz "