Skip to content

Commit

Permalink
proj: fix paths in CMake and pkg-config files
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshpilkin committed May 18, 2022
1 parent f8c8b28 commit c839327
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/development/libraries/proj/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down

0 comments on commit c839327

Please sign in to comment.