1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/community/zxing-cpp/APKBUILD
2023-02-12 12:50:59 +00:00

51 lines
1 KiB
Text

# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=zxing-cpp
pkgver=2.0.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"
case "$CARCH" in
riscv64)
options="$options textrels"
;;
esac
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
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
zxing() {
amove usr/bin
}
sha512sums="
fa22164f834a42194eafd0d3e9c09d953233c69843ac6e79c8d6513314be28d8082382b436c379368e687e0eed05cb5e566d2893ec6eb29233a36643904ae083 zxing-cpp-v2.0.0.tar.gz
"