Robert Schütz 2023-07-14 00:14:08 -07:00
parent c283c92d90
commit c50fc90fe6
2 changed files with 14 additions and 32 deletions

View file

@ -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 = [
@ -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;

View file

@ -1,55 +1,37 @@
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