diff options
author | Tyler Veness | 2023-07-23 13:46:33 -0700 |
---|---|---|
committer | Tyler Veness | 2023-07-23 13:46:33 -0700 |
commit | e82203303cface925290b1e697e9b3d1078f4b4e (patch) | |
tree | efbe500a79d1f9532c60fdf4764a7fa3e1d7a9a3 | |
download | aur-e82203303cface925290b1e697e9b3d1078f4b4e.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Don_t-treat-warnings-as-errors.patch | 12 | ||||
-rw-r--r-- | PKGBUILD | 57 |
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f5e37cbec8bd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = wpimath-git + pkgdesc = WPILib's mathematics and controls library + pkgver = 2023.4.3.r136.g44acca7c00 + pkgrel = 1 + url = https://github.com/wpilibsuite/allwpilib + arch = x86_64 + license = BSD + license = MIT + makedepends = cmake + depends = fmt + depends = eigen + provides = wpimath + conflicts = wpimath + options = !strip + options = staticlibs + source = git+https://github.com/wpilibsuite/allwpilib + source = Don_t-treat-warnings-as-errors.patch + md5sums = SKIP + md5sums = 06355c12d930efa26edbbe11f633831a + +pkgname = wpimath-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..78c1b6d97c61 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +allwpilib/ +src/ +pkg/ +*.tar.zst diff --git a/Don_t-treat-warnings-as-errors.patch b/Don_t-treat-warnings-as-errors.patch new file mode 100644 index 000000000000..9d65f0a649f5 --- /dev/null +++ b/Don_t-treat-warnings-as-errors.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/modules/CompileWarnings.cmake b/cmake/modules/CompileWarnings.cmake +index 93b35b8abf..bf00ad1d3a 100644 +--- a/cmake/modules/CompileWarnings.cmake ++++ b/cmake/modules/CompileWarnings.cmake +@@ -1,6 +1,6 @@ + macro(wpilib_target_warnings target) + if(NOT MSVC) +- target_compile_options(${target} PRIVATE -Wall -pedantic -Wextra -Werror -Wno-unused-parameter ${WPILIB_TARGET_WARNINGS}) ++ target_compile_options(${target} PRIVATE -Wall -pedantic -Wextra -Wno-unused-parameter ${WPILIB_TARGET_WARNINGS}) + else() + target_compile_options(${target} PRIVATE /wd4146 /wd4244 /wd4251 /wd4267 /WX /D_CRT_SECURE_NO_WARNINGS ${WPILIB_TARGET_WARNINGS}) + endif() diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..92a95367fe68 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Tyler Veness <calcmogul at gmail dot com> + +pkgname=wpimath-git +pkgver=2023.4.3.r136.g44acca7c00 +pkgrel=1 +pkgdesc="WPILib's mathematics and controls library" +arch=('x86_64') +url='https://github.com/wpilibsuite/allwpilib' +depends=('fmt' 'eigen') +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() { + # wpiutil test failure: JsonComparisonValuesTest.Less + ctest --test-dir build -E wpiutil --output-on-failure +} + +package() { + DESTDIR="$pkgdir" cmake --install build +} |