blob: 717e6e86cbfb7d77f5671bb1aab1d781a6a792f6 (
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
|
# Maintainer: Tyler Veness <calcmogul at gmail dot com>
pkgname=wpimath-git
pkgver=2024.1.1.beta.1.r29.gabb2857e03
pkgrel=1
pkgdesc="WPILib's mathematics and controls library"
arch=('x86_64')
url='https://github.com/wpilibsuite/allwpilib'
depends=('fmt' 'eigen' 'protobuf')
makedepends=('cmake')
provides=('wpimath')
conflicts=('wpimath')
license=('BSD' 'MIT')
options=('!strip' 'staticlibs')
source=('git+https://github.com/wpilibsuite/allwpilib'
'Don_t-treat-warnings-as-errors.patch')
md5sums=('SKIP'
'06355c12d930efa26edbbe11f633831a')
pkgver() {
cd allwpilib
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
prepare() {
cd allwpilib
patch -p1 < "$srcdir"/Don_t-treat-warnings-as-errors.patch
}
build() {
cmake -B build -S "allwpilib" \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DUSE_SYSTEM_EIGEN=ON \
-DUSE_SYSTEM_FMTLIB=ON \
-DWITH_JAVA=OFF \
-DWITH_CSCORE=OFF \
-DWITH_NTCORE=OFF \
-DWITH_WPIMATH=ON \
-DWITH_WPILIB=OFF \
-DWITH_TESTS=ON \
-DWITH_GUI=OFF \
-DWITH_SIMULATION_MODULES=OFF \
-Wno-dev
cmake --build build
}
check() {
ctest --test-dir build --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
|