eigen: 3.4.0-unstable-2022-05-19 -> 3.4.1, clean (#447997)

This commit is contained in:
7c6f434c
2025-10-30 17:34:14 +00:00
committed by GitHub
4 changed files with 48 additions and 75 deletions
-57
View File
@@ -1,57 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
# cmake_minimum_require must be the first command of the file
-cmake_minimum_required(VERSION 3.5.0)
+cmake_minimum_required(VERSION 3.7.0)
project(Eigen3)
@@ -443,7 +443,7 @@ set(PKGCONFIG_INSTALL_DIR
CACHE PATH "The directory relative to CMAKE_INSTALL_PREFIX where eigen3.pc is installed"
)
-foreach(var INCLUDE_INSTALL_DIR CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR)
+foreach(var CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR)
# If an absolute path is specified, make it relative to "{CMAKE_INSTALL_PREFIX}".
if(IS_ABSOLUTE "${${var}}")
file(RELATIVE_PATH "${var}" "${CMAKE_INSTALL_PREFIX}" "${${var}}")
@@ -466,13 +466,6 @@ install(FILES
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
)
-if(EIGEN_BUILD_PKGCONFIG)
- configure_file(eigen3.pc.in eigen3.pc @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc
- DESTINATION ${PKGCONFIG_INSTALL_DIR}
- )
-endif()
-
install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
@@ -593,8 +586,15 @@ set ( EIGEN_VERSION_MAJOR ${EIGEN_WORLD_VERSION} )
set ( EIGEN_VERSION_MINOR ${EIGEN_MAJOR_VERSION} )
set ( EIGEN_VERSION_PATCH ${EIGEN_MINOR_VERSION} )
set ( EIGEN_DEFINITIONS "")
-set ( EIGEN_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}" )
set ( EIGEN_ROOT_DIR ${CMAKE_INSTALL_PREFIX} )
+GNUInstallDirs_get_absolute_install_dir(EIGEN_INCLUDE_DIR INCLUDE_INSTALL_DIR)
+
+if(EIGEN_BUILD_PKGCONFIG)
+ configure_file(eigen3.pc.in eigen3.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc
+ DESTINATION ${PKGCONFIG_INSTALL_DIR}
+ )
+endif()
include (CMakePackageConfigHelpers)
--- a/eigen3.pc.in
+++ b/eigen3.pc.in
@@ -6,4 +6,4 @@ Description: A C++ template library for linear algebra: vectors, matrices, and r
Requires:
Version: @EIGEN_VERSION_NUMBER@
Libs:
-Cflags: -I${prefix}/@INCLUDE_INSTALL_DIR@
+Cflags: -I@EIGEN_INCLUDE_DIR@
+35 -18
View File
@@ -1,43 +1,60 @@
{
lib,
stdenv,
fetchFromGitLab,
fetchpatch,
# nativeBuildInputs
cmake,
# nativeCheckInputs
ctestCheckHook,
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "eigen";
version = "3.4.0-unstable-2022-05-19";
version = "3.4.1";
src = fetchFromGitLab {
owner = "libeigen";
repo = "eigen";
rev = "e7248b26a1ed53fa030c5c459f7ea095dfd276ac";
hash = "sha256-uQ1YYV3ojbMVfHdqjXRyUymRPjJZV3WHT36PTxPRius=";
tag = finalAttrs.version;
hash = "sha256-NSq1tUfy2thz5gtsyASsKeYE4vMf71aSG4uXfrX86rk=";
};
patches = [
./include-dir.patch
# fix bug1213 test
# ref https://gitlab.com/libeigen/eigen/-/merge_requests/2005 merged upstream
(fetchpatch {
url = "https://gitlab.com/libeigen/eigen/-/commit/3e1367a3b5efcdc8ce716db77a322cedeb5e01b4.patch";
hash = "sha256-oykUbzaZeVW1A8nBoiMtJvh68Zpu7PDFtAfAjtTQoC0=";
})
];
# ref. https://gitlab.com/libeigen/eigen/-/merge_requests/977
# This was merged upstream and can be removed on next release
postPatch = ''
substituteInPlace Eigen/src/SVD/BDCSVD.h --replace-fail \
"if (l == 0) {" \
"if (i >= k && l == 0) {"
'';
nativeBuildInputs = [
cmake
];
nativeBuildInputs = [ cmake ];
nativeCheckInputs = [
ctestCheckHook
];
meta = with lib; {
cmakeFlags = [
(lib.cmakeBool "EIGEN_LEAVE_TEST_IN_ALL_TARGET" true) # Build tests in parallel
];
# too many flaky tests
doCheck = false;
meta = {
homepage = "https://eigen.tuxfamily.org";
description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [
sander
raskin
];
platforms = platforms.unix;
platforms = lib.platforms.unix;
};
}
})
+10
View File
@@ -2,6 +2,7 @@
cmake,
eigen,
fetchFromGitHub,
fetchpatch,
gtest,
lib,
stdenv,
@@ -18,6 +19,15 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-mrpkWIb6kfLvppmIfzhjF1/3m1zSd8XG1D07V6Zjlu0=";
};
patches = [
# ref. https://github.com/bab2min/EigenRand/pull/61 merged upstream
(fetchpatch {
name = "support-eigen-341.patch";
url = "https://github.com/bab2min/EigenRand/commit/8114df93b4c8a84a4f853380f0875a2c9d683cd0.patch";
hash = "sha256-2KivLlyYGSRZurtxLghNfWwUNEUNWZdC6q+H65EPLnQ=";
})
];
# Avoid downloading googletest: we already have it.
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
@@ -100,6 +100,9 @@ buildPythonPackage rec {
# The requested array has an inhomogeneous shape after 1 dimensions.
# The detected shape was (2,) + inhomogeneous part
"test_sample_contains"
# segfault
"test_record_video"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Fatal Python error: Aborted