eigen3: update to 5.0.0

This commit is contained in:
مهدي شينون (Mehdi Chinoune) 2025-09-20 12:08:48 +01:00
parent f1d9ebcc8e
commit beb6a3ecf5
4 changed files with 30 additions and 73 deletions

View File

@ -3,7 +3,7 @@
_realname=eigen
pkgbase=mingw-w64-${_realname}3
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}3")
pkgver=3.4.0
pkgver=5.0.0
pkgrel=1
pkgdesc="Lightweight C++ template library for vector and matrix math (mingw-w64)"
arch=('any')
@ -14,47 +14,38 @@ msys2_references=(
'archlinux: eigen'
)
license=('spdx:MPL-2.0')
depends=("${MINGW_PACKAGE_PREFIX}-cc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-fc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-fftw"
"${MINGW_PACKAGE_PREFIX}-mpfr"
"${MINGW_PACKAGE_PREFIX}-doxygen")
source=("https://gitlab.com/libeigen/eigen/-/archive/${pkgver}/eigen-${pkgver}.tar.bz2"
'eigen-3.1.2_osversion.patch'
'TryRunResults.cmake'
'eigen-pkgconfig.patch'
'install_FindEigen3.patch')
sha256sums=('b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626'
'604b5c33e98a5873a81bb92a734dbf30547b482fde519aed5abc5e9ff2dffc6b'
'9ebec4761a7de150ade4b421407a4b5148065416fa8010ecfbdd404bab68f899'
'38d41a475a65de5ad92d1939c9f4fa7460b8152d5beb7256bcbaf630460b5c89'
'c219f577e51571482fdfb38aec104c806cc6ee4c455627d70e99e59d2df7c32d')
'eigen-pkgconfig.patch')
sha256sums=('bc5888a4e8538af18d4734c4266a538c7490200f76bc978b66299600189d51c2'
'52424a065bb6efd16c954294199fa0dcee5cad1d91a138f1305668a16bbb1604')
prepare() {
cd "${srcdir}"/eigen-${pkgver}
patch -Np2 -i "${srcdir}/eigen-3.1.2_osversion.patch"
patch -Np1 -i "${srcdir}/eigen-pkgconfig.patch"
patch -Np1 -i "${srcdir}/install_FindEigen3.patch"
}
build() {
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
-G"MSYS Makefiles" \
-G"Ninja" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DEIGEN_BUILD_PKGCONFIG=ON \
-DFFTW_USE_STATIC_LIBS=ON \
-DFFTW_ROOT=${MINGW_PREFIX} \
../eigen-${pkgver}
-DEIGEN_BUILD_TESTING=OFF \
-DEIGEN_BUILD_DEMOS=OFF \
-S eigen-${pkgver} \
-B build-${MSYSTEM}
${MINGW_PREFIX}/bin/cmake --build .
${MINGW_PREFIX}/bin/cmake --build build-${MSYSTEM}
}
package() {
cd "${srcdir}"/build-${MSYSTEM}
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install build-${MSYSTEM}
install -Dm644 eigen-${pkgver}/COPYING.* -t "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}
}

View File

@ -1,30 +0,0 @@
# This file was generated by CMake because it detected TRY_RUN() commands
# in crosscompiling mode. It will be overwritten by the next CMake run.
# Copy it to a safe location, set the variables to appropriate values
# and use it then to preset the CMake cache (using -C).
# run_res
# indicates whether the executable would have been able to run on its
# target platform. If so, set run_res to
# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN".
# run_res__TRYRUN_OUTPUT
# contains the text the executable would have printed on stdout and stderr.
# If the executable would not have been able to run, set run_res__TRYRUN_OUTPUT empty.
# Otherwise check if the output is evaluated by the calling CMake code. If so,
# check what the source file would have printed when called with the given arguments.
# The compile_res variable holds the build result for this TRY_RUN().
#
# Source file : /home/sandro/rpmbuild/BUILD/eigen-eigen-5097c01bcdc4/build_win32/is64.cpp
# Executable : /home/sandro/rpmbuild/BUILD/eigen-eigen-5097c01bcdc4/build_win32/CMakeFiles/cmTryCompileExec75681192-run_res.exe
# Run arguments :
# Called from: [2] /home/sandro/rpmbuild/BUILD/eigen-eigen-5097c01bcdc4/cmake/EigenConfigureTesting.cmake
# [1] /home/sandro/rpmbuild/BUILD/eigen-eigen-5097c01bcdc4/CMakeLists.txt
SET( run_res
0
CACHE STRING "Result from TRY_RUN" FORCE)
SET( run_res__TRYRUN_OUTPUT
""
CACHE STRING "Output from TRY_RUN" FORCE)

View File

@ -1,6 +1,17 @@
--- eigen-eigen-1306d75b4a21/eigen3.pc.in.orig 2014-08-04 13:51:54.000000000 +0300
+++ eigen-eigen-1306d75b4a21/eigen3.pc.in 2014-12-21 00:44:50.850000000 +0300
@@ -1,10 +1,12 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,7 +87,7 @@
option(EIGEN_BUILD_DEMOS "Toggles the building of the Eigen demos" ${PROJECT_IS_TOP_LEVEL})
# Disable pkgconfig only for native Windows builds
-if(NOT WIN32 OR NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
+if(NOT MSVC)
option(EIGEN_BUILD_PKGCONFIG "Build pkg-config .pc file for Eigen" ${PROJECT_IS_TOP_LEVEL})
endif()
option(EIGEN_BUILD_CMAKE_PACKAGE "Enables the creation of EigenConfig.cmake and related files" ${PROJECT_IS_TOP_LEVEL})
--- a/eigen3.pc.in
+++ b/eigen3.pc.in
@@ -1,9 +1,11 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
+libdir=${prefix}/lib
@ -14,4 +25,4 @@
-Cflags: -I${prefix}/@INCLUDE_INSTALL_DIR@
+Cflags: -I${includedir}

View File

@ -1,15 +0,0 @@
diff -rupN eigen-eigen-07105f7124f9/CMakeLists.txt eigen-eigen-07105f7124f9-new/CMakeLists.txt
--- eigen-eigen-07105f7124f9/CMakeLists.txt 2016-02-16 14:26:15.000000000 +0100
+++ eigen-eigen-07105f7124f9-new/CMakeLists.txt 2016-02-17 09:44:43.556543936 +0100
@@ -324,6 +324,11 @@ install(FILES
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
)
+install(FILES
+ cmake/FindEigen3.cmake
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules
+ )
+
if(EIGEN_BUILD_PKGCONFIG)
configure_file(eigen3.pc.in eigen3.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc