mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
|
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
|
pkgname=zxing-cpp
|
|
pkgver=2.0.0
|
|
pkgrel=1
|
|
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
|
|
$pkgname-assert.patch::https://github.com/zxing-cpp/zxing-cpp/commit/5142600c5d6f47b0705697a84f8c4d508c3a22e8.patch
|
|
"
|
|
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 -j1
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
zxing() {
|
|
amove usr/bin
|
|
}
|
|
|
|
sha512sums="
|
|
fa22164f834a42194eafd0d3e9c09d953233c69843ac6e79c8d6513314be28d8082382b436c379368e687e0eed05cb5e566d2893ec6eb29233a36643904ae083 zxing-cpp-v2.0.0.tar.gz
|
|
d3587499bb5ae192b67ad533291d0272ad7c86c10b9d1c3edb990a20cab38abab2f0a1f853823a76f6a08512c05cfe8c9853ddf42c79665353f14ea6378b2b37 zxing-cpp-assert.patch
|
|
"
|