From 084fc233d3bb75168a100d9fd77584bf70d01672 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 30 Nov 2023 15:39:32 +0200 Subject: [PATCH 01/12] proj: bump v6, simplify patching --- recipes/proj/all/conan_deps.cmake | 24 ++++++++ recipes/proj/all/conandata.yml | 57 +------------------ recipes/proj/all/conanfile.py | 22 +++---- .../0001-use-cmake-targets-6.x.x.patch | 34 ----------- .../0001-use-cmake-targets-7.2.1.patch | 37 ------------ .../0001-use-cmake-targets-8.2.0.patch | 31 ---------- .../0001-use-cmake-targets-9.0.0.patch | 31 ---------- .../0001-use-cmake-targets-9.0.1.patch | 31 ---------- .../0001-use-cmake-targets-9.1.0.patch | 31 ---------- .../0001-use-cmake-targets-9.2.1.patch | 12 ---- .../0002-cmake-configure-proj-pc.patch | 13 ----- recipes/proj/config.yml | 6 +- 12 files changed, 37 insertions(+), 292 deletions(-) create mode 100644 recipes/proj/all/conan_deps.cmake delete mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch delete mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch delete mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch delete mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch delete mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch delete mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch delete mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch delete mode 100644 recipes/proj/all/patches/0002-cmake-configure-proj-pc.patch diff --git a/recipes/proj/all/conan_deps.cmake b/recipes/proj/all/conan_deps.cmake new file mode 100644 index 0000000000000..e78fdd09c6e0e --- /dev/null +++ b/recipes/proj/all/conan_deps.cmake @@ -0,0 +1,24 @@ +macro(custom_find_package name) + find_package(${name} ${ARGN} + # Allow only Conan packages + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) +endmacro() + +custom_find_package(nlohmann_json REQUIRED CONFIG) +link_libraries(nlohmann_json::nlohmann_json) + +custom_find_package(SQLite3 REQUIRED CONFIG) +link_libraries(SQLite::SQLite3) + +if(ENABLE_TIFF) + custom_find_package(TIFF QUIET CONFIG) + link_libraries(TIFF::TIFF) +endif() + +if(ENABLE_CURL) + custom_find_package(CURL QUIET CONFIG) + link_libraries(CURL::libcurl) +endif() + diff --git a/recipes/proj/all/conandata.yml b/recipes/proj/all/conandata.yml index 95a7cf689dd27..8a99a3ac96c3d 100644 --- a/recipes/proj/all/conandata.yml +++ b/recipes/proj/all/conandata.yml @@ -11,66 +11,15 @@ sources: "9.1.1": url: "https://github.com/OSGeo/PROJ/releases/download/9.1.1/proj-9.1.1.tar.gz" sha256: "003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39" - "9.1.0": - url: "https://github.com/OSGeo/PROJ/releases/download/9.1.0/proj-9.1.0.tar.gz" - sha256: "81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315" "9.0.1": url: "https://github.com/OSGeo/PROJ/releases/download/9.0.1/proj-9.0.1.tar.gz" sha256: "737eaacbe7906d0d6ff43f0d9ebedc5c734cccc9e6b8d7beefdec3ab22d9a6a3" - "9.0.0": - url: "https://github.com/OSGeo/PROJ/releases/download/9.0.0/proj-9.0.0.tar.gz" - sha256: "0620aa01b812de00b54d6c23e7c5cc843ae2cd129b24fabe411800302172b989" "8.2.1": url: "https://github.com/OSGeo/PROJ/releases/download/8.2.1/proj-8.2.1.tar.gz" sha256: "76ed3d0c3a348a6693dfae535e5658bbfd47f71cb7ff7eb96d9f12f7e068b1cf" "7.2.1": url: "https://github.com/OSGeo/PROJ/releases/download/7.2.1/proj-7.2.1.tar.gz" sha256: "b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14" - "6.3.1": - url: "https://github.com/OSGeo/PROJ/releases/download/6.3.1/proj-6.3.1.tar.gz" - sha256: "6de0112778438dcae30fcc6942dee472ce31399b9e5a2b67e8642529868c86f8" -patches: - "9.3.1": - - patch_file: "patches/0001-use-cmake-targets-9.2.1.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.3.0": - - patch_file: "patches/0001-use-cmake-targets-9.2.1.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.2.1": - - patch_file: "patches/0001-use-cmake-targets-9.2.1.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.1.1": - - patch_file: "patches/0001-use-cmake-targets-9.1.0.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.1.0": - - patch_file: "patches/0001-use-cmake-targets-9.1.0.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.0.1": - - patch_file: "patches/0001-use-cmake-targets-9.0.1.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.0.0": - - patch_file: "patches/0001-use-cmake-targets-9.0.0.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - - patch_file: "patches/0002-cmake-configure-proj-pc.patch" - patch_type: "portability" - patch_description: "cmake configure proj pc" - patch_source: "https://github.com/OSGeo/PROJ/pull/3087" - "8.2.1": - - patch_file: "patches/0001-use-cmake-targets-8.2.0.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "7.2.1": - - patch_file: "patches/0001-use-cmake-targets-7.2.1.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "6.3.1": - - patch_file: "patches/0001-use-cmake-targets-6.x.x.patch" - patch_type: "conan" - patch_description: "Use cmake targets" + "6.3.2": + url: "https://github.com/OSGeo/PROJ/releases/download/6.3.2/proj-6.3.2.tar.gz" + sha256: "cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311" diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index cc5091962196d..2f3a2cd770c94 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.build import stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, replace_in_file, collect_libs, rm, rename +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, replace_in_file, collect_libs, rename from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -43,6 +43,7 @@ def _is_legacy_one_profile(self): return not hasattr(self, "settings_build") def export_sources(self): + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) export_conandata_patches(self) def config_options(self): @@ -112,25 +113,20 @@ def generate(self): tc.generate() deps = CMakeDeps(self) + deps.set_property("sqlite3", "cmake_file_name", "SQLite3") deps.generate() def _patch_sources(self): - apply_conandata_patches(self) - cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, cmakelists, "/W4", "") - # Fix up usage of SQLite3 finder outputs - rm(self, "FindSqlite3.cmake", os.path.join(self.source_folder, "cmake")) - replace_in_file(self, cmakelists, "SQLITE3_FOUND", "SQLite3_FOUND") - replace_in_file(self, cmakelists, "SQLITE3_VERSION", "SQLite3_VERSION") - replace_in_file(self, cmakelists, "find_package(Sqlite3 REQUIRED)", "find_package(SQLite3 REQUIRED)") + # Inject Conan dependencies + replace_in_file(self, cmakelists, "# Set C++ version", "include(conan_deps.cmake)\n# ") + + replace_in_file(self, cmakelists, "/W4", "") # Let CMake install shared lib with a clean rpath ! - if Version(self.version) >= "7.1.0" and Version(self.version) < "9.0.0": - replace_in_file(self, cmakelists, - "set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", - "") + if "7.1.0" <= Version(self.version) < "9.0.0": + replace_in_file(self, cmakelists, "set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", "") # Aggressive workaround against SIP on macOS, to handle sqlite3 executable # linked to shared sqlite3 lib diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch b/recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch deleted file mode 100644 index 6bec96d49f9b3..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -ru a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2020-02-10 17:29:51.000000000 +0800 -+++ b/CMakeLists.txt 2022-12-14 21:05:09.821289235 +0800 -@@ -114,6 +114,8 @@ - include(ProjMac) - include(policies) - -+find_package(nlohmann_json REQUIRED) -+ - ################################################################################ - # Check for sqlite3 - ################################################################################ -diff -ru a/src/lib_proj.cmake b/src/lib_proj.cmake ---- a/src/lib_proj.cmake 2019-12-29 06:23:06.000000000 +0800 -+++ b/src/lib_proj.cmake 2022-12-14 20:58:56.856752193 +0800 -@@ -311,7 +311,7 @@ - source_group("Source Files\\ISO19111" - FILES ${SRC_LIBPROJ_ISO19111}) - --include_directories(${CMAKE_SOURCE_DIR}/include) -+include_directories(${PROJ4_SOURCE_DIR}/include) - - include_directories(${CMAKE_CURRENT_BINARY_DIR}) - source_group("CMake Files" FILES CMakeLists.txt) -@@ -440,8 +440,7 @@ - target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT}) - endif() - --include_directories(${SQLITE3_INCLUDE_DIR}) --target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY}) -+target_link_libraries(${PROJ_CORE_TARGET} nlohmann_json::nlohmann_json SQLite::SQLite3) - - if(MSVC AND BUILD_LIBPROJ_SHARED) - target_compile_definitions(${PROJ_CORE_TARGET} diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch b/recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch deleted file mode 100644 index 6ee348ac9ddd0..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -ru a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2020-12-27 02:57:21.000000000 +0800 -+++ b/CMakeLists.txt 2022-12-14 21:21:31.516729458 +0800 -@@ -121,6 +121,8 @@ - include(ProjMac) - include(policies) - -+find_package(nlohmann_json REQUIRED) -+ - ################################################################################ - # Check for sqlite3 - ################################################################################ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -414,19 +414,16 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY}) -+target_link_libraries(${PROJ_CORE_TARGET} nlohmann_json::nlohmann_json SQLite::SQLite3) - - if(TIFF_ENABLED) - target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DTIFF_ENABLED) -- target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(${PROJ_CORE_TARGET} ${TIFF_LIBRARY}) -+ target_link_libraries(${PROJ_CORE_TARGET} TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DCURL_ENABLED) -- target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${CURL_INCLUDE_DIR}) -- target_link_libraries(${PROJ_CORE_TARGET} ${CURL_LIBRARY}) -+ target_link_libraries(${PROJ_CORE_TARGET} CURL::libcurl) - endif() - - if(MSVC AND BUILD_SHARED_LIBS) diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch b/recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch deleted file mode 100644 index 8ce7c1895ee22..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -453,8 +453,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) -@@ -464,16 +463,14 @@ endif() - - if(TIFF_ENABLED) - target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) -- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) -+ target_link_libraries(proj PRIVATE TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(proj PRIVATE -DCURL_ENABLED) -- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR}) - target_link_libraries(proj - PRIVATE -- ${CURL_LIBRARY} -+ CURL::libcurl - $<$:ws2_32> - $<$:wldap32> - $<$:advapi32> diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch deleted file mode 100644 index c7cf8eab51037..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -444,8 +444,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) -@@ -455,16 +454,14 @@ endif() - - if(TIFF_ENABLED) - target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) -- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) -+ target_link_libraries(proj PRIVATE TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(proj PRIVATE -DCURL_ENABLED) -- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR}) - target_link_libraries(proj - PRIVATE -- ${CURL_LIBRARY} -+ CURL::libcurl - $<$:ws2_32> - $<$:wldap32> - $<$:advapi32> diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch deleted file mode 100644 index 6920410551838..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -444,8 +444,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) -@@ -455,16 +454,14 @@ endif() - - if(TIFF_ENABLED) - target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) -- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) -+ target_link_libraries(proj PRIVATE TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(proj PRIVATE -DCURL_ENABLED) -- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIRS}) - target_link_libraries(proj - PRIVATE -- ${CURL_LIBRARIES} -+ CURL::libcurl - $<$:ws2_32> - $<$:wldap32> - $<$:advapi32> diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch deleted file mode 100644 index ddd144b4ef122..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -447,8 +447,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) -@@ -458,16 +457,14 @@ endif() - - if(TIFF_ENABLED) - target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) -- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) -+ target_link_libraries(proj PRIVATE TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(proj PRIVATE -DCURL_ENABLED) -- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIRS}) - target_link_libraries(proj - PRIVATE -- ${CURL_LIBRARIES} -+ CURL::libcurl - $<$:ws2_32> - $<$:wldap32> - $<$:advapi32> diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch deleted file mode 100644 index 0459aba7efc51..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -438,8 +438,7 @@ - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) diff --git a/recipes/proj/all/patches/0002-cmake-configure-proj-pc.patch b/recipes/proj/all/patches/0002-cmake-configure-proj-pc.patch deleted file mode 100644 index e39909dc403a9..0000000000000 --- a/recipes/proj/all/patches/0002-cmake-configure-proj-pc.patch +++ /dev/null @@ -1,13 +0,0 @@ -fixed by https://github.com/OSGeo/PROJ/pull/3087 - ---- a/cmake/ProjUtilities.cmake -+++ b/cmake/ProjUtilities.cmake -@@ -98,7 +98,7 @@ function(configure_proj_pc) - list(APPEND EXTRA_LIBS -lole32 -lshell32) - else() - set(cxx_libs "${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES}") -- list(REMOVE_ITEM cxx_libs ${CMAKE_C_IMPLICIT_LINK_LIBRARIES}) -+ list(REMOVE_ITEM cxx_libs ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} CMake_3.19_quirk) - foreach(lib IN LISTS cxx_libs) - list(APPEND EXTRA_LIBS "-l${lib}") - endforeach() diff --git a/recipes/proj/config.yml b/recipes/proj/config.yml index ab5afce9c830c..acbfea05a62a7 100644 --- a/recipes/proj/config.yml +++ b/recipes/proj/config.yml @@ -7,15 +7,11 @@ versions: folder: "all" "9.1.1": folder: "all" - "9.1.0": - folder: "all" "9.0.1": folder: "all" - "9.0.0": - folder: "all" "8.2.1": folder: "all" "7.2.1": folder: "all" - "6.3.1": + "6.3.2": folder: "all" From 42caa4ad67bfb4c8237bbd6fae2a4be76376ca66 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 4 Dec 2023 09:37:45 +0200 Subject: [PATCH 02/12] proj: fix SQLite version check --- recipes/proj/all/conan_deps.cmake | 9 +++++++++ recipes/proj/all/conanfile.py | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/recipes/proj/all/conan_deps.cmake b/recipes/proj/all/conan_deps.cmake index e78fdd09c6e0e..637d56d0c2ac9 100644 --- a/recipes/proj/all/conan_deps.cmake +++ b/recipes/proj/all/conan_deps.cmake @@ -4,6 +4,15 @@ macro(custom_find_package name) NO_DEFAULT_PATH PATHS ${CMAKE_PREFIX_PATH} ) + string(TOUPPER ${name} name_upper) + set(${name_upper}_FOUND TRUE) + set(${name_upper}_VERSION ${${name}_VERSION}) + set(${name_upper}_VERSION_STRING ${${name}_VERSION_STRING}) + set(${name_upper}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS}) + set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR}) + set(${name_upper}_LIBRARIES ${${name}_LIBRARIES}) + set(${name_upper}_DEFINITIONS ${${name}_DEFINITIONS}) + unset(name_upper) endmacro() custom_find_package(nlohmann_json REQUIRED CONFIG) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index 2f3a2cd770c94..b04032d21d921 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -3,12 +3,11 @@ from conan.tools.build import stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, replace_in_file, collect_libs, rename +from conan.tools.files import get, copy, rmdir, replace_in_file, collect_libs, rename from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os - required_conan_version = ">=1.60.0 <2 || >=2.0.5" @@ -44,7 +43,6 @@ def _is_legacy_one_profile(self): def export_sources(self): copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) - export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": From b91764fceecdf2d1ab90ca04b144cfa6096654e7 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 11 Apr 2024 20:22:41 +0300 Subject: [PATCH 03/12] proj: add v9.4.0 --- recipes/proj/all/conandata.yml | 9 +++------ recipes/proj/config.yml | 6 ++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/recipes/proj/all/conandata.yml b/recipes/proj/all/conandata.yml index 8a99a3ac96c3d..f44cf0e1993c0 100644 --- a/recipes/proj/all/conandata.yml +++ b/recipes/proj/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "9.4.0": + url: "https://github.com/OSGeo/PROJ/releases/download/9.4.0/proj-9.4.0.tar.gz" + sha256: "3643b19b1622fe6b2e3113bdb623969f5117984b39f173b4e3fb19a8833bd216" "9.3.1": url: "https://github.com/OSGeo/PROJ/releases/download/9.3.1/proj-9.3.1.tar.gz" sha256: "b0f919cb9e1f42f803a3e616c2b63a78e4d81ecfaed80978d570d3a5e29d10bc" @@ -8,12 +11,6 @@ sources: "9.2.1": url: "https://github.com/OSGeo/PROJ/releases/download/9.2.1/proj-9.2.1.tar.gz" sha256: "15ebf4afa8744b9e6fccb5d571fc9f338dc3adcf99907d9e62d1af815d4971a1" - "9.1.1": - url: "https://github.com/OSGeo/PROJ/releases/download/9.1.1/proj-9.1.1.tar.gz" - sha256: "003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39" - "9.0.1": - url: "https://github.com/OSGeo/PROJ/releases/download/9.0.1/proj-9.0.1.tar.gz" - sha256: "737eaacbe7906d0d6ff43f0d9ebedc5c734cccc9e6b8d7beefdec3ab22d9a6a3" "8.2.1": url: "https://github.com/OSGeo/PROJ/releases/download/8.2.1/proj-8.2.1.tar.gz" sha256: "76ed3d0c3a348a6693dfae535e5658bbfd47f71cb7ff7eb96d9f12f7e068b1cf" diff --git a/recipes/proj/config.yml b/recipes/proj/config.yml index acbfea05a62a7..46026212acd66 100644 --- a/recipes/proj/config.yml +++ b/recipes/proj/config.yml @@ -1,14 +1,12 @@ versions: + "9.4.0": + folder: "all" "9.3.1": folder: "all" "9.3.0": folder: "all" "9.2.1": folder: "all" - "9.1.1": - folder: "all" - "9.0.1": - folder: "all" "8.2.1": folder: "all" "7.2.1": From a1194ce13f84f9af3491f2028666ab3ffca821ed Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 11 Apr 2024 20:23:59 +0300 Subject: [PATCH 04/12] proj: set CMP0077 --- recipes/proj/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index b04032d21d921..d1326567eb790 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -108,6 +108,7 @@ def generate(self): # Workaround for: https://github.com/conan-io/conan/issues/13560 libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs] tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) From 0d40e9bd232b156593efcce18edee206cf6f945c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 11 Apr 2024 20:33:37 +0300 Subject: [PATCH 05/12] proj: tweak patching --- recipes/proj/all/conan_deps.cmake | 1 + recipes/proj/all/conanfile.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/proj/all/conan_deps.cmake b/recipes/proj/all/conan_deps.cmake index 637d56d0c2ac9..458f2a9b92657 100644 --- a/recipes/proj/all/conan_deps.cmake +++ b/recipes/proj/all/conan_deps.cmake @@ -1,3 +1,4 @@ +# Adds upper-case varariables and ensures that only Conan dependencies are used macro(custom_find_package name) find_package(${name} ${ARGN} # Allow only Conan packages diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index d1326567eb790..029934ace2415 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -81,6 +81,7 @@ def generate(self): env.generate(scope="build") tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_PROJ_INCLUDE"] = "conan_deps.cmake" tc.variables["USE_THREAD"] = self.options.threadsafe tc.variables["BUILD_CCT"] = self.options.build_executables tc.variables["BUILD_CS2CS"] = self.options.build_executables @@ -118,9 +119,6 @@ def generate(self): def _patch_sources(self): cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - # Inject Conan dependencies - replace_in_file(self, cmakelists, "# Set C++ version", "include(conan_deps.cmake)\n# ") - replace_in_file(self, cmakelists, "/W4", "") # Let CMake install shared lib with a clean rpath ! From 9c591263aba31ca70eb3aa06022ffaa8ace840c3 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 11 Apr 2024 20:46:35 +0300 Subject: [PATCH 06/12] proj: revert old patches, v9.4.0 no longer requires patching --- recipes/proj/all/conan_deps.cmake | 34 ----------------- recipes/proj/all/conandata.yml | 31 ++++++++++++++-- recipes/proj/all/conanfile.py | 15 ++++++-- .../0001-use-cmake-targets-6.x.x.patch | 34 +++++++++++++++++ .../0001-use-cmake-targets-7.2.1.patch | 37 +++++++++++++++++++ .../0001-use-cmake-targets-8.2.0.patch | 31 ++++++++++++++++ .../0001-use-cmake-targets-9.2.1.patch | 12 ++++++ recipes/proj/config.yml | 2 +- 8 files changed, 154 insertions(+), 42 deletions(-) delete mode 100644 recipes/proj/all/conan_deps.cmake create mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch create mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch create mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch create mode 100644 recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch diff --git a/recipes/proj/all/conan_deps.cmake b/recipes/proj/all/conan_deps.cmake deleted file mode 100644 index 458f2a9b92657..0000000000000 --- a/recipes/proj/all/conan_deps.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# Adds upper-case varariables and ensures that only Conan dependencies are used -macro(custom_find_package name) - find_package(${name} ${ARGN} - # Allow only Conan packages - NO_DEFAULT_PATH - PATHS ${CMAKE_PREFIX_PATH} - ) - string(TOUPPER ${name} name_upper) - set(${name_upper}_FOUND TRUE) - set(${name_upper}_VERSION ${${name}_VERSION}) - set(${name_upper}_VERSION_STRING ${${name}_VERSION_STRING}) - set(${name_upper}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS}) - set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR}) - set(${name_upper}_LIBRARIES ${${name}_LIBRARIES}) - set(${name_upper}_DEFINITIONS ${${name}_DEFINITIONS}) - unset(name_upper) -endmacro() - -custom_find_package(nlohmann_json REQUIRED CONFIG) -link_libraries(nlohmann_json::nlohmann_json) - -custom_find_package(SQLite3 REQUIRED CONFIG) -link_libraries(SQLite::SQLite3) - -if(ENABLE_TIFF) - custom_find_package(TIFF QUIET CONFIG) - link_libraries(TIFF::TIFF) -endif() - -if(ENABLE_CURL) - custom_find_package(CURL QUIET CONFIG) - link_libraries(CURL::libcurl) -endif() - diff --git a/recipes/proj/all/conandata.yml b/recipes/proj/all/conandata.yml index f44cf0e1993c0..b2dc49bd40895 100644 --- a/recipes/proj/all/conandata.yml +++ b/recipes/proj/all/conandata.yml @@ -17,6 +17,31 @@ sources: "7.2.1": url: "https://github.com/OSGeo/PROJ/releases/download/7.2.1/proj-7.2.1.tar.gz" sha256: "b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14" - "6.3.2": - url: "https://github.com/OSGeo/PROJ/releases/download/6.3.2/proj-6.3.2.tar.gz" - sha256: "cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311" + "6.3.1": + url: "https://github.com/OSGeo/PROJ/releases/download/6.3.1/proj-6.3.1.tar.gz" + sha256: "6de0112778438dcae30fcc6942dee472ce31399b9e5a2b67e8642529868c86f8" +patches: + "9.3.1": + - patch_file: "patches/0001-use-cmake-targets-9.2.1.patch" + patch_type: "conan" + patch_description: "Use cmake targets" + "9.3.0": + - patch_file: "patches/0001-use-cmake-targets-9.2.1.patch" + patch_type: "conan" + patch_description: "Use cmake targets" + "9.2.1": + - patch_file: "patches/0001-use-cmake-targets-9.2.1.patch" + patch_type: "conan" + patch_description: "Use cmake targets" + "8.2.1": + - patch_file: "patches/0001-use-cmake-targets-8.2.0.patch" + patch_type: "conan" + patch_description: "Use cmake targets" + "7.2.1": + - patch_file: "patches/0001-use-cmake-targets-7.2.1.patch" + patch_type: "conan" + patch_description: "Use cmake targets" + "6.3.1": + - patch_file: "patches/0001-use-cmake-targets-6.x.x.patch" + patch_type: "conan" + patch_description: "Use cmake targets" diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index 029934ace2415..0ad475ad4577d 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.build import stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import get, copy, rmdir, replace_in_file, collect_libs, rename +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, replace_in_file, collect_libs, rm, rename from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -42,7 +42,7 @@ def _is_legacy_one_profile(self): return not hasattr(self, "settings_build") def export_sources(self): - copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -81,7 +81,6 @@ def generate(self): env.generate(scope="build") tc = CMakeToolchain(self) - tc.variables["CMAKE_PROJECT_PROJ_INCLUDE"] = "conan_deps.cmake" tc.variables["USE_THREAD"] = self.options.threadsafe tc.variables["BUILD_CCT"] = self.options.build_executables tc.variables["BUILD_CS2CS"] = self.options.build_executables @@ -113,14 +112,22 @@ def generate(self): tc.generate() deps = CMakeDeps(self) - deps.set_property("sqlite3", "cmake_file_name", "SQLite3") deps.generate() def _patch_sources(self): + apply_conandata_patches(self) + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") replace_in_file(self, cmakelists, "/W4", "") + # Fix up usage of SQLite3 finder outputs + if Version(self.version) < "9.4.0": + rm(self, "FindSqlite3.cmake", os.path.join(self.source_folder, "cmake")) + replace_in_file(self, cmakelists, "SQLITE3_FOUND", "SQLite3_FOUND") + replace_in_file(self, cmakelists, "SQLITE3_VERSION", "SQLite3_VERSION") + replace_in_file(self, cmakelists, "find_package(Sqlite3 REQUIRED)", "find_package(SQLite3 REQUIRED)") + # Let CMake install shared lib with a clean rpath ! if "7.1.0" <= Version(self.version) < "9.0.0": replace_in_file(self, cmakelists, "set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", "") diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch b/recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch new file mode 100644 index 0000000000000..6bec96d49f9b3 --- /dev/null +++ b/recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch @@ -0,0 +1,34 @@ +diff -ru a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2020-02-10 17:29:51.000000000 +0800 ++++ b/CMakeLists.txt 2022-12-14 21:05:09.821289235 +0800 +@@ -114,6 +114,8 @@ + include(ProjMac) + include(policies) + ++find_package(nlohmann_json REQUIRED) ++ + ################################################################################ + # Check for sqlite3 + ################################################################################ +diff -ru a/src/lib_proj.cmake b/src/lib_proj.cmake +--- a/src/lib_proj.cmake 2019-12-29 06:23:06.000000000 +0800 ++++ b/src/lib_proj.cmake 2022-12-14 20:58:56.856752193 +0800 +@@ -311,7 +311,7 @@ + source_group("Source Files\\ISO19111" + FILES ${SRC_LIBPROJ_ISO19111}) + +-include_directories(${CMAKE_SOURCE_DIR}/include) ++include_directories(${PROJ4_SOURCE_DIR}/include) + + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + source_group("CMake Files" FILES CMakeLists.txt) +@@ -440,8 +440,7 @@ + target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT}) + endif() + +-include_directories(${SQLITE3_INCLUDE_DIR}) +-target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY}) ++target_link_libraries(${PROJ_CORE_TARGET} nlohmann_json::nlohmann_json SQLite::SQLite3) + + if(MSVC AND BUILD_LIBPROJ_SHARED) + target_compile_definitions(${PROJ_CORE_TARGET} diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch b/recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch new file mode 100644 index 0000000000000..6ee348ac9ddd0 --- /dev/null +++ b/recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch @@ -0,0 +1,37 @@ +diff -ru a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2020-12-27 02:57:21.000000000 +0800 ++++ b/CMakeLists.txt 2022-12-14 21:21:31.516729458 +0800 +@@ -121,6 +121,8 @@ + include(ProjMac) + include(policies) + ++find_package(nlohmann_json REQUIRED) ++ + ################################################################################ + # Check for sqlite3 + ################################################################################ +--- a/src/lib_proj.cmake ++++ b/src/lib_proj.cmake +@@ -414,19 +414,16 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) + target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT}) + endif() + +-target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${SQLITE3_INCLUDE_DIR}) +-target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY}) ++target_link_libraries(${PROJ_CORE_TARGET} nlohmann_json::nlohmann_json SQLite::SQLite3) + + if(TIFF_ENABLED) + target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DTIFF_ENABLED) +- target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${TIFF_INCLUDE_DIR}) +- target_link_libraries(${PROJ_CORE_TARGET} ${TIFF_LIBRARY}) ++ target_link_libraries(${PROJ_CORE_TARGET} TIFF::TIFF) + endif() + + if(CURL_ENABLED) + target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DCURL_ENABLED) +- target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${CURL_INCLUDE_DIR}) +- target_link_libraries(${PROJ_CORE_TARGET} ${CURL_LIBRARY}) ++ target_link_libraries(${PROJ_CORE_TARGET} CURL::libcurl) + endif() + + if(MSVC AND BUILD_SHARED_LIBS) diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch b/recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch new file mode 100644 index 0000000000000..8ce7c1895ee22 --- /dev/null +++ b/recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch @@ -0,0 +1,31 @@ +--- a/src/lib_proj.cmake ++++ b/src/lib_proj.cmake +@@ -453,8 +453,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) + target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) + endif() + +-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) +-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) ++target_link_libraries(proj PRIVATE SQLite::SQLite3) + + if(NLOHMANN_JSON STREQUAL "external") + target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) +@@ -464,16 +463,14 @@ endif() + + if(TIFF_ENABLED) + target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) +- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) +- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) ++ target_link_libraries(proj PRIVATE TIFF::TIFF) + endif() + + if(CURL_ENABLED) + target_compile_definitions(proj PRIVATE -DCURL_ENABLED) +- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR}) + target_link_libraries(proj + PRIVATE +- ${CURL_LIBRARY} ++ CURL::libcurl + $<$:ws2_32> + $<$:wldap32> + $<$:advapi32> diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch new file mode 100644 index 0000000000000..0459aba7efc51 --- /dev/null +++ b/recipes/proj/all/patches/0001-use-cmake-targets-9.2.1.patch @@ -0,0 +1,12 @@ +--- a/src/lib_proj.cmake ++++ b/src/lib_proj.cmake +@@ -438,8 +438,7 @@ + target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) + endif() + +-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) +-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) ++target_link_libraries(proj PRIVATE SQLite::SQLite3) + + if(NLOHMANN_JSON STREQUAL "external") + target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) diff --git a/recipes/proj/config.yml b/recipes/proj/config.yml index 46026212acd66..6bc45df13f8ab 100644 --- a/recipes/proj/config.yml +++ b/recipes/proj/config.yml @@ -11,5 +11,5 @@ versions: folder: "all" "7.2.1": folder: "all" - "6.3.2": + "6.3.1": folder: "all" From febf490624bc62938b3885a5d7f082e8cd266460 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 18 Apr 2024 17:55:09 +0300 Subject: [PATCH 07/12] proj: fix failure due to unrecognized warning flags --- recipes/proj/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index 0ad475ad4577d..9a60ad5296e63 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -155,6 +155,11 @@ def _patch_sources(self): if Version(self.version) < "8.1.0": rmdir(self, os.path.join(self.source_folder, "include", "proj", "internal", "nlohmann")) + # Remove warning flags that are unfamiliar to GCC 5 + if Version(self.version) >= "9.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "6.0": + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${PROJ_C_WARN_FLAGS}", "") + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${PROJ_CXX_WARN_FLAGS}", "") + def build(self): self._patch_sources() cmake = CMake(self) From 456af237421d9b8b4fdd5d5aa19476f5b28167b9 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 18 Apr 2024 18:43:13 +0300 Subject: [PATCH 08/12] proj: ignore warning flags for GCC 7 as well --- recipes/proj/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index 9a60ad5296e63..af7d3286bed57 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -156,7 +156,7 @@ def _patch_sources(self): rmdir(self, os.path.join(self.source_folder, "include", "proj", "internal", "nlohmann")) # Remove warning flags that are unfamiliar to GCC 5 - if Version(self.version) >= "9.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "6.0": + if Version(self.version) >= "9.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "8.0": replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${PROJ_C_WARN_FLAGS}", "") replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${PROJ_CXX_WARN_FLAGS}", "") From 4e5e5f10ebf9eee3dac14705de6d692d24b1f7c0 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 18 Apr 2024 19:57:52 +0300 Subject: [PATCH 09/12] proj: require newer CMake --- recipes/proj/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index af7d3286bed57..d687913f6a248 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -67,6 +67,8 @@ def requirements(self): self.requires("libcurl/[>=7.78.0 <9]") def build_requirements(self): + if Version(self.version) >= "9.4.0": + self.tool_requires("cmake/[>=3.16 <4]") if not self._is_legacy_one_profile: self.tool_requires("sqlite3/") From 4ba060a9ff08f879ab43d38c19b49173affa1611 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 20 Apr 2024 15:54:13 +0300 Subject: [PATCH 10/12] proj: bump sqlite3 for #23277 --- recipes/proj/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index d687913f6a248..d73a85d8f7895 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -60,7 +60,7 @@ def layout(self): def requirements(self): self.requires("nlohmann_json/3.11.3") - self.requires("sqlite3/3.44.2") + self.requires("sqlite3/3.45.3") if self.options.get_safe("with_tiff"): self.requires("libtiff/4.6.0") if self.options.get_safe("with_curl"): From 00533e06aab4a06af3d7e67189abda3bc2b4281e Mon Sep 17 00:00:00 2001 From: PerseoGI Date: Fri, 7 Jun 2024 11:00:04 +0200 Subject: [PATCH 11/12] Added new patch version --- recipes/proj/all/conandata.yml | 6 +++--- recipes/proj/config.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/proj/all/conandata.yml b/recipes/proj/all/conandata.yml index b2dc49bd40895..4dfa942ea7d40 100644 --- a/recipes/proj/all/conandata.yml +++ b/recipes/proj/all/conandata.yml @@ -1,7 +1,7 @@ sources: - "9.4.0": - url: "https://github.com/OSGeo/PROJ/releases/download/9.4.0/proj-9.4.0.tar.gz" - sha256: "3643b19b1622fe6b2e3113bdb623969f5117984b39f173b4e3fb19a8833bd216" + "9.4.1": + url: "https://github.com/OSGeo/PROJ/releases/download/9.4.1/proj-9.4.1.tar.gz" + sha256: "ffe20170ee2b952207adf8a195e2141eab12cda181e49fdeb54425d98c7171d7" "9.3.1": url: "https://github.com/OSGeo/PROJ/releases/download/9.3.1/proj-9.3.1.tar.gz" sha256: "b0f919cb9e1f42f803a3e616c2b63a78e4d81ecfaed80978d570d3a5e29d10bc" diff --git a/recipes/proj/config.yml b/recipes/proj/config.yml index 6bc45df13f8ab..557db04c01e50 100644 --- a/recipes/proj/config.yml +++ b/recipes/proj/config.yml @@ -1,5 +1,5 @@ versions: - "9.4.0": + "9.4.1": folder: "all" "9.3.1": folder: "all" From 3ee27ba8c191fdac29940647d977adde23e683b1 Mon Sep 17 00:00:00 2001 From: PerseoGI Date: Tue, 11 Jun 2024 11:24:58 +0200 Subject: [PATCH 12/12] Update recipes/proj/all/conanfile.py --- recipes/proj/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index d73a85d8f7895..d687913f6a248 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -60,7 +60,7 @@ def layout(self): def requirements(self): self.requires("nlohmann_json/3.11.3") - self.requires("sqlite3/3.45.3") + self.requires("sqlite3/3.44.2") if self.options.get_safe("with_tiff"): self.requires("libtiff/4.6.0") if self.options.get_safe("with_curl"):