From ce8e657451cd39c37f0a68669b5be08dc6b46101 Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Wed, 18 May 2022 20:41:57 +0300 Subject: [PATCH] proj: fix paths in CMake and pkg-config files --- pkgs/development/libraries/proj/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/development/libraries/proj/default.nix b/pkgs/development/libraries/proj/default.nix index 68b47e2a2eb3..c7a316778212 100644 --- a/pkgs/development/libraries/proj/default.nix +++ b/pkgs/development/libraries/proj/default.nix @@ -22,6 +22,19 @@ stdenv.mkDerivation rec { sha256 = "sha256-zMP+WzC65BFz8g8mF5t7toqxmxCJePysd6WJuqpe8yg="; }; + # https://github.com/OSGeo/PROJ/issues/3206 + postPatch = '' + # NB will not apply once https://github.com/OSGeo/PROJ/pull/3150 is released + substituteInPlace cmake/ProjUtilities.cmake \ + --replace '$\{exec_prefix\}/$'{PROJ_LIB_SUBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \ + --replace '$\{prefix\}/$'{PROJ_INCLUDE_SUBDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} \ + --replace '$\{prefix\}/$'{CMAKE_INSTALL_DATAROOTDIR} '$'{CMAKE_INSTALL_FULL_DATAROOTDIR} + substituteInPlace cmake/project-config.cmake.in \ + --replace '$'{_ROOT}/@INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \ + --replace '$'{_ROOT}/@LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \ + --replace '$'{_ROOT}/@BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@ + ''; + outputs = [ "out" "dev" ]; nativeBuildInputs = [ cmake pkg-config ];