Loading pkgs/development/libraries/proj/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -17,13 +17,13 @@ stdenv.mkDerivation (finalAttrs: rec { pname = "proj"; version = "9.2.0"; version = "9.2.1"; src = fetchFromGitHub { owner = "OSGeo"; repo = "PROJ"; rev = version; hash = "sha256-NC5H7ufIXit+PVDwNDhz5cv44fduTytsdmNOWyqDDYQ="; hash = "sha256-cUnnJ9gOh65xBbfamfDkN7ajRdRLO5nUXRLeaBBMchg="; }; patches = [ Loading Loading @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: rec { }; meta = with lib; { changelog = "https://github.com/OSGeo/PROJ/blob/${src.rev}/docs/source/news.rst"; changelog = "https://github.com/OSGeo/PROJ/blob/${src.rev}/NEWS"; description = "Cartographic Projections Library"; homepage = "https://proj.org/"; license = licenses.mit; Loading pkgs/development/libraries/proj/only-add-curl-for-static-builds.patch +11 −29 Original line number Diff line number Diff line From 831063f8206cab1ad3e90b204a1c3f8c87c3d5cc Mon Sep 17 00:00:00 2001 From 54b1dbc550b3daa2a7834a9bfd73a0c2f8aeba6a Mon Sep 17 00:00:00 2001 From: Even Rouault <even.rouault@spatialys.com> Date: Tue, 5 Jul 2022 19:40:53 +0200 Subject: [PATCH] proj-config.cmake generation: only add find_dependency(CURL) for static builds --- cmake/project-config.cmake.in | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) cmake/project-config.cmake.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in index 40dbaaa2..c1ecd601 100644 index 3f359668..db886396 100644 --- a/cmake/project-config.cmake.in +++ b/cmake/project-config.cmake.in @@ -15,20 +15,24 @@ include(CMakeFindDependencyMacro) @@ -19,11 +19,15 @@ include(CMakeFindDependencyMacro) # Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612 cmake_policy(PUSH) cmake_policy(SET CMP0012 NEW) -if("@ENABLE_TIFF@") - find_dependency(TIFF) - set(PROJ_CONFIG_FIND_TIFF_DEP ON) +if(NOT "@BUILD_SHARED_LIBS@") + if("@ENABLE_TIFF@") + find_dependency(TIFF) + set(PROJ_CONFIG_FIND_TIFF_DEP ON) + endif() endif() -if("@CURL_ENABLED@") - # Chainload CURL usage requirements - find_dependency(CURL) - # Target CURL::libcurl only defined since CMake 3.12 - if(NOT TARGET CURL::libcurl) - add_library(CURL::libcurl INTERFACE IMPORTED) - set_target_properties(CURL::libcurl PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}" - ) - endif() - set(PROJ_CONFIG_FIND_CURL_DEP ON) +if(NOT "@BUILD_SHARED_LIBS@") + if("@CURL_ENABLED@") + # Chainload CURL usage requirements + find_dependency(CURL) + # Target CURL::libcurl only defined since CMake 3.12 + if(NOT TARGET CURL::libcurl) + add_library(CURL::libcurl INTERFACE IMPORTED) + set_target_properties(CURL::libcurl PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}" + ) + endif() + set(PROJ_CONFIG_FIND_CURL_DEP ON) + endif() endif() cmake_policy(POP) -- 2.39.2 2.41.0 pkgs/development/python-modules/cartopy/default.nix +8 −18 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "cartopy"; version = "0.21.1"; version = "0.22.0"; disabled = pythonOlder "3.8"; Loading @@ -32,22 +32,9 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "Cartopy"; hash = "sha256-idVklxLIWCIxxuEYJaBMhfbwzulNu4nk2yPqvKHMJQo="; hash = "sha256-swD5ASCTHUPxHvh8Bk6h2s7BtZpJQKp26/gs8JVIu0k="; }; patches = [ # https://github.com/SciTools/cartopy/pull/2163 (fetchpatch { url = "https://github.com/SciTools/cartopy/commit/7fb57e294914dbda0ebe8caaeac4deffe5e71639.patch"; hash = "sha256-qc14q+v2IMC+1NQ+OqLjUfJA3Sr5txniqS7CTQ6c7LI="; }) # https://github.com/SciTools/cartopy/pull/2130 (fetchpatch { url = "https://github.com/SciTools/cartopy/commit/6b4572ba1a8a877f28e25dfe9559c14b7a565958.patch"; hash = "sha256-0u6VJMrvoD9bRLHiQV4HQCKDyWEb9dDS2A3rjm6uqYw="; }) ]; nativeBuildInputs = [ cython geos # for geos-config Loading @@ -56,7 +43,8 @@ buildPythonPackage rec { ]; buildInputs = [ geos proj geos proj ]; propagatedBuildInputs = [ Loading @@ -83,8 +71,10 @@ buildPythonPackage rec { ''; pytestFlagsArray = [ "--pyargs" "cartopy" "-m" "'not network and not natural_earth'" "--pyargs" "cartopy" "-m" "'not network and not natural_earth'" ]; disabledTests = [ Loading pkgs/development/python-modules/pyproj/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "pyproj"; version = "3.5.0"; disabled = pythonOlder "3.7"; version = "3.6.0"; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "pyproj4"; repo = "pyproj"; rev = "refs/tags/${version}"; hash = "sha256-Vsje8gEJWNt2P1WOFm/IZSpJo04N0CXWxcmfADmP/M4="; hash = "sha256-XMJg1azsvMtVnKuIulrrZ1Of3CFk2/EgQjkN1g0FpmQ="; }; # force pyproj to use ${proj} Loading Loading
pkgs/development/libraries/proj/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -17,13 +17,13 @@ stdenv.mkDerivation (finalAttrs: rec { pname = "proj"; version = "9.2.0"; version = "9.2.1"; src = fetchFromGitHub { owner = "OSGeo"; repo = "PROJ"; rev = version; hash = "sha256-NC5H7ufIXit+PVDwNDhz5cv44fduTytsdmNOWyqDDYQ="; hash = "sha256-cUnnJ9gOh65xBbfamfDkN7ajRdRLO5nUXRLeaBBMchg="; }; patches = [ Loading Loading @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: rec { }; meta = with lib; { changelog = "https://github.com/OSGeo/PROJ/blob/${src.rev}/docs/source/news.rst"; changelog = "https://github.com/OSGeo/PROJ/blob/${src.rev}/NEWS"; description = "Cartographic Projections Library"; homepage = "https://proj.org/"; license = licenses.mit; Loading
pkgs/development/libraries/proj/only-add-curl-for-static-builds.patch +11 −29 Original line number Diff line number Diff line From 831063f8206cab1ad3e90b204a1c3f8c87c3d5cc Mon Sep 17 00:00:00 2001 From 54b1dbc550b3daa2a7834a9bfd73a0c2f8aeba6a Mon Sep 17 00:00:00 2001 From: Even Rouault <even.rouault@spatialys.com> Date: Tue, 5 Jul 2022 19:40:53 +0200 Subject: [PATCH] proj-config.cmake generation: only add find_dependency(CURL) for static builds --- cmake/project-config.cmake.in | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) cmake/project-config.cmake.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in index 40dbaaa2..c1ecd601 100644 index 3f359668..db886396 100644 --- a/cmake/project-config.cmake.in +++ b/cmake/project-config.cmake.in @@ -15,20 +15,24 @@ include(CMakeFindDependencyMacro) @@ -19,11 +19,15 @@ include(CMakeFindDependencyMacro) # Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612 cmake_policy(PUSH) cmake_policy(SET CMP0012 NEW) -if("@ENABLE_TIFF@") - find_dependency(TIFF) - set(PROJ_CONFIG_FIND_TIFF_DEP ON) +if(NOT "@BUILD_SHARED_LIBS@") + if("@ENABLE_TIFF@") + find_dependency(TIFF) + set(PROJ_CONFIG_FIND_TIFF_DEP ON) + endif() endif() -if("@CURL_ENABLED@") - # Chainload CURL usage requirements - find_dependency(CURL) - # Target CURL::libcurl only defined since CMake 3.12 - if(NOT TARGET CURL::libcurl) - add_library(CURL::libcurl INTERFACE IMPORTED) - set_target_properties(CURL::libcurl PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}" - ) - endif() - set(PROJ_CONFIG_FIND_CURL_DEP ON) +if(NOT "@BUILD_SHARED_LIBS@") + if("@CURL_ENABLED@") + # Chainload CURL usage requirements + find_dependency(CURL) + # Target CURL::libcurl only defined since CMake 3.12 + if(NOT TARGET CURL::libcurl) + add_library(CURL::libcurl INTERFACE IMPORTED) + set_target_properties(CURL::libcurl PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}" + ) + endif() + set(PROJ_CONFIG_FIND_CURL_DEP ON) + endif() endif() cmake_policy(POP) -- 2.39.2 2.41.0
pkgs/development/python-modules/cartopy/default.nix +8 −18 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "cartopy"; version = "0.21.1"; version = "0.22.0"; disabled = pythonOlder "3.8"; Loading @@ -32,22 +32,9 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "Cartopy"; hash = "sha256-idVklxLIWCIxxuEYJaBMhfbwzulNu4nk2yPqvKHMJQo="; hash = "sha256-swD5ASCTHUPxHvh8Bk6h2s7BtZpJQKp26/gs8JVIu0k="; }; patches = [ # https://github.com/SciTools/cartopy/pull/2163 (fetchpatch { url = "https://github.com/SciTools/cartopy/commit/7fb57e294914dbda0ebe8caaeac4deffe5e71639.patch"; hash = "sha256-qc14q+v2IMC+1NQ+OqLjUfJA3Sr5txniqS7CTQ6c7LI="; }) # https://github.com/SciTools/cartopy/pull/2130 (fetchpatch { url = "https://github.com/SciTools/cartopy/commit/6b4572ba1a8a877f28e25dfe9559c14b7a565958.patch"; hash = "sha256-0u6VJMrvoD9bRLHiQV4HQCKDyWEb9dDS2A3rjm6uqYw="; }) ]; nativeBuildInputs = [ cython geos # for geos-config Loading @@ -56,7 +43,8 @@ buildPythonPackage rec { ]; buildInputs = [ geos proj geos proj ]; propagatedBuildInputs = [ Loading @@ -83,8 +71,10 @@ buildPythonPackage rec { ''; pytestFlagsArray = [ "--pyargs" "cartopy" "-m" "'not network and not natural_earth'" "--pyargs" "cartopy" "-m" "'not network and not natural_earth'" ]; disabledTests = [ Loading
pkgs/development/python-modules/pyproj/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "pyproj"; version = "3.5.0"; disabled = pythonOlder "3.7"; version = "3.6.0"; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "pyproj4"; repo = "pyproj"; rev = "refs/tags/${version}"; hash = "sha256-Vsje8gEJWNt2P1WOFm/IZSpJo04N0CXWxcmfADmP/M4="; hash = "sha256-XMJg1azsvMtVnKuIulrrZ1Of3CFk2/EgQjkN1g0FpmQ="; }; # force pyproj to use ${proj} Loading