diff options
author | TQ Hirsch <thequux@thequux.com> | 2020-04-14 22:53:32 +0200 |
---|---|---|
committer | TQ Hirsch <thequux@thequux.com> | 2020-04-14 23:41:10 +0200 |
commit | 777df0b4a548720e862b498d53bd1827b5743469 (patch) | |
tree | 17d3494578d195ad368a53499a4908cdd6cfbe5a /pkgs/development/libraries | |
parent | 9d7885276a5dfe15fd3e1fd9b59bb597781b4518 (diff) | |
download | nixpkgs-777df0b4a548720e862b498d53bd1827b5743469.tar nixpkgs-777df0b4a548720e862b498d53bd1827b5743469.tar.gz nixpkgs-777df0b4a548720e862b498d53bd1827b5743469.tar.bz2 nixpkgs-777df0b4a548720e862b498d53bd1827b5743469.tar.lz nixpkgs-777df0b4a548720e862b498d53bd1827b5743469.tar.xz nixpkgs-777df0b4a548720e862b498d53bd1827b5743469.tar.zst nixpkgs-777df0b4a548720e862b498d53bd1827b5743469.zip |
boost: Fix library and include paths in generated cmake files
Boost generates its installed cmake configuration using custom logic in its own build system; while this logic *knows* where it should be installed, the generated config overrides the correct information with new paths based on the location of the cmake configuration file in an attempt to let the package be relocated after installation. This patch simply undoes that.
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/boost/cmake-paths.patch | 21 | ||||
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/development/libraries/boost/cmake-paths.patch b/pkgs/development/libraries/boost/cmake-paths.patch new file mode 100644 index 00000000000..b7f90148f9d --- /dev/null +++ b/pkgs/development/libraries/boost/cmake-paths.patch @@ -0,0 +1,21 @@ +diff --git a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam +index ad19f7b55..ec6bf57ff 100644 +--- a/tools/boost_install/boost-install.jam ++++ b/tools/boost_install/boost-install.jam +@@ -587,6 +587,7 @@ rule generate-cmake-config- ( target : sources * : properties * ) + "# Compute the include and library directories relative to this file." + "" + "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" ABSOLUTE)" ++ "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" ABSOLUTE)" + : true ; + + if [ path.is-rooted $(cmakedir) ] +@@ -607,6 +608,8 @@ rule generate-cmake-config- ( target : sources * : properties * ) + " unset(_BOOST_CMAKEDIR_ORIGINAL)" + "endif()" + "" ++ "# Assume that the installer actually did know where the libs were to be installed" ++ "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)" + : true ; + } + diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 7fe3c185c04..6d1c20f323d 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -112,7 +112,8 @@ stdenv.mkDerivation { ++ optional stdenv.isDarwin ( if version == "1.55.0" then ./darwin-1.55-no-system-python.patch - else ./darwin-no-system-python.patch); + else ./darwin-no-system-python.patch) + ++ optional (versionAtLeast version "1.70") ./cmake-paths.patch; meta = { homepage = "http://boost.org/"; |