summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Veness2022-10-22 07:51:13 -0700
committerTyler Veness2022-10-22 07:51:13 -0700
commit327189fe462cb81dd93216d78d89b4e0bf4bb227 (patch)
tree6a55575a10791c4d49b274ed32c771efad4fd3eb
parent9ba60bdb81a5b2733beb4170650d634332f94969 (diff)
downloadaur-327189fe462cb81dd93216d78d89b4e0bf4bb227.tar.gz
upgpkg: wpimath 2023.1.1-beta-1
-rw-r--r--.SRCINFO12
-rw-r--r--0001-build-Allow-disabling-ntcore-CMake-build.patch63
-rw-r--r--0001-build-Fix-CMake-system-library-opt-ins.patch159
-rw-r--r--0001-build-Remove-wpilib-prefix-from-CMake-flat-install.patch67
-rw-r--r--PKGBUILD16
5 files changed, 6 insertions, 311 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6775bd8a673b..cd5e2fe29060 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = wpimath
pkgdesc = WPILib's mathematics and controls library
- pkgver = 2023.1.1a
- pkgrel = 5
+ pkgver = 2023.1.1b1
+ pkgrel = 1
url = https://github.com/wpilibsuite/allwpilib
arch = x86_64
license = BSD
@@ -11,15 +11,9 @@ pkgbase = wpimath
depends = eigen
options = !strip
options = staticlibs
- source = git+https://github.com/wpilibsuite/allwpilib#tag=v2023.1.1-alpha-1
- source = 0001-build-Allow-disabling-ntcore-CMake-build.patch
- source = 0001-build-Fix-CMake-system-library-opt-ins.patch
- source = 0001-build-Remove-wpilib-prefix-from-CMake-flat-install.patch
+ source = git+https://github.com/wpilibsuite/allwpilib#tag=v2023.1.1-beta-1
source = Suppress-Eigen-warning.patch
md5sums = SKIP
- md5sums = 32b2c74c1c5434ef1241537a0ee8e0f9
- md5sums = cac7f90b51f6a710bca065b6edc0b996
- md5sums = 5fbf5e6bab1592c7f0a0f17474ef9550
md5sums = 0116ecb4c78683a00db29f15c23b2920
pkgname = wpimath
diff --git a/0001-build-Allow-disabling-ntcore-CMake-build.patch b/0001-build-Allow-disabling-ntcore-CMake-build.patch
deleted file mode 100644
index 8b74ce6109fc..000000000000
--- a/0001-build-Allow-disabling-ntcore-CMake-build.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 07ab49574a95b1586b2ed98cea43b52f5c0c5769 Mon Sep 17 00:00:00 2001
-From: Tyler Veness <calcmogul@gmail.com>
-Date: Thu, 20 Oct 2022 09:22:30 -0700
-Subject: [PATCH] [build] Allow disabling ntcore CMake build
-
----
- CMakeLists.txt | 15 +++++++++++++--
- README-CMAKE.md | 2 ++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 22a94023d..9ea1b03c0 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -52,6 +52,7 @@ ENDIF("${isSystemDir}" STREQUAL "-1")
- option(BUILD_SHARED_LIBS "Build with shared libs (needed for JNI)" ON)
- option(WITH_JAVA "Include java and JNI in the build" ON)
- option(WITH_CSCORE "Build cscore (needs OpenCV)" ON)
-+option(WITH_NTCORE "Build ntcore" ON)
- option(WITH_WPIMATH "Build wpimath" ON)
- option(WITH_WPILIB "Build hal, wpilibc/j, and myRobot (needs OpenCV)" ON)
- option(WITH_EXAMPLES "Build examples" OFF)
-@@ -117,6 +118,13 @@ FATAL: Cannot build simulation modules with wpilib disabled.
- ")
- endif()
-
-+if (NOT WITH_NTCORE AND WITH_WPILIB)
-+ message(FATAL_ERROR "
-+FATAL: Cannot build wpilib without ntcore.
-+ Enable ntcore by setting WITH_NTCORE=ON
-+")
-+endif()
-+
- if (NOT WITH_WPIMATH AND WITH_WPILIB)
- message(FATAL_ERROR "
- FATAL: Cannot build wpilib without wpimath.
-@@ -247,8 +255,11 @@ if (WITH_TESTS)
- endif()
-
- add_subdirectory(wpiutil)
--add_subdirectory(wpinet)
--add_subdirectory(ntcore)
-+
-+if (WITH_NTCORE)
-+ add_subdirectory(wpinet)
-+ add_subdirectory(ntcore)
-+endif()
-
- if (WITH_WPIMATH)
- add_subdirectory(wpimath)
-diff --git a/README-CMAKE.md b/README-CMAKE.md
-index 361a5b9c6..abfab2371 100644
---- a/README-CMAKE.md
-+++ b/README-CMAKE.md
-@@ -35,6 +35,8 @@ The following build options are available:
- * This option will build C++ unit tests. These can be run via `make test`.
- * `WITH_CSCORE` (ON Default)
- * This option will cause cscore to be built. Turning this off will implicitly disable cameraserver, the hal and wpilib as well, irrespective of their specific options. If this is off, the OpenCV build requirement is removed.
-+* `WITH_NTCORE` (ON Default)
-+ * This option will cause ntcore to be built. Turning this off will implicitly disable wpinet and wpilib as well, irrespective of their specific options.
- * `WITH_WPIMATH` (ON Default)
- * This option will build the wpimath library. This option must be on to build wpilib.
- * `WITH_WPILIB` (ON Default)
diff --git a/0001-build-Fix-CMake-system-library-opt-ins.patch b/0001-build-Fix-CMake-system-library-opt-ins.patch
deleted file mode 100644
index 7d12ad752242..000000000000
--- a/0001-build-Fix-CMake-system-library-opt-ins.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-From 39eb7e564a841726f8068a42eae5f79de05efa1d Mon Sep 17 00:00:00 2001
-From: Tyler Veness <calcmogul@gmail.com>
-Date: Thu, 20 Oct 2022 09:06:50 -0700
-Subject: [PATCH] [build] Fix CMake system library opt-ins
-
-I'm working on setting up an AUR package for wpimath, and that platform
-generally builds against system versions of libraries instead of
-packaging its own. I had to make a few fixes.
-
--DUSE_VCPKG_EIGEN now only removes include paths for Eigen instead of
-drake as well.
-
-The USE_VCPKG flags were renamed to USE_SYSTEM since they seem general
-enough for that to work (the find_package() commands work the same way
-on Arch). The unofficial-libuv CMake library file only exists on vcpkg,
-so we can either keep it as-is (only works on vcpkg) or provide our own
-library file for finding the system install.
----
- CMakeLists.txt | 16 ++++++++--------
- wpilib-config.cmake.in | 4 ++--
- wpimath/CMakeLists.txt | 12 +++++++-----
- wpinet/CMakeLists.txt | 2 +-
- wpinet/wpinet-config.cmake.in | 2 +-
- wpiutil/CMakeLists.txt | 2 +-
- wpiutil/wpiutil-config.cmake.in | 2 +-
- 7 files changed, 21 insertions(+), 19 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 22a94023d..b898dbf2f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -63,10 +63,10 @@ option(WITH_SIMULATION_MODULES "Build simulation modules" ON)
- option(WITH_EXTERNAL_HAL "Use a separately built HAL" OFF)
- set(EXTERNAL_HAL_FILE "" CACHE FILEPATH "Location to look for an external HAL CMake File")
-
--# Options for using a package manager (vcpkg) for certain dependencies.
--option(USE_VCPKG_FMTLIB "Use vcpkg fmtlib" OFF)
--option(USE_VCPKG_LIBUV "Use vcpkg libuv" OFF)
--option(USE_VCPKG_EIGEN "Use vcpkg eigen" OFF)
-+# Options for using a package manager (e.g., vcpkg) for certain dependencies.
-+option(USE_SYSTEM_FMTLIB "Use system fmtlib" OFF)
-+option(USE_SYSTEM_LIBUV "Use system libuv" OFF)
-+option(USE_SYSTEM_EIGEN "Use system eigen" OFF)
-
- # Options for installation.
- option(WITH_FLAT_INSTALL "Use a flat install directory" OFF)
-@@ -136,12 +136,12 @@ else()
- set (wpilib_config_dir share/wpilib)
- endif()
-
--if (USE_VCPKG_LIBUV)
--set (LIBUV_VCPKG_REPLACE "find_package(unofficial-libuv CONFIG)")
-+if (USE_SYSTEM_LIBUV)
-+set (LIBUV_SYSTEM_REPLACE "find_package(unofficial-libuv CONFIG)")
- endif()
-
--if (USE_VCPKG_EIGEN)
--set (EIGEN_VCPKG_REPLACE "find_package(Eigen3 CONFIG)")
-+if (USE_SYSTEM_EIGEN)
-+set (EIGEN_SYSTEM_REPLACE "find_package(Eigen3 CONFIG)")
- endif()
-
- find_package(LIBSSH 0.7.1)
-diff --git a/wpilib-config.cmake.in b/wpilib-config.cmake.in
-index 50feffcc1..e0d27d109 100644
---- a/wpilib-config.cmake.in
-+++ b/wpilib-config.cmake.in
-@@ -2,8 +2,8 @@ include(CMakeFindDependencyMacro)
- @FILENAME_DEP_REPLACE@
- set(THREADS_PREFER_PTHREAD_FLAG ON)
- find_dependency(Threads)
--@LIBUV_VCPKG_REPLACE@
--@EIGEN_VCPKG_REPLACE@
-+@LIBUV_SYSTEM_REPLACE@
-+@EIGEN_SYSTEM_REPLACE@
- @WPIUTIL_DEP_REPLACE@
- @NTCORE_DEP_REPLACE@
- @CSCORE_DEP_REPLACE@
-diff --git a/wpimath/CMakeLists.txt b/wpimath/CMakeLists.txt
-index ba5d51535..e11353a2c 100644
---- a/wpimath/CMakeLists.txt
-+++ b/wpimath/CMakeLists.txt
-@@ -108,18 +108,20 @@ endif()
- wpilib_target_warnings(wpimath)
- target_link_libraries(wpimath wpiutil)
-
--if (NOT USE_VCPKG_EIGEN)
-- install(DIRECTORY src/main/native/thirdparty/drake/include/ DESTINATION "${include_dest}/wpimath")
-+if (NOT USE_SYSTEM_EIGEN)
- install(DIRECTORY src/main/native/thirdparty/eigen/include/ DESTINATION "${include_dest}/wpimath")
- target_include_directories(wpimath SYSTEM PUBLIC
-- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/drake/include>
-- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/eigen/include>
-- $<INSTALL_INTERFACE:${include_dest}/wpimath>)
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/eigen/include>
-+ $<INSTALL_INTERFACE:${include_dest}/wpimath>)
- else()
- find_package(Eigen3 CONFIG REQUIRED)
- target_link_libraries (wpimath Eigen3::Eigen)
- endif()
-
-+install(DIRECTORY src/main/native/thirdparty/drake/include/ DESTINATION "${include_dest}/wpimath")
-+target_include_directories(wpimath SYSTEM PUBLIC
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/drake/include>)
-+
- target_include_directories(wpimath PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/include>
- $<INSTALL_INTERFACE:${include_dest}/wpimath>)
-diff --git a/wpinet/CMakeLists.txt b/wpinet/CMakeLists.txt
-index 3994f8bd5..5bb54e950 100644
---- a/wpinet/CMakeLists.txt
-+++ b/wpinet/CMakeLists.txt
-@@ -126,7 +126,7 @@ target_compile_features(wpinet PUBLIC cxx_std_20)
- wpilib_target_warnings(wpinet)
- target_link_libraries(wpinet PUBLIC wpiutil)
-
--if (NOT USE_VCPKG_LIBUV)
-+if (NOT USE_SYSTEM_LIBUV)
- target_sources(wpinet PRIVATE ${uv_native_src})
- install(DIRECTORY src/main/native/thirdparty/libuv/include/ DESTINATION "${include_dest}/wpinet")
- target_include_directories(wpinet PRIVATE
-diff --git a/wpinet/wpinet-config.cmake.in b/wpinet/wpinet-config.cmake.in
-index e61a677ed..f54fe455b 100644
---- a/wpinet/wpinet-config.cmake.in
-+++ b/wpinet/wpinet-config.cmake.in
-@@ -1,6 +1,6 @@
- include(CMakeFindDependencyMacro)
- @FILENAME_DEP_REPLACE@
--@LIBUV_VCPKG_REPLACE@
-+@LIBUV_SYSTEM_REPLACE@
- @WPIUTIL_DEP_REPLACE@
-
- @FILENAME_DEP_REPLACE@
-diff --git a/wpiutil/CMakeLists.txt b/wpiutil/CMakeLists.txt
-index db9a3ed38..6ea8331d1 100644
---- a/wpiutil/CMakeLists.txt
-+++ b/wpiutil/CMakeLists.txt
-@@ -118,7 +118,7 @@ if (ATOMIC)
- endif()
-
-
--if (NOT USE_VCPKG_FMTLIB)
-+if (NOT USE_SYSTEM_FMTLIB)
- target_sources(wpiutil PRIVATE ${fmtlib_native_src})
- install(DIRECTORY src/main/native/thirdparty/fmtlib/include/ DESTINATION "${include_dest}/wpiutil")
- target_include_directories(wpiutil PUBLIC
-diff --git a/wpiutil/wpiutil-config.cmake.in b/wpiutil/wpiutil-config.cmake.in
-index 821b926ba..fde839e2f 100644
---- a/wpiutil/wpiutil-config.cmake.in
-+++ b/wpiutil/wpiutil-config.cmake.in
-@@ -2,7 +2,7 @@ include(CMakeFindDependencyMacro)
- @FILENAME_DEP_REPLACE@
- set(THREADS_PREFER_PTHREAD_FLAG ON)
- find_dependency(Threads)
--@FMTLIB_VCPKG_REPLACE@
-+@FMTLIB_SYSTEM_REPLACE@
-
- @FILENAME_DEP_REPLACE@
- include(${SELF_DIR}/wpiutil.cmake)
diff --git a/0001-build-Remove-wpilib-prefix-from-CMake-flat-install.patch b/0001-build-Remove-wpilib-prefix-from-CMake-flat-install.patch
deleted file mode 100644
index b787cc65d289..000000000000
--- a/0001-build-Remove-wpilib-prefix-from-CMake-flat-install.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 4414bdbd81a96c07de7a1791f3d30c36be064da9 Mon Sep 17 00:00:00 2001
-From: Tyler Veness <calcmogul@gmail.com>
-Date: Thu, 20 Oct 2022 19:49:38 -0700
-Subject: [PATCH] [build] Remove wpilib prefix from CMake flat install
-
-For system installs, `DESTDIR=/usr cmake --install buildfolder` installs
-libraries to `/usr/lib` with the correct rpath. Example structure:
-```
-/usr/include/wpimath/frc/controller/LinearQuadraticRegulator.h
-/usr/lib/libwpimath.so
-```
-
-Users need to provide `-I/usr/include/wpimath` in their projects. This
-is an artifact of the install() commands being in the subdirectory CMake
-files.
-
-For other locations, `DESTDIR=/opt/wpilib cmake --install buildfolder`
-installs libraries to `/opt/wpilib/lib`. Example structure:
-```
-/opt/wpilib/include/wpimath/frc/controller/LinearQuadraticRegulator.h
-/opt/wpilib/lib/libwpimath.so
-```
----
- CMakeLists.txt | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c65eaf376..53d901f4c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -36,16 +36,16 @@ SET(CMAKE_SKIP_BUILD_RPATH FALSE)
- # (but later on when installing)
- SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-
--SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/wpilib/lib")
-+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-
- # add the automatically determined parts of the RPATH
- # which point to directories outside the build tree to the install RPATH
- SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-
- # the RPATH to be used when installing, but only if it's not a system directory
--LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/wpilib/lib" isSystemDir)
-+LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
- IF("${isSystemDir}" STREQUAL "-1")
-- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/wpilib/lib")
-+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
- ENDIF("${isSystemDir}" STREQUAL "-1")
-
- # Options for building certain parts of the repo. Everything is built by default.
-@@ -153,11 +153,11 @@ FATAL: Cannot build wpilib without wpimath.
- ")
- endif()
-
--set( wpilib_dest wpilib)
--set( include_dest wpilib/include )
--set( main_lib_dest wpilib/lib )
--set( java_lib_dest wpilib/java )
--set( jni_lib_dest wpilib/jni )
-+set( wpilib_dest "")
-+set( include_dest include )
-+set( main_lib_dest lib )
-+set( java_lib_dest java )
-+set( jni_lib_dest jni )
-
- if (WITH_FLAT_INSTALL)
- set (wpilib_config_dir ${wpilib_dest})
diff --git a/PKGBUILD b/PKGBUILD
index 85ba647bd12c..0e8ec689cf14 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Tyler Veness <calcmogul at gmail dot com>
pkgname=wpimath
-pkgver=2023.1.1a
-pkgrel=5
+pkgver=2023.1.1b1
+pkgrel=1
pkgdesc="WPILib's mathematics and controls library"
arch=('x86_64')
url='https://github.com/wpilibsuite/allwpilib'
@@ -10,23 +10,13 @@ depends=('fmt' 'eigen')
makedepends=('cmake')
license=('BSD' 'MIT')
options=('!strip' 'staticlibs')
-source=('git+https://github.com/wpilibsuite/allwpilib#tag=v2023.1.1-alpha-1'
- '0001-build-Allow-disabling-ntcore-CMake-build.patch'
- '0001-build-Fix-CMake-system-library-opt-ins.patch'
- '0001-build-Remove-wpilib-prefix-from-CMake-flat-install.patch'
+source=('git+https://github.com/wpilibsuite/allwpilib#tag=v2023.1.1-beta-1'
'Suppress-Eigen-warning.patch')
-#source=("https://github.com/wpilibsuite/allwpilib/archive/refs/tags/v${pkgver}.tar.gz")
md5sums=('SKIP'
- '32b2c74c1c5434ef1241537a0ee8e0f9'
- 'cac7f90b51f6a710bca065b6edc0b996'
- '5fbf5e6bab1592c7f0a0f17474ef9550'
'0116ecb4c78683a00db29f15c23b2920')
prepare() {
cd allwpilib
- patch -p1 < "$srcdir"/0001-build-Allow-disabling-ntcore-CMake-build.patch
- patch -p1 < "$srcdir"/0001-build-Fix-CMake-system-library-opt-ins.patch
- patch -p1 < "$srcdir"/0001-build-Remove-wpilib-prefix-from-CMake-flat-install.patch
patch -p1 < "$srcdir"/Suppress-Eigen-warning.patch
}