mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 01:33:11 +01:00
eigen: 3.4.0-unstable-2022-05-19 -> 3.4.1
This commit is contained in:
parent
b38b396f9d
commit
00f587fdf2
|
|
@ -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@
|
|
||||||
|
|
@ -1,43 +1,60 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitLab,
|
fetchFromGitLab,
|
||||||
|
fetchpatch,
|
||||||
|
|
||||||
|
# nativeBuildInputs
|
||||||
cmake,
|
cmake,
|
||||||
|
|
||||||
|
# nativeCheckInputs
|
||||||
|
ctestCheckHook,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "eigen";
|
pname = "eigen";
|
||||||
version = "3.4.0-unstable-2022-05-19";
|
version = "3.4.1";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
owner = "libeigen";
|
owner = "libeigen";
|
||||||
repo = "eigen";
|
repo = "eigen";
|
||||||
rev = "e7248b26a1ed53fa030c5c459f7ea095dfd276ac";
|
tag = finalAttrs.version;
|
||||||
hash = "sha256-uQ1YYV3ojbMVfHdqjXRyUymRPjJZV3WHT36PTxPRius=";
|
hash = "sha256-NSq1tUfy2thz5gtsyASsKeYE4vMf71aSG4uXfrX86rk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
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
|
nativeBuildInputs = [
|
||||||
# This was merged upstream and can be removed on next release
|
cmake
|
||||||
postPatch = ''
|
];
|
||||||
substituteInPlace Eigen/src/SVD/BDCSVD.h --replace-fail \
|
|
||||||
"if (l == 0) {" \
|
|
||||||
"if (i >= k && l == 0) {"
|
|
||||||
'';
|
|
||||||
|
|
||||||
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";
|
homepage = "https://eigen.tuxfamily.org";
|
||||||
description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";
|
description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";
|
||||||
license = licenses.lgpl3Plus;
|
license = lib.licenses.lgpl3Plus;
|
||||||
maintainers = with maintainers; [
|
maintainers = with lib.maintainers; [
|
||||||
sander
|
sander
|
||||||
raskin
|
raskin
|
||||||
];
|
];
|
||||||
platforms = platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue