blob: 5d0c213c3efff5858843175545dc80a95429dca5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer:
# Contributor: Maxime Arthaud <maxime@arthaud.me>
_pkgname="zxing-cpp"
pkgname="$_pkgname-git"
pkgver=2.2.1.r288.g39ebe724
pkgrel=1
pkgdesc="A C++ library to decode QRCode"
url="https://github.com/zxing-cpp/zxing-cpp"
license=('Apache-2.0')
arch=('x86_64')
depends=(
gcc-libs
)
makedepends=(
cmake
git
ninja
)
checkdepends=(
gtest
)
provides=("$_pkgname=${pkgver%%.r*}")
conflicts=("$_pkgname")
_pkgsrc="$_pkgname"
source=("$_pkgname"::"git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgsrc"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
local _cmake_options=(
-B build
-S "$_pkgsrc"
-G Ninja
-DCMAKE_BUILD_TYPE=None
-DCMAKE_INSTALL_PREFIX='/usr'
-DZXING_DEPENDENCIES=LOCAL
-DZXING_EXAMPLES=OFF
-DZXING_UNIT_TESTS=ON
-Wno-dev
)
cmake "${_cmake_options[@]}"
cmake --build build
}
check() {
ctest --test-dir build --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
|