From 84a6e77f0bdc010a877ad40348b5f673425fd30e Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Thu, 23 Sep 2021 18:05:47 -0700 Subject: [PATCH] eigen: 3.3.9 -> 3.4.0 https://eigen.tuxfamily.org/index.php?title=3.4#Changes_that_might_break_existing_code --- pkgs/development/libraries/eigen/default.nix | 4 +-- .../libraries/eigen/include-dir.patch | 31 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/eigen/default.nix b/pkgs/development/libraries/eigen/default.nix index 371805804210..18fe7450d508 100644 --- a/pkgs/development/libraries/eigen/default.nix +++ b/pkgs/development/libraries/eigen/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "eigen"; - version = "3.3.9"; + version = "3.4.0"; src = fetchFromGitLab { owner = "libeigen"; repo = pname; rev = version; - sha256 = "sha256-JMIG7CLMndUsECfbKpXE3BtVFuAjn+CZvf8GXZpLkFQ="; + sha256 = "sha256-1/4xMetKMDOgZgzz3WMxfHUEpmdAm52RqZvz6i0mLEw="; }; patches = [ diff --git a/pkgs/development/libraries/eigen/include-dir.patch b/pkgs/development/libraries/eigen/include-dir.patch index 42f8e189c0b7..9928bbdbed1b 100644 --- a/pkgs/development/libraries/eigen/include-dir.patch +++ b/pkgs/development/libraries/eigen/include-dir.patch @@ -1,23 +1,22 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1,6 +1,6 @@ +@@ -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) --cmake_minimum_required(VERSION 2.8.5) -+cmake_minimum_required(VERSION 3.7) - - # guard against in-source builds - -@@ -407,7 +407,7 @@ set(PKGCONFIG_INSTALL_DIR - CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where eigen3.pc is installed" +@@ -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}}") - message(FATAL_ERROR "${var} must be relative to CMAKE_PREFIX_PATH. Got: ${${var}}") - endif() -@@ -429,13 +429,6 @@ install(FILES + file(RELATIVE_PATH "${var}" "${CMAKE_INSTALL_PREFIX}" "${${var}}") +@@ -466,13 +466,6 @@ install(FILES DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel ) @@ -28,10 +27,10 @@ - ) -endif() - - add_subdirectory(Eigen) + install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) - add_subdirectory(doc EXCLUDE_FROM_ALL) -@@ -531,8 +524,15 @@ set ( EIGEN_VERSION_MAJOR ${EIGEN_WORLD_VERSION} ) + +@@ -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 "") @@ -46,8 +45,8 @@ + ) +endif() - # Interface libraries require at least CMake 3.0 - if (NOT CMAKE_VERSION VERSION_LESS 3.0) + 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