From b45ac16bb84f72779c635b068ad066aa86ca49d5 Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Tue, 6 Feb 2024 07:52:56 -0500 Subject: [PATCH 001/108] (#22665) libiconv: Fix building on mingw --- recipes/libiconv/all/conanfile.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/recipes/libiconv/all/conanfile.py b/recipes/libiconv/all/conanfile.py index 2117c9f4edde3..1c44ed6e67c02 100644 --- a/recipes/libiconv/all/conanfile.py +++ b/recipes/libiconv/all/conanfile.py @@ -87,6 +87,19 @@ def generate(self): env.generate() tc = AutotoolsToolchain(self) + if self.settings.os == "Windows" and self.settings.compiler == "gcc": + if self.settings.arch == "x86": + tc.update_configure_args({ + "--host": "i686-w64-mingw32", + "RC": "windres --target=pe-i386", + "WINDRES": "windres --target=pe-i386", + }) + elif self.settings.arch == "x86_64": + tc.update_configure_args({ + "--host": "x86_64-w64-mingw32", + "RC": "windres --target=pe-x86-64", + "WINDRES": "windres --target=pe-x86-64", + }) msvc_version = {"Visual Studio": "12", "msvc": "180"} if is_msvc(self) and Version(self.settings.compiler.version) >= msvc_version[str(self.settings.compiler)]: # https://github.com/conan-io/conan/issues/6514 From b2df9528e3edc2d083270719eac69b3032f841c2 Mon Sep 17 00:00:00 2001 From: Daniel Heater Date: Tue, 6 Feb 2024 09:49:33 -0600 Subject: [PATCH 002/108] =?UTF-8?q?(#22683)=20As=20reported=20in=20issue?= =?UTF-8?q?=20#22654,=20qt=20depends=20on=20freetype/2.13.2=20which=20depe?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dheater --- recipes/qt/6.x.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 80e70011378b2..9e3b0dd0a6a02 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -336,7 +336,7 @@ def requirements(self): else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_sqlite3 and not self.options.multiconfiguration: self.requires("sqlite3/3.45.0") if self.options.get_safe("with_mysql", False): From 33f01c956ee04f0ed303d4f7659b9f3a6065e5d0 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Tue, 6 Feb 2024 19:09:42 +0300 Subject: [PATCH 003/108] (#22689) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 0cba22d652847..16e0c43dea8d2 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.0.tar.gz" + sha256: "e5722b586fa6c6d126487056fa47f0d933b94413ac44b79f52573226eca04a07" "2.6.0": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.6.0.tar.gz" sha256: "8884a3b18fd923dd49994190e0b11c1882e409fce59fb6e5ee8e866dd889b8d0" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 99ee89b18595a..36c498e0d5bfd 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.0": + folder: all "2.6.0": folder: all "2.5.2": From 835b37ba28bc83685b853a0ed858c343ad60dd03 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 6 Feb 2024 18:08:52 +0100 Subject: [PATCH 004/108] (#22246) sdl/all: bump deps * sdl/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * remove unused patches * fixup * fixup * sdl/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * remove outdated code * Update conanfile.py * Update conanfile.py * Update conanfile.py * Update conanfile.py --- recipes/sdl/all/conanfile.py | 20 ++++---------- .../all/patches/0001-fix-cmake-ios-tvos.patch | 26 ------------------ .../all/patches/0002-mingw-improvements.patch | 27 ------------------- ...2.0.14-wayland-scanner-buildrequires.patch | 23 ---------------- ...2.0.16-wayland-scanner-buildrequires.patch | 24 ----------------- 5 files changed, 5 insertions(+), 115 deletions(-) delete mode 100644 recipes/sdl/all/patches/0001-fix-cmake-ios-tvos.patch delete mode 100644 recipes/sdl/all/patches/0002-mingw-improvements.patch delete mode 100644 recipes/sdl/all/patches/0003-2.0.14-wayland-scanner-buildrequires.patch delete mode 100644 recipes/sdl/all/patches/0003-2.0.16-wayland-scanner-buildrequires.patch diff --git a/recipes/sdl/all/conanfile.py b/recipes/sdl/all/conanfile.py index 03ff0430a22b1..97981518e1f52 100644 --- a/recipes/sdl/all/conanfile.py +++ b/recipes/sdl/all/conanfile.py @@ -3,14 +3,13 @@ from conan.tools.apple import is_apple_os from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, replace_in_file, rm, rmdir, copy from conan.tools.microsoft import is_msvc -from conan.tools.build import cross_building from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import Environment import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.55.0" class SDLConan(ConanFile): @@ -95,9 +94,6 @@ def generate(self): env = Environment() env.define_path("LIBRARY_PATH", os.pathsep.join(lib_paths)) - # FIXME: remove and raise required_conan_version to 1.55 once it's on c3i - env.prepend_path("PKG_CONFIG_PATH", self.generators_folder) - env = env.vars(self, scope="build") env.save_script("sdl_env") @@ -161,11 +157,11 @@ def requirements(self): self.requires("xkbcommon/1.6.0") self.requires("egl/system") if self.options.libunwind: - self.requires("libunwind/1.7.2") + self.requires("libunwind/1.8.0") def validate(self): # SDL>=2.0.18 requires xcode 12 or higher because it uses CoreHaptics. - if Version(self.version) >= "2.0.18" and is_apple_os(self) and Version(self.settings.compiler.version) < "12": + if is_apple_os(self) and Version(self.settings.compiler.version) < "12": raise ConanInvalidConfiguration("{}/{} requires xcode 12 or higher".format(self.name, self.version)) if self.settings.os == "Linux": @@ -183,13 +179,7 @@ def package_id(self): del self.info.options.sdl2main def build_requirements(self): - if self.settings.os == "Macos" and cross_building(self): - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.tool_requires("cmake/3.27.9") + self.tool_requires("cmake/[>3.27 <4]") if self.settings.os == "Linux" and not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") if hasattr(self, "settings_build") and self.options.get_safe("wayland"): @@ -220,7 +210,7 @@ def _patch_sources(self): '# check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)') # Ensure to find wayland-scanner from wayland recipe in build requirements (or requirements if 1 profile) - if self.options.get_safe("wayland") and Version(self.version) >= "2.0.18": + if self.options.get_safe("wayland"): replace_in_file(self, os.path.join(self.source_folder, "cmake", "sdlchecks.cmake"), "find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)", diff --git a/recipes/sdl/all/patches/0001-fix-cmake-ios-tvos.patch b/recipes/sdl/all/patches/0001-fix-cmake-ios-tvos.patch deleted file mode 100644 index 7a56e3d843ff6..0000000000000 --- a/recipes/sdl/all/patches/0001-fix-cmake-ios-tvos.patch +++ /dev/null @@ -1,26 +0,0 @@ -see https://github.com/libsdl-org/SDL/commit/471d3c363e654c7ad10782f50cb47e639c0646c3 - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -131,6 +131,8 @@ elseif(APPLE) - set(MACOSX TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*") - set(TVOS TRUE) -+ elseif(CMAKE_SYSTEM_NAME MATCHES ".*iOS.*") -+ set(IOS TRUE) - endif() - # TODO: iOS? - elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*") -@@ -1668,7 +1670,11 @@ elseif(APPLE) - message_error("SDL_FILE must be enabled to build on MacOS X") - endif() - -- file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m) -+ if(IOS OR TVOS) -+ file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/ios/*.m) -+ else() -+ file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m) -+ endif() - set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES}) - set(HAVE_SDL_MISC TRUE) - diff --git a/recipes/sdl/all/patches/0002-mingw-improvements.patch b/recipes/sdl/all/patches/0002-mingw-improvements.patch deleted file mode 100644 index 250f0b8951359..0000000000000 --- a/recipes/sdl/all/patches/0002-mingw-improvements.patch +++ /dev/null @@ -1,27 +0,0 @@ -Upstream-pull-request: https://github.com/libsdl-org/SDL/pull/4492 -Upstream-pull-request-status: Merged ---- - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b9b9eb62..454a0bbd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -2092,7 +2092,8 @@ if(NOT CMAKE_HOST_WIN32) - execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh - WORKING_DIRECTORY ${SDL2_BINARY_DIR}) - endif() --if(NOT WINDOWS OR CYGWIN) -+if(NOT WINDOWS OR CYGWIN OR MINGW) -+ - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix "\${prefix}") - set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}") -@@ -2361,7 +2361,7 @@ else() - set(SOPOSTFIX "") - endif() - --if(NOT (WINDOWS OR CYGWIN)) -+if(NOT (WINDOWS OR CYGWIN OR MINGW)) - if(SDL_SHARED) - set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc. - get_target_property(SONAME SDL2 OUTPUT_NAME) diff --git a/recipes/sdl/all/patches/0003-2.0.14-wayland-scanner-buildrequires.patch b/recipes/sdl/all/patches/0003-2.0.14-wayland-scanner-buildrequires.patch deleted file mode 100644 index d6352aaac4789..0000000000000 --- a/recipes/sdl/all/patches/0003-2.0.14-wayland-scanner-buildrequires.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/cmake/sdlchecks.cmake -+++ b/cmake/sdlchecks.cmake -@@ -593,9 +593,10 @@ endmacro() - # - HAVE_DLOPEN opt - macro(CheckWayland) - if(VIDEO_WAYLAND) -- pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon) -+ pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl xkbcommon) - - if(WAYLAND_FOUND) -+ if(0) - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" -@@ -607,6 +608,8 @@ macro(CheckWayland) - if(NOT WAYLAND_SCANNER_RC EQUAL 0) - set(WAYLAND_FOUND FALSE) - endif() -+ endif() -+ set(WAYLAND_SCANNER "wayland-scanner") - endif() - - if(WAYLAND_FOUND) diff --git a/recipes/sdl/all/patches/0003-2.0.16-wayland-scanner-buildrequires.patch b/recipes/sdl/all/patches/0003-2.0.16-wayland-scanner-buildrequires.patch deleted file mode 100644 index 664a37968e03a..0000000000000 --- a/recipes/sdl/all/patches/0003-2.0.16-wayland-scanner-buildrequires.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/cmake/sdlchecks.cmake -+++ b/cmake/sdlchecks.cmake -@@ -628,10 +628,10 @@ endmacro() - # - HAVE_DLOPEN opt - macro(CheckWayland) - if(VIDEO_WAYLAND) -- pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon) -- pkg_check_modules(WAYLAND_SCANNER_1_15 "wayland-scanner>=1.15") -+ pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl xkbcommon) - - if(WAYLAND_FOUND AND HAVE_VIDEO_OPENGL_EGL) -+ if(0) - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" -@@ -643,6 +643,8 @@ macro(CheckWayland) - if(NOT WAYLAND_SCANNER_RC EQUAL 0) - set(WAYLAND_FOUND FALSE) - endif() -+ endif() -+ set(WAYLAND_SCANNER "wayland-scanner") - endif() - - if(WAYLAND_FOUND) From 9dcab28d13b5ad072af31eb59910f8eddfb06c5a Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Tue, 6 Feb 2024 23:29:13 +0100 Subject: [PATCH 005/108] (#22552) aws-c-http: update dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to #21033, we'll have to raise the aws-c-io dependency here as well. Co-authored-by: Rubén Rincón Blanco --- recipes/aws-c-http/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/aws-c-http/all/conanfile.py b/recipes/aws-c-http/all/conanfile.py index a9bb3bc67dc42..f9311547cb20c 100644 --- a/recipes/aws-c-http/all/conanfile.py +++ b/recipes/aws-c-http/all/conanfile.py @@ -52,7 +52,7 @@ def requirements(self): elif Version(self.version) <= "0.6.22": self.requires("aws-c-io/0.13.4", transitive_headers=True, transitive_libs=True) else: - self.requires("aws-c-io/0.13.32", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 748e168644d205eaddaa5715bdcf3633b7e2e9e6 Mon Sep 17 00:00:00 2001 From: Sneder89 <45610045+Sneder89@users.noreply.github.com> Date: Wed, 7 Feb 2024 08:53:30 +0100 Subject: [PATCH 006/108] (#22699) Add cppcheck 2.13.3 * Update conandata.yml * Update config.yml --- recipes/cppcheck/all/conandata.yml | 3 +++ recipes/cppcheck/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cppcheck/all/conandata.yml b/recipes/cppcheck/all/conandata.yml index d0f5a27793e17..71b6f57a8c0f0 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.13.3": + url: "https://github.com/danmar/cppcheck/archive/2.13.3.tar.gz" + sha256: "ac8c526d19496038c09bf4781bd804ab1f7aaadee4c3b699629830d24742dd81" "2.13": url: "https://github.com/danmar/cppcheck/archive/2.13.0.tar.gz" sha256: "8229afe1dddc3ed893248b8a723b428dc221ea014fbc76e6289840857c03d450" diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index 654cfb904a00d..27715122c7600 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,4 +1,6 @@ versions: + "2.13.3": + folder: all "2.13": folder: all "2.12.1": From b362f2bb9f266d8f4cf9a5520a0c2977ed9f2500 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 7 Feb 2024 15:45:18 +0100 Subject: [PATCH 007/108] (#22668) [config] Add waitaing list for users in authorized users * Move users to waitlist Signed-off-by: Uilian Ries * Add change name in docs Signed-off-by: Uilian Ries * Update .c3i/waitlist_users.yml --------- Signed-off-by: Uilian Ries --- .c3i/authorized_users.yml | 2 -- .c3i/config_v1.yml | 1 + .c3i/config_v2.yml | 1 + .c3i/waitlist_users.yml | 4 ++++ docs/faqs.md | 9 +++++++++ 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .c3i/waitlist_users.yml diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index d11a0fe788d74..4200ed3ec3c89 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1266,7 +1266,6 @@ authorized_users: - wu-vincent - Inujel - keszegrobert -- Mike-Solar - tomasz-wezyk - RaguzovaTatyana - st9007a @@ -1278,7 +1277,6 @@ authorized_users: - stefansli - wgtmac - kevinAlbs -- retroandchill - adamws - rob-baily - crhowell3 diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index dd6f6670d4c22..6bb2f823e1899 100644 --- a/.c3i/config_v1.yml +++ b/.c3i/config_v1.yml @@ -16,6 +16,7 @@ artifactory: github: reviewers: "reviewers.yml" authorized_users: "authorized_users.yml" + waitlist_users: "waitlist_users.yml" slack: credential_success_url: SLACK_SUCCESS_WEBHOOK_URL diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index a4257b5a5ecb9..765cbc758a9e0 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -23,6 +23,7 @@ artifactory: github: reviewers: "reviewers.yml" authorized_users: "authorized_users.yml" + waitlist_users: "waitlist_users.yml" # Things related to Jenkins jobs: tasks: diff --git a/.c3i/waitlist_users.yml b/.c3i/waitlist_users.yml new file mode 100644 index 0000000000000..ead4b94c37882 --- /dev/null +++ b/.c3i/waitlist_users.yml @@ -0,0 +1,4 @@ +waitlist_users: +- Mike-Solar +- retroandchill +- refactorTractor diff --git a/docs/faqs.md b/docs/faqs.md index 8fc8cb331f121..b463fc96e8c9b 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -41,6 +41,7 @@ This section gathers the most common questions from the community related to pac * [How to watch only specific recipes?](#how-to-watch-only-specific-recipes) * [Is it possible to disable Pylint?](#is-it-possible-to-disable-pylint) * [How long can I be inactive before being removed from the authorized users list?](#how-long-can-i-be-inactive-before-being-removed-from-the-authorized-users-list) + * [What happens in case I change my user name?](#what-happens-in-case-i-change-my-user-name) * [Can we add package which are parts of bigger projects like Boost?](#can-we-add-package-which-are-parts-of-bigger-projects-like-boost) * [Can I add my project which I will submit to Boost?](#can-i-add-my-project-which-i-will-submit-to-boost) * [Can I add options that do not affect `package_id` or the package contents](#can-i-add-options-that-do-not-affect-package_id-or-the-package-contents) @@ -431,6 +432,14 @@ difficult to understand [linter errors](linters.md), please comment on your pull Please, read [Inactivity and user removal section](adding_packages/README.md#inactivity-and-user-removal). +## What happens in case I change my user name? + +Your Github user name is used to identify you in the authorized users list. If you change your user name, you will need to communicate or, in the #4, or opening a new issue. +Otherwise, the CI will not be able to find you and will not build your pull requests. +In case you change you user name just after asking for authorization in #4, please, communicate the change in the same issue. +Users are revised before being added to the authorized users list, in case the user name is not found in #4, it will be asked in the pull request `Update authorized users list`. +If the user does not answer, the user will be moved to the `waitlist_users.yml` file, until having further communication. + ## Can we add package which are parts of bigger projects like Boost? Sadly no. There have been many efforts in the past and we feel it's not sustainable given the number of combinations of libraries and version. From 846e6ad2264fce276bac6dd4b0459c8635e5381b Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:27:01 +0100 Subject: [PATCH 008/108] (#21239) xkbcommon: put wayland-protocols in build requirements irrespective of one or dual profile + bump dependencies * put wayland-protocols in build requirements irrespective of conan profile usage * bump libxml2 and meson * try manual creation of pkgconfig file of wayland-protocols at build time instead of generate time * try dependencies.build? * use legacy deps_cpp_info * move back manual generation of wayland-protocols.pc if 1 profile to generate() * back to libxml/2.11.4 for the moment due to version conflict with wayland * Revert "back to libxml/2.11.4 for the moment due to version conflict with wayland" This reverts commit d55b7ea4d79c8641ff17f20b35e737c13e37164f. * small change to make CI happy --------- Co-authored-by: Daniel --- recipes/xkbcommon/all/conanfile.py | 83 +++++++++++++++--------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/recipes/xkbcommon/all/conanfile.py b/recipes/xkbcommon/all/conanfile.py index aa22ef2b05309..c646e023dd17c 100644 --- a/recipes/xkbcommon/all/conanfile.py +++ b/recipes/xkbcommon/all/conanfile.py @@ -1,16 +1,17 @@ import os +import textwrap from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, replace_in_file, rmdir, save from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2 || >=2.0.5" class XkbcommonConan(ConanFile): @@ -68,8 +69,6 @@ def requirements(self): self.requires("libxml2/2.12.3") if self.options.get_safe("with_wayland"): self.requires("wayland/1.22.0") - if not self._has_build_profile: - self.requires("wayland-protocols/1.32") def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: @@ -80,8 +79,9 @@ def build_requirements(self): self.tool_requires("bison/3.8.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") - if self._has_build_profile and self.options.get_safe("with_wayland"): - self.tool_requires("wayland/") + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + self.tool_requires("wayland/") self.tool_requires("wayland-protocols/1.32") def source(self): @@ -90,6 +90,9 @@ def source(self): def generate(self): env = VirtualBuildEnv(self) env.generate() + if self.options.get_safe("with_wayland") and not self._has_build_profile: + env = VirtualRunEnv(self) + env.generate(scope="build") tc = MesonToolchain(self) tc.project_options["enable-docs"] = False @@ -97,46 +100,46 @@ def generate(self): tc.project_options["enable-x11"] = self.options.with_x11 if self._has_xkbregistry_option: tc.project_options["enable-xkbregistry"] = self.options.xkbregistry - if self._has_build_profile: - tc.project_options["build.pkg_config_path"] = self.generators_folder + tc.project_options["build.pkg_config_path"] = self.generators_folder tc.generate() pkg_config_deps = PkgConfigDeps(self) - if self._has_build_profile and self.options.get_safe("with_wayland"): - pkg_config_deps.build_context_activated = ["wayland", "wayland-protocols"] - pkg_config_deps.build_context_suffix = {"wayland": "_BUILD", "wayland-protocols": "_BUILD"} - pkg_config_deps.generate() - - def build(self): if self.options.get_safe("with_wayland"): - meson_build_file = os.path.join(self.source_folder, "meson.build") - # Patch the build system to use the pkg-config files generated for the build context. - - if Version(self.version) >= "1.5.0": - get_pkg_config_var = "get_variable(pkgconfig: " - else: - get_pkg_config_var = "get_pkgconfig_variable(" - if self._has_build_profile: - replace_in_file(self, meson_build_file, - "wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)", - "wayland_scanner_dep = dependency('wayland-scanner_BUILD', required: false, native: true)") - replace_in_file(self, meson_build_file, - "wayland_protocols_dep = dependency('wayland-protocols', version: '>=1.12', required: false)", - "wayland_protocols_dep = dependency('wayland-protocols_BUILD', version: '>=1.12', required: false, native: true)") + pkg_config_deps.build_context_activated = ["wayland", "wayland-protocols"] + pkg_config_deps.build_context_suffix = {"wayland": "_BUILD"} else: - replace_in_file(self, meson_build_file, - "wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)", - "# wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)") - - replace_in_file(self, meson_build_file, - "if not wayland_client_dep.found() or not wayland_protocols_dep.found() or not wayland_scanner_dep.found()", - "if not wayland_client_dep.found() or not wayland_protocols_dep.found()") + # Manually generate pkgconfig file of wayland-protocols since + # PkgConfigDeps.build_context_activated can't work with legacy 1 profile + # We must use legacy conan v1 deps_cpp_info because self.dependencies doesn't + # contain build requirements when using 1 profile. + wp_prefix = self.deps_cpp_info["wayland-protocols"].rootpath + wp_version = self.deps_cpp_info["wayland-protocols"].version + wp_pkg_content = textwrap.dedent(f"""\ + prefix={wp_prefix} + datarootdir=${{prefix}}/res + pkgdatadir=${{datarootdir}}/wayland-protocols + Name: Wayland Protocols + Description: Wayland protocol files + Version: {wp_version} + """) + save(self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) + pkg_config_deps.generate() - replace_in_file(self, meson_build_file, - f"wayland_scanner = find_program(wayland_scanner_dep.{get_pkg_config_var}'wayland_scanner'))", - "wayland_scanner = find_program('wayland-scanner')") + def _patch_sources(self): + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + # Patch the build system to use the pkg-config files generated for the build context. + meson_build_file = os.path.join(self.source_folder, "meson.build") + replace_in_file( + self, + meson_build_file, + "wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)", + "wayland_scanner_dep = dependency('wayland-scanner_BUILD', required: false, native: true)", + ) + def build(self): + self._patch_sources() meson = Meson(self) meson.configure() meson.build() @@ -167,8 +170,6 @@ def package_info(self): self.cpp_info.components["xkbcli-interactive-wayland"].libs = [] self.cpp_info.components["xkbcli-interactive-wayland"].includedirs = [] self.cpp_info.components["xkbcli-interactive-wayland"].requires = ["wayland::wayland-client"] - if not self._has_build_profile: - self.cpp_info.components["xkbcli-interactive-wayland"].requires.append("wayland-protocols::wayland-protocols") if Version(self.version) >= "1.0.0": self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) From 0c171ff419e92c3e927c2e1858630d65d3f85fa3 Mon Sep 17 00:00:00 2001 From: Dmitry Bely Date: Thu, 8 Feb 2024 09:04:08 +0000 Subject: [PATCH 009/108] (#19226) pixman: fix static and allow shared MSVC build * pixman: avoid __declspec(dllexport) for static MSVC build * pixman/0.40.0: enable shared MSVC build --- recipes/pixman/all/conandata.yml | 4 +++ recipes/pixman/all/conanfile.py | 10 ++++--- .../all/patches/0003-meson-static-build.patch | 28 +++++++++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 recipes/pixman/all/patches/0003-meson-static-build.patch diff --git a/recipes/pixman/all/conandata.yml b/recipes/pixman/all/conandata.yml index 64d7ea0c4a642..f712201caaef3 100644 --- a/recipes/pixman/all/conandata.yml +++ b/recipes/pixman/all/conandata.yml @@ -30,6 +30,10 @@ patches: patch_description: "backport fix for clang build" patch_type: "portability" patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/48" + - patch_file: "patches/0003-meson-static-build.patch" + patch_description: "backport fix for msvc static build" + patch_type: "bugfix" + patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/commit/48d5df1f3772a08a929dcb3b2fe4d7b1853223c9.patch" "0.38.4": - patch_file: "patches/0002-meson-build.patch" patch_description: "backport meson build files from 0.40.0 to fix windows build" diff --git a/recipes/pixman/all/conanfile.py b/recipes/pixman/all/conanfile.py index aca2fe9a7ec26..8d655189662cb 100644 --- a/recipes/pixman/all/conanfile.py +++ b/recipes/pixman/all/conanfile.py @@ -11,6 +11,7 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -50,8 +51,8 @@ def layout(self): basic_layout(self, src_folder="src") def validate(self): - if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("pixman can only be built as a static library on Windows") + if self.settings.os == "Windows" and self.options.shared and Version(self.version) < "0.40.0": + raise ConanInvalidConfiguration(f"pixman/{self.version} can only be built as a static library on Windows") def build_requirements(self): self.tool_requires("meson/1.2.3") @@ -84,16 +85,17 @@ def package(self): copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) meson = Meson(self) meson.install() + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) lib_folder = os.path.join(self.package_folder, "lib") rmdir(self, os.path.join(lib_folder, "pkgconfig")) rm(self, "*.la", lib_folder) fix_apple_shared_install_name(self) - if is_msvc(self): + if is_msvc(self) and not self.options.shared: prefix = "libpixman-1" rename(self, os.path.join(lib_folder, f"{prefix}.a"), os.path.join(lib_folder, f"{prefix}.lib")) def package_info(self): - self.cpp_info.libs = ['libpixman-1'] if self.settings.os == "Windows" else ['pixman-1'] + self.cpp_info.libs = ['libpixman-1'] if self.settings.os == "Windows" and not self.options.shared else ['pixman-1'] self.cpp_info.includedirs.append(os.path.join("include", "pixman-1")) self.cpp_info.set_property("pkg_config_name", "pixman-1") if self.settings.os in ("FreeBSD", "Linux"): diff --git a/recipes/pixman/all/patches/0003-meson-static-build.patch b/recipes/pixman/all/patches/0003-meson-static-build.patch new file mode 100644 index 0000000000000..6283ba2680054 --- /dev/null +++ b/recipes/pixman/all/patches/0003-meson-static-build.patch @@ -0,0 +1,28 @@ +From 48d5df1f3772a08a929dcb3b2fe4d7b1853223c9 Mon Sep 17 00:00:00 2001 +From: Benjamin Gilbert +Date: Thu, 5 Jan 2023 20:29:00 -0500 +Subject: [PATCH] meson: don't dllexport when built as static library + +If a static Pixman is linked with a dynamic library, Pixman shouldn't +export its own symbols into the latter's ABI. +--- + pixman/meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/pixman/meson.build b/pixman/meson.build +index 5dce870..62ec66b 100644 +--- a/pixman/meson.build ++++ b/pixman/meson.build +@@ -31,7 +31,8 @@ version_h = configure_file( + ) + + libpixman_extra_cargs = [] +-if cc.has_function_attribute('dllexport') ++default_library = get_option('default_library') ++if default_library != 'static' and cc.has_function_attribute('dllexport') + libpixman_extra_cargs = ['-DPIXMAN_API=__declspec(dllexport)'] + endif + +-- +GitLab + From d0a485982326c97eaf5b500697b7726d15df4f6c Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 8 Feb 2024 10:22:44 +0100 Subject: [PATCH 010/108] (#22713) [docs] Add changelog 07-February-2024 Signed-off-by: Uilian Ries --- docs/changelog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 242fce4e25c14..e5f21f6b7c8bf 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,10 @@ # Changelog +### 07-February-2024 - 15:43 CET + +- [feature] Add waiting list for new collaborators that are not found in access request issue. +- [feature] Skip building bump dependencies PRs by default. It will require manual CI trigger. + ### 24-January-2024 - 12:13 CET - [feature] Update Conan 1.x branch to version 1.62.0 From 529290c656381db8dfb68c79e21312ad1afd8ea1 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 8 Feb 2024 18:48:13 +0900 Subject: [PATCH 011/108] (#22560) mgclient: add recipe * mgclient: add recipe * add CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * fix dll install path --- recipes/mgclient/all/conandata.yml | 9 ++ recipes/mgclient/all/conanfile.py | 100 ++++++++++++++++++ .../1.4.2-0001-static-shared.build.patch | 43 ++++++++ .../mgclient/all/test_package/CMakeLists.txt | 7 ++ .../mgclient/all/test_package/conanfile.py | 26 +++++ .../mgclient/all/test_package/test_package.c | 22 ++++ recipes/mgclient/config.yml | 3 + 7 files changed, 210 insertions(+) create mode 100644 recipes/mgclient/all/conandata.yml create mode 100644 recipes/mgclient/all/conanfile.py create mode 100644 recipes/mgclient/all/patches/1.4.2-0001-static-shared.build.patch create mode 100644 recipes/mgclient/all/test_package/CMakeLists.txt create mode 100644 recipes/mgclient/all/test_package/conanfile.py create mode 100644 recipes/mgclient/all/test_package/test_package.c create mode 100644 recipes/mgclient/config.yml diff --git a/recipes/mgclient/all/conandata.yml b/recipes/mgclient/all/conandata.yml new file mode 100644 index 0000000000000..a07869d5875d5 --- /dev/null +++ b/recipes/mgclient/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.4.2": + url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.2.tar.gz" + sha256: "aa89422636b1e25b8f9f34453f331e15d32a5957a9b2381c3598fc3644dbc043" +patches: + "1.4.2": + - patch_file: "patches/1.4.2-0001-static-shared.build.patch" + patch_description: "make static and shared build separated" + patch_type: "conan" diff --git a/recipes/mgclient/all/conanfile.py b/recipes/mgclient/all/conanfile.py new file mode 100644 index 0000000000000..958881a323221 --- /dev/null +++ b/recipes/mgclient/all/conanfile.py @@ -0,0 +1,100 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.53.0" + +class MGClientConan(ConanFile): + name = "mgclient" + description = "C/C++ Memgraph Client" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/memgraph/mgclient" + topics = ("memgraph", "client") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_cpp": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_cpp": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("openssl/[>=1.1 <4]") + + def validate(self): + if self.options.with_cpp: + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_CPP_BINDINGS"] = self.options.with_cpp + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["mgclient"] + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/mgclient/all/patches/1.4.2-0001-static-shared.build.patch b/recipes/mgclient/all/patches/1.4.2-0001-static-shared.build.patch new file mode 100644 index 0000000000000..efba4fc8b2bb4 --- /dev/null +++ b/recipes/mgclient/all/patches/1.4.2-0001-static-shared.build.patch @@ -0,0 +1,43 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e905e85..85a6b0a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -50,6 +50,7 @@ else() + find_package(OpenSSL REQUIRED) + include(GenerateExportHeader) + ++ if(NOT BUILD_SHARED_LIBS) + add_library(mgclient-static STATIC ${mgclient_src_files}) + + generate_export_header(mgclient-static +@@ -74,6 +75,7 @@ else() + target_link_libraries(mgclient-static PUBLIC ws2_32) + endif() + ++ else() + add_library(mgclient-shared SHARED ${mgclient_src_files}) + + generate_export_header(mgclient-shared +@@ -102,13 +104,21 @@ else() + generate_export_header(mgclient-shared + BASE_NAME "mgclient" + EXPORT_FILE_NAME "mgclient-export.h") ++ endif() + + include(GNUInstallDirs) + +- install(TARGETS mgclient-static mgclient-shared ++ if(NOT BUILD_SHARED_LIBS) ++ install(TARGETS mgclient-static + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ else() ++ install(TARGETS mgclient-shared ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ endif() + install(DIRECTORY + "${PROJECT_SOURCE_DIR}/include/" + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/mgclient/all/test_package/CMakeLists.txt b/recipes/mgclient/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..cbe32d3f6014a --- /dev/null +++ b/recipes/mgclient/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(mgclient REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE mgclient::mgclient) diff --git a/recipes/mgclient/all/test_package/conanfile.py b/recipes/mgclient/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/mgclient/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mgclient/all/test_package/test_package.c b/recipes/mgclient/all/test_package/test_package.c new file mode 100644 index 0000000000000..078593ee4c3ab --- /dev/null +++ b/recipes/mgclient/all/test_package/test_package.c @@ -0,0 +1,22 @@ +#include +#include + +#include "mgclient.h" + +int main(int argc, char *argv[]) { + mg_init(); + printf("mgclient version: %s\n", mg_client_version()); + + mg_session_params *params = mg_session_params_make(); + if (!params) { + fprintf(stderr, "failed to allocate session parameters\n"); + exit(1); + } + mg_session_params_set_host(params, "localhsot"); + mg_session_params_set_port(params, 8888); + mg_session_params_set_sslmode(params, MG_SSLMODE_DISABLE); + + mg_finalize(); + + return 0; +} diff --git a/recipes/mgclient/config.yml b/recipes/mgclient/config.yml new file mode 100644 index 0000000000000..ba127d382373b --- /dev/null +++ b/recipes/mgclient/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4.2": + folder: all From 61fa1243613aa6395f44048375949a2dfca5f2e1 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 8 Feb 2024 19:08:06 +0900 Subject: [PATCH 012/108] (#22583) mapbox-wagyu: add recipe * mapbox-wagyu: add recipe * fix licese name Co-authored-by: Uilian Ries * remove boost * remove transitive_headers --------- Co-authored-by: Uilian Ries --- recipes/mapbox-wagyu/all/conandata.yml | 4 ++ recipes/mapbox-wagyu/all/conanfile.py | 68 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 +++ .../all/test_package/conanfile.py | 26 +++++++ .../all/test_package/test_package.cpp | 28 ++++++++ recipes/mapbox-wagyu/config.yml | 3 + 6 files changed, 137 insertions(+) create mode 100644 recipes/mapbox-wagyu/all/conandata.yml create mode 100644 recipes/mapbox-wagyu/all/conanfile.py create mode 100644 recipes/mapbox-wagyu/all/test_package/CMakeLists.txt create mode 100644 recipes/mapbox-wagyu/all/test_package/conanfile.py create mode 100644 recipes/mapbox-wagyu/all/test_package/test_package.cpp create mode 100644 recipes/mapbox-wagyu/config.yml diff --git a/recipes/mapbox-wagyu/all/conandata.yml b/recipes/mapbox-wagyu/all/conandata.yml new file mode 100644 index 0000000000000..b9f6cbffdb795 --- /dev/null +++ b/recipes/mapbox-wagyu/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.5.0": + url: "https://github.com/mapbox/wagyu/archive/refs/tags/0.5.0.tar.gz" + sha256: "88c41eaba03107ebe79052fdbd66e419e903d331a2616a51849018e13648ab83" diff --git a/recipes/mapbox-wagyu/all/conanfile.py b/recipes/mapbox-wagyu/all/conanfile.py new file mode 100644 index 0000000000000..c742efbc4dde0 --- /dev/null +++ b/recipes/mapbox-wagyu/all/conanfile.py @@ -0,0 +1,68 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class MapboxWagyuConan(ConanFile): + name = "mapbox-wagyu" + description = "A general library for geometry operations of union, intersections, difference, and xor" + license = "LicenseRef-mapbox-wagyu" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mapbox/wagyu/" + topics = ("geometry", "clipping", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("mapbox-geometry/2.0.3") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/mapbox-wagyu/all/test_package/CMakeLists.txt b/recipes/mapbox-wagyu/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..84fec480cbc2c --- /dev/null +++ b/recipes/mapbox-wagyu/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(mapbox-wagyu REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE mapbox-wagyu::mapbox-wagyu) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/mapbox-wagyu/all/test_package/conanfile.py b/recipes/mapbox-wagyu/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/mapbox-wagyu/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mapbox-wagyu/all/test_package/test_package.cpp b/recipes/mapbox-wagyu/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..0cd92638b261b --- /dev/null +++ b/recipes/mapbox-wagyu/all/test_package/test_package.cpp @@ -0,0 +1,28 @@ +#include + +#include +#include + +int main() { + mapbox::geometry::point< std::int64_t> p1 = { 0, 0 }; + mapbox::geometry::point< std::int64_t> p2 = { 100, 100 }; + mapbox::geometry::box< std::int64_t> bbox(p1, p2); + + mapbox::geometry::linear_ring< std::int64_t> lr; + lr.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + lr.push_back(mapbox::geometry::point< std::int64_t>(175, 25)); + lr.push_back(mapbox::geometry::point< std::int64_t>(175, 75)); + lr.push_back(mapbox::geometry::point< std::int64_t>(25, 75)); + lr.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + + auto out = mapbox::geometry::wagyu::quick_clip::quick_lr_clip(lr, bbox); + + mapbox::geometry::linear_ring< std::int64_t> want; + want.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + want.push_back(mapbox::geometry::point< std::int64_t>(100, 25)); + want.push_back(mapbox::geometry::point< std::int64_t>(100, 75)); + want.push_back(mapbox::geometry::point< std::int64_t>(25, 75)); + want.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + + assert(out == want); +} diff --git a/recipes/mapbox-wagyu/config.yml b/recipes/mapbox-wagyu/config.yml new file mode 100644 index 0000000000000..ca7b2c3985d5e --- /dev/null +++ b/recipes/mapbox-wagyu/config.yml @@ -0,0 +1,3 @@ +versions: + "0.5.0": + folder: all From 651f0e641c4799e2637068c98605a73cf3aaeac6 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 8 Feb 2024 11:43:12 +0100 Subject: [PATCH 013/108] (#22705) [c-blosc2] Revert checksum * Revert checksum for c-blosc2 Signed-off-by: Uilian Ries * more topics Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/c-blosc2/all/conandata.yml | 14 +++++++------- recipes/c-blosc2/all/conanfile.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes/c-blosc2/all/conandata.yml b/recipes/c-blosc2/all/conandata.yml index 647496032bc04..6975b1d26667a 100644 --- a/recipes/c-blosc2/all/conandata.yml +++ b/recipes/c-blosc2/all/conandata.yml @@ -1,25 +1,25 @@ sources: "2.13.1": url: "https://github.com/Blosc/c-blosc2/archive/v2.13.1.tar.gz" - sha256: "8e71ed3ca2eb4dad13adc34b2e88fb2687b63b8d9cc904aaf60510d75c44ff47" + sha256: "6e7f5940269acd54d8dfe87c2102a442ad0407b1a62266a6f916134bae234399" "2.13.0": url: "https://github.com/Blosc/c-blosc2/archive/v2.13.0.tar.gz" - sha256: "931ab054e83ebc98786f2e014156c6b5168af27e52d37d63523fa1a87c080f44" + sha256: "d886798ff0a63948a4076f2ed60f0dc18be3aa1299ac1aff2cf705419cbe1bea" "2.12.0": url: "https://github.com/Blosc/c-blosc2/archive/v2.12.0.tar.gz" - sha256: "51685bab203685100d03ece2e724a3ea035174fd6108e3c45a55a1a60e0ec350" + sha256: "b8fa07ab0627c19fb652e08a5ada197eb0939b75e97e2fb76bbee145eaedc6e9" "2.11.3": url: "https://github.com/Blosc/c-blosc2/archive/v2.11.3.tar.gz" - sha256: "89e5e1019853e0fbb5ebb97828abb141cae8dba0d7bf5d29364d07d227f864f0" + sha256: "7273ec3ab42adc247425ab34b0601db86a6e2a6aa1a97a11e29df02e078f5037" "2.10.5": url: "https://github.com/Blosc/c-blosc2/archive/v2.10.5.tar.gz" - sha256: "3540ac942d845beedb432cf4f65c2c30c3818e211e094f1320563f9aa2bc7b3b" + sha256: "a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d" "2.8.0": url: "https://github.com/Blosc/c-blosc2/archive/v2.8.0.tar.gz" - sha256: "97327e493908911ee06dd5144afa8818de255127305e63ef39368d8d8ae2cb06" + sha256: "be608cdf68deb02e0d3ee62e183942a0fe5d5d3185375b9b6566e2ae35a9bdbd" "2.6.1": url: "https://github.com/Blosc/c-blosc2/archive/v2.6.1.tar.gz" - sha256: "4a91b229cfa5beb89ab9edb75f7a45e501ac6bb19a9b73a26f06e9b2a1f42875" + sha256: "514a793368093893c1a7cae030f7e31faca7f86465ae69dd576f256d8bf28c08" patches: "2.13.1": - patch_file: "patches/2.11.1-0001-fix-cmake.patch" diff --git a/recipes/c-blosc2/all/conanfile.py b/recipes/c-blosc2/all/conanfile.py index 7d0ee7490f4cd..33223628423bf 100644 --- a/recipes/c-blosc2/all/conanfile.py +++ b/recipes/c-blosc2/all/conanfile.py @@ -18,7 +18,7 @@ class CBlosc2Conan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Blosc/c-blosc2" - topics = ("c-blosc", "blosc", "compression") + topics = ("c-blosc", "blosc", "compression", "cache", "store") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { From 42cffa831bb9fea5cd05d56f507b0d92db320646 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 8 Feb 2024 20:08:51 +0900 Subject: [PATCH 014/108] (#22649) ignition-cmake: add version 2.17.1, rename patch filename --- recipes/ignition-cmake/all/conandata.yml | 24 +++++--- ...ixes.patch => 2.10.0-0001-fix-cmake.patch} | 0 .../all/patches/2.17.1-0001-fix-cmake.patch | 58 +++++++++++++++++++ ...fixes.patch => 2.5.0-0001-fix-cmake.patch} | 0 recipes/ignition-cmake/config.yml | 4 +- 5 files changed, 78 insertions(+), 8 deletions(-) rename recipes/ignition-cmake/all/patches/{0002-ignition-cmake-2.10.0-fixes.patch => 2.10.0-0001-fix-cmake.patch} (100%) create mode 100644 recipes/ignition-cmake/all/patches/2.17.1-0001-fix-cmake.patch rename recipes/ignition-cmake/all/patches/{0001-cmake-fixes.patch => 2.5.0-0001-fix-cmake.patch} (100%) diff --git a/recipes/ignition-cmake/all/conandata.yml b/recipes/ignition-cmake/all/conandata.yml index ccb98d28636f3..7fffddb3eb19f 100644 --- a/recipes/ignition-cmake/all/conandata.yml +++ b/recipes/ignition-cmake/all/conandata.yml @@ -1,13 +1,23 @@ sources: - "2.5.0": - url: "https://github.com/gazebosim/gz-cmake/archive/ignition-cmake2_2.5.0.zip" - sha256: "30945958fbe598f654d30de926a798f9055b1c635f7d85441ecba1ebe0804d2d" + "2.17.1": + url: "https://github.com/gazebosim/gz-cmake/archive/refs/tags/ignition-cmake2_2.17.1.tar.gz" + sha256: "f8dbadac71540324e0c506b607cefa99e99a8aca997f7af8e67cb486eb610cc0" "2.10.0": url: "https://github.com/gazebosim/gz-cmake/archive/refs/tags/ignition-cmake2_2.10.0.tar.gz" sha256: "48a01131731b09c32cfc7d577c4db378fb02e49a071e24c9299624766e1d05a2" - -patches: "2.5.0": - - patch_file: "patches/0001-cmake-fixes.patch" + url: "https://github.com/gazebosim/gz-cmake/archive/refs/tags/ignition-cmake2_2.5.0.tar.gz" + sha256: "d19d0005f0a8dcf79851376a8beff13a0d41b441dd00b3504d218e912dba9d1e" +patches: + "2.17.1": + - patch_file: "patches/2.17.1-0001-fix-cmake.patch" + patch_description: "fix cmake folders" + patch_type: "conan" "2.10.0": - - patch_file: "patches/0002-ignition-cmake-2.10.0-fixes.patch" + - patch_file: "patches/2.10.0-0001-fix-cmake.patch" + patch_description: "fix cmake folders" + patch_type: "conan" + "2.5.0": + - patch_file: "patches/2.5.0-0001-fix-cmake.patch" + patch_description: "fix cmake folders" + patch_type: "conan" diff --git a/recipes/ignition-cmake/all/patches/0002-ignition-cmake-2.10.0-fixes.patch b/recipes/ignition-cmake/all/patches/2.10.0-0001-fix-cmake.patch similarity index 100% rename from recipes/ignition-cmake/all/patches/0002-ignition-cmake-2.10.0-fixes.patch rename to recipes/ignition-cmake/all/patches/2.10.0-0001-fix-cmake.patch diff --git a/recipes/ignition-cmake/all/patches/2.17.1-0001-fix-cmake.patch b/recipes/ignition-cmake/all/patches/2.17.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..efd3c2a4c4a5f --- /dev/null +++ b/recipes/ignition-cmake/all/patches/2.17.1-0001-fix-cmake.patch @@ -0,0 +1,58 @@ +diff --git a/cmake/IgnCMake.cmake b/cmake/IgnCMake.cmake +index b4aa7e3..17ece86 100644 +--- a/cmake/IgnCMake.cmake ++++ b/cmake/IgnCMake.cmake +@@ -37,3 +37,10 @@ include(IgnSanitizers) + #============================================================================ + include(CMakePackageConfigHelpers) + include(CMakeParseArguments) ++ ++set(IGNITION_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}") ++set(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../..") ++set(IGNITION_CMAKE_DOXYGEN_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/doxygen") ++set(IGNITION_CMAKE_CODECHECK_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/codecheck") ++set(IGNITION_CMAKE_BENCHMARK_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/benchmark") ++set(IGNITION_CMAKE_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/tools") +diff --git a/cmake/IgnSetCompilerFlags.cmake b/cmake/IgnSetCompilerFlags.cmake +index 0a6b5b5..03df75b 100644 +--- a/cmake/IgnSetCompilerFlags.cmake ++++ b/cmake/IgnSetCompilerFlags.cmake +@@ -77,9 +77,9 @@ macro(ign_setup_unix) + exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL + "processor type (i386 and x86_64)") +- if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") +- set(IGN_ADD_fPIC_TO_LIBRARIES true) +- endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") ++ # if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") ++ # set(IGN_ADD_fPIC_TO_LIBRARIES true) ++ # endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + endif(CMAKE_UNAME) + + endmacro() +@@ -93,8 +93,10 @@ macro(ign_setup_apple) + # 10.x.x = Mac OSX Snow Leopard (10.6) + # 11.x.x = Mac OSX Lion (10.7) + # 12.x.x = Mac OSX Mountain Lion (10.8) +- if(${CMAKE_SYSTEM_VERSION} LESS 10) +- add_definitions(-DMAC_OS_X_VERSION=1050) ++ if(NOT CMAKE_SYSTEM_VERSION) ++ return() ++ elseif(${CMAKE_SYSTEM_VERSION} LESS 10) ++ add_definitions(-DMAC_OS_X_VERSION=1050) + elseif(${CMAKE_SYSTEM_VERSION} GREATER 10 AND ${CMAKE_SYSTEM_VERSION} LESS 11) + add_definitions(-DMAC_OS_X_VERSION=1060) + elseif(${CMAKE_SYSTEM_VERSION} GREATER 11 AND ${CMAKE_SYSTEM_VERSION} LESS 12) +diff --git a/cmake/IgnUtils.cmake b/cmake/IgnUtils.cmake +index 9b94c85..5e525e6 100644 +--- a/cmake/IgnUtils.cmake ++++ b/cmake/IgnUtils.cmake +@@ -1409,7 +1409,7 @@ macro(_ign_add_library_or_component) + # Generate export macro headers + # Note: INTERFACE libraries do not need the export header + set(binary_include_dir +- "${CMAKE_BINARY_DIR}/include/${include_dir}") ++ "${PROJECT_BINARY_DIR}/include/${include_dir}") + + set(implementation_file_name "${binary_include_dir}/detail/Export.hh") + diff --git a/recipes/ignition-cmake/all/patches/0001-cmake-fixes.patch b/recipes/ignition-cmake/all/patches/2.5.0-0001-fix-cmake.patch similarity index 100% rename from recipes/ignition-cmake/all/patches/0001-cmake-fixes.patch rename to recipes/ignition-cmake/all/patches/2.5.0-0001-fix-cmake.patch diff --git a/recipes/ignition-cmake/config.yml b/recipes/ignition-cmake/config.yml index 90aed98c5dd74..1d34d3bb6f93d 100644 --- a/recipes/ignition-cmake/config.yml +++ b/recipes/ignition-cmake/config.yml @@ -1,5 +1,7 @@ versions: - "2.5.0": + "2.17.1": folder: all "2.10.0": folder: all + "2.5.0": + folder: all From 859548a127a6c812f04944bd31667bfd1d83499e Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Thu, 8 Feb 2024 06:28:36 -0500 Subject: [PATCH 015/108] (#22712) tk: Fix apple shared install name --- recipes/tk/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/tk/all/conanfile.py b/recipes/tk/all/conanfile.py index 2683c9b951f69..1d1ce6f92531f 100644 --- a/recipes/tk/all/conanfile.py +++ b/recipes/tk/all/conanfile.py @@ -2,7 +2,7 @@ from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration -from conan.tools.apple import is_apple_os +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import ( @@ -242,6 +242,8 @@ def package(self): # This can only be modified after build since the value being replaced is a result # of variable substitution in tkConfig.sh.in replace_in_file(self, tkConfigShPath, "//", "${TK_ROOT}/") + + fix_apple_shared_install_name(self) def package_info(self): tk_version = Version(self.version) From 8606c23837ddd0fea46847dae43620484ebdccf4 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Thu, 8 Feb 2024 21:48:44 +0800 Subject: [PATCH 016/108] (#22596) initial implementation of etcd-cpp-apiv3 * initial implementation of etcd-cpp-apiv3 * make linter happy * make linter happy * use CMakeDeps * update test package; collect libs * add check for grpc - it shall be static lib * remove generated cmake files * add transitive libs * Update recipes/etcd-cpp-apiv3/all/conanfile.py Co-authored-by: Uilian Ries * disable macos support for now * prepare to CCI Signed-off-by: Uilian Ries * remove not used import Signed-off-by: Uilian Ries * Fix path separator in Windows * use C++14 by default Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/etcd-cpp-apiv3/all/conandata.yml | 4 + recipes/etcd-cpp-apiv3/all/conanfile.py | 110 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 7 ++ .../all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.cpp | 13 +++ recipes/etcd-cpp-apiv3/config.yml | 3 + 6 files changed, 163 insertions(+) create mode 100644 recipes/etcd-cpp-apiv3/all/conandata.yml create mode 100644 recipes/etcd-cpp-apiv3/all/conanfile.py create mode 100644 recipes/etcd-cpp-apiv3/all/test_package/CMakeLists.txt create mode 100644 recipes/etcd-cpp-apiv3/all/test_package/conanfile.py create mode 100644 recipes/etcd-cpp-apiv3/all/test_package/test_package.cpp create mode 100644 recipes/etcd-cpp-apiv3/config.yml diff --git a/recipes/etcd-cpp-apiv3/all/conandata.yml b/recipes/etcd-cpp-apiv3/all/conandata.yml new file mode 100644 index 0000000000000..639ef314f4821 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.15.4": + url: "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/archive/refs/tags/v0.15.4.tar.gz" + sha256: "4516ecfa420826088c187efd42dad249367ca94ea6cdfc24e3030c3cf47af7b4" diff --git a/recipes/etcd-cpp-apiv3/all/conanfile.py b/recipes/etcd-cpp-apiv3/all/conanfile.py new file mode 100644 index 0000000000000..2d42f65ab0601 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/conanfile.py @@ -0,0 +1,110 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import get, copy, rmdir +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + +class EtcdCppApiv3Conan(ConanFile): + name = "etcd-cpp-apiv3" + package_type = "library" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3" + license = "BSD-3-Clause" + description = ("C++ library for etcd's v3 client APIs, i.e., ETCDCTL_API=3.") + topics = ("etcd", "api", ) + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "6", + "msvc": "191", + "Visual Studio": "15", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + if not self._is_legacy_one_profile: + self.tool_requires("protobuf/") + self.tool_requires("grpc/") + + def requirements(self): + self.requires("protobuf/3.21.12") + self.requires("openssl/[>=1.1 <4]") + self.requires("grpc/1.54.3") + self.requires("cpprestsdk/2.10.19", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if self._is_legacy_one_profile: + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = CMakeToolchain(self) + tc.variables["gRPC_VERSION"] = self.dependencies["grpc"].ref.version + tc.variables["ETCD_CMAKE_CXX_STANDARD"] = self.settings.compiler.get_safe("cppstd", self._min_cppstd) + tc.variables["OpenSSL_DIR"] = self.dependencies["openssl"].package_folder.replace('\\', '/') + tc.generate() + + cmake_deps = CMakeDeps(self) + cmake_deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["etcd-cpp-api"] diff --git a/recipes/etcd-cpp-apiv3/all/test_package/CMakeLists.txt b/recipes/etcd-cpp-apiv3/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..3dfe027a95ad7 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(etcd-cpp-apiv3 REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE etcd-cpp-apiv3::etcd-cpp-apiv3) diff --git a/recipes/etcd-cpp-apiv3/all/test_package/conanfile.py b/recipes/etcd-cpp-apiv3/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/etcd-cpp-apiv3/all/test_package/test_package.cpp b/recipes/etcd-cpp-apiv3/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..b481840dd6d30 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include +#include +#include "etcd/Client.hpp" + +static const std::string etcd_url = + etcdv3::detail::resolve_etcd_endpoints("http://127.0.0.1:2379"); + +int main() +{ + etcd::Client* etcd = etcd::Client::WithUser(etcd_url, "root", "root"); + return EXIT_SUCCESS; +} diff --git a/recipes/etcd-cpp-apiv3/config.yml b/recipes/etcd-cpp-apiv3/config.yml new file mode 100644 index 0000000000000..810f6e84b1f61 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/config.yml @@ -0,0 +1,3 @@ +versions: + "0.15.4": + folder: all From 0e94d7d040beee3010b9e764673eaf2a93b2b762 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 8 Feb 2024 17:28:15 +0200 Subject: [PATCH 017/108] (#22048) autoconf: add v2.72 * autoconf: add v2.72 * autoconf: revert to the old patching logic --- recipes/autoconf/all/conandata.yml | 17 +- recipes/autoconf/all/conanfile.py | 6 - .../2.72-0001-relocatable-autoconf.patch | 262 ++++++++++++++++++ .../2.72-0003-disable-man-regeneration.patch | 12 + recipes/autoconf/config.yml | 2 + 5 files changed, 291 insertions(+), 8 deletions(-) create mode 100644 recipes/autoconf/all/patches/2.72-0001-relocatable-autoconf.patch create mode 100644 recipes/autoconf/all/patches/2.72-0003-disable-man-regeneration.patch diff --git a/recipes/autoconf/all/conandata.yml b/recipes/autoconf/all/conandata.yml index aefee4cae6132..48a99f0a3f908 100644 --- a/recipes/autoconf/all/conandata.yml +++ b/recipes/autoconf/all/conandata.yml @@ -1,8 +1,21 @@ sources: + "2.72": + url: "https://ftpmirror.gnu.org/autoconf/autoconf-2.72.tar.xz" + sha256: "ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a" "2.71": - sha256: "431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c" - url: "https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz" + url: "https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz" + sha256: "f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4" patches: + "2.72": + - patch_file: "patches/2.72-0001-relocatable-autoconf.patch" + patch_description: "Replace instances where absolute paths are embedded the generated files" + patch_type: "conan" + - patch_file: "patches/2.71-0002-no-perl-path-in-shebang.patch" + patch_description: "Avoid build machine's perl path to be embedded the generated files" + patch_type: "conan" + - patch_file: "patches/2.72-0003-disable-man-regeneration.patch" + patch_description: "Disable man regeneration" + patch_type: "conan" "2.71": - patch_file: "patches/2.71-0001-relocatable-autoconf.patch" patch_description: "Replace instances where absolute paths are embedded the generated files" diff --git a/recipes/autoconf/all/conanfile.py b/recipes/autoconf/all/conanfile.py index 6030c1664be5b..048942c07adfc 100644 --- a/recipes/autoconf/all/conanfile.py +++ b/recipes/autoconf/all/conanfile.py @@ -105,12 +105,6 @@ def package_info(self): self.cpp_info.includedirs = [] self.cpp_info.resdirs = ["res"] - # TODO: These variables can be removed since the scripts now locate the resources - # relative to themselves. - dataroot_path = os.path.join(self.package_folder, "res", "autoconf") - self.buildenv_info.define_path("AC_MACRODIR", dataroot_path) - self.buildenv_info.define_path("autom4te_perllibdir", dataroot_path) - bin_path = os.path.join(self.package_folder, "bin") self.buildenv_info.define_path("AUTOCONF", os.path.join(bin_path, "autoconf")) self.buildenv_info.define_path("AUTORECONF", os.path.join(bin_path, "autoreconf")) diff --git a/recipes/autoconf/all/patches/2.72-0001-relocatable-autoconf.patch b/recipes/autoconf/all/patches/2.72-0001-relocatable-autoconf.patch new file mode 100644 index 0000000000000..a7ebbaa6c17bf --- /dev/null +++ b/recipes/autoconf/all/patches/2.72-0001-relocatable-autoconf.patch @@ -0,0 +1,262 @@ +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -427,7 +427,7 @@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LTLIBOBJS = @LTLIBOBJS@ +-M4 = @M4@ ++M4 = /usr/bin/env m4 + M4_DEBUGFILE = @M4_DEBUGFILE@ + M4_GNU = @M4_GNU@ + MAKEINFO = @MAKEINFO@ +diff --git a/bin/autoconf.in b/bin/autoconf.in +--- a/bin/autoconf.in ++++ b/bin/autoconf.in +@@ -26,10 +26,14 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; ++ $ENV{'trailer_m4'} ||= "$pkgdatadir/autoconf/trailer.m4"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +diff --git a/bin/autoheader.in b/bin/autoheader.in +--- a/bin/autoheader.in ++++ b/bin/autoheader.in +@@ -29,10 +29,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, "$pkgdatadir"; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -54,7 +57,8 @@ + our ($config_h, %symbol, %verbatim); + + # Lib files. +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $config_h_in; + my @prepend_include; + my @include; +diff --git a/bin/autom4te.in b/bin/autom4te.in +--- a/bin/autom4te.in ++++ b/bin/autom4te.in +@@ -25,10 +25,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -48,7 +51,8 @@ + use Autom4te::XFile; + + # Data directory. +-my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $pkgdatadir = $ENV{'AC_MACRODIR'} || "$scriptpath/../res/autoconf"; + + # $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE. + my %language; +@@ -91,7 +95,7 @@ + my $freeze = 0; + + # $M4. +-my $m4 = $ENV{"M4"} || '@M4@'; ++my $m4 = $ENV{"M4"} || '/usr/bin/env m4'; + # Some non-GNU m4's don't reject the --help option, so give them /dev/null. + fatal "need GNU m4 1.4 or later: $m4" + if system "$m4 --help &1 | grep reload-state >/dev/null"; +@@ -321,6 +325,12 @@ + if /^\s*(\#.*)?$/; + + my @words = shellwords ($_); ++ # not using: s#AUTOCONF_M4DIR#$pkgdatadir#r to support perl <5.14 ++ my @words_clone = @words; ++ @words = (); ++ foreach ( @words_clone ) { ++ push(@words, do { (my $tmp = $_) =~ s#AUTOCONF_M4DIR#$pkgdatadir#; $tmp }); ++ } + my $type = shift @words; + if ($type eq 'begin-language:') + { +diff --git a/bin/autoreconf.in b/bin/autoreconf.in +--- a/bin/autoreconf.in ++++ b/bin/autoreconf.in +@@ -28,11 +28,14 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + my $buildauxdir; + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + $buildauxdir = $ENV{'autom4te_buildauxdir'} || $pkgdatadir . '/build-aux'; +@@ -116,9 +119,10 @@ + "; + + # Lib files. +-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; +-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autoconf = $ENV{'AUTOCONF'} || "$scriptpath/@autoconf-name@"; ++my $autoheader = $ENV{'AUTOHEADER'} || "$scriptpath/@autoheader-name@"; ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $automake = $ENV{'AUTOMAKE'} || 'automake'; + my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; + my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; +diff --git a/bin/autoscan.in b/bin/autoscan.in +--- a/bin/autoscan.in ++++ b/bin/autoscan.in +@@ -27,10 +27,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -95,7 +98,8 @@ + my $log; + + # Autoconf and lib files. +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $autoconf = "$autom4te --language=autoconf"; + my @prepend_include; + my @include = ('@pkgdatadir@'); +diff --git a/bin/autoupdate.in b/bin/autoupdate.in +--- a/bin/autoupdate.in ++++ b/bin/autoupdate.in +@@ -28,10 +28,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -51,14 +54,15 @@ + use Autom4te::XFile; + + # Lib files. +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $autoconf = "$autom4te --language=autoconf"; + # We need to find m4sugar. + my @prepend_include; + my @include = ('@pkgdatadir@'); + my $force = 0; + # m4. +-my $m4 = $ENV{"M4"} || '@M4@'; ++my $m4 = $ENV{"M4"} || '/usr/bin/env m4'; + + + # $HELP +diff --git a/bin/ifnames.in b/bin/ifnames.in +--- a/bin/ifnames.in ++++ b/bin/ifnames.in +@@ -32,10 +32,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +diff --git a/lib/autom4te.in b/lib/autom4te.in +--- a/lib/autom4te.in ++++ b/lib/autom4te.in +@@ -115,7 +115,7 @@ + # This intermediate language is used by aclocal to build aclocal.m4. + + begin-language: "Autoconf-without-aclocal-m4" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: --cache=autom4te.cache + args: autoconf/autoconf.m4f + args: acsite.m4? +@@ -142,7 +142,7 @@ + ## -------- ## + + begin-language: "Autotest" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: autotest/autotest.m4f + args: package.m4? + args: local.at? +@@ -156,7 +156,7 @@ + ## ---- ## + + begin-language: "M4sh" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: m4sugar/m4sh.m4f + args: --mode 777 + args: --language M4sugar +@@ -168,6 +168,6 @@ + ## ------- ## + + begin-language: "M4sugar" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: m4sugar/m4sugar.m4f + end-language: "M4sugar" diff --git a/recipes/autoconf/all/patches/2.72-0003-disable-man-regeneration.patch b/recipes/autoconf/all/patches/2.72-0003-disable-man-regeneration.patch new file mode 100644 index 0000000000000..af2e738435ff6 --- /dev/null +++ b/recipes/autoconf/all/patches/2.72-0003-disable-man-regeneration.patch @@ -0,0 +1,12 @@ +--- Makefile.in ++++ Makefile.in +@@ -2171,9 +2171,2 @@ + .PHONY: install-data-hook install-data-hook-make-aux-scripts-executable + +-man/autoconf.1: $(common_dep) man/autoconf.w man/autoconf.x $(binsrcdir)/autoconf.in +-man/autoheader.1: $(common_dep) man/autoheader.w man/autoheader.x $(binsrcdir)/autoheader.in +-man/autom4te.1: $(common_dep) man/autom4te.w man/autom4te.x $(binsrcdir)/autom4te.in +-man/autoreconf.1: $(common_dep) man/autoreconf.w man/autoreconf.x $(binsrcdir)/autoreconf.in +-man/autoscan.1: $(common_dep) man/autoscan.w man/autoscan.x $(binsrcdir)/autoscan.in +-man/autoupdate.1: $(common_dep) man/autoupdate.w man/autoupdate.x $(binsrcdir)/autoupdate.in +-man/ifnames.1: $(common_dep) man/ifnames.w man/ifnames.x $(binsrcdir)/ifnames.in diff --git a/recipes/autoconf/config.yml b/recipes/autoconf/config.yml index f45dc3e529288..946e15e5dab08 100644 --- a/recipes/autoconf/config.yml +++ b/recipes/autoconf/config.yml @@ -1,3 +1,5 @@ versions: + "2.72": + folder: all "2.71": folder: all From adc0f733bd4e986d1d6ef0f634b09560a16335c8 Mon Sep 17 00:00:00 2001 From: Rob Boehne Date: Thu, 8 Feb 2024 09:54:26 -0600 Subject: [PATCH 018/108] (#22694) [expat] Add expat version 2.6.0 --- recipes/expat/all/conandata.yml | 3 +++ recipes/expat/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/expat/all/conandata.yml b/recipes/expat/all/conandata.yml index f3b9d575c901c..50ac4905f740e 100644 --- a/recipes/expat/all/conandata.yml +++ b/recipes/expat/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.0": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_0/expat-2.6.0.tar.xz" + sha256: "cb5f5a8ea211e1cabd59be0a933a52e3c02cc326e86a4d387d8d218e7ee47a3e" "2.5.0": url: "https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.xz" sha256: "ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe" diff --git a/recipes/expat/config.yml b/recipes/expat/config.yml index e09e9d75495cc..548e19d13502f 100644 --- a/recipes/expat/config.yml +++ b/recipes/expat/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.0": + folder: all "2.5.0": folder: all "2.4.9": From 7ed79e4be77253a3fc9c6c088657519de45145fb Mon Sep 17 00:00:00 2001 From: Cameron <54868046+crhowell3@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:08:15 -0600 Subject: [PATCH 019/108] (#22646) [opendis6] new recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial template for opendis6 * Added conandata, test package dirs * Fixed syntax error in conanfile * Syntax fix * Fixed conan build, now works * prepare for CCI Signed-off-by: Uilian Ries * Added CMake as a build req * Fixed linter issue * Updated SHA256 to new release file * Bumped min compiler versions * Update recipes/opendis6/all/conanfile.py * Update recipes/opendis6/all/conanfile.py * Update recipes/opendis6/all/conanfile.py * Update recipes/opendis6/all/test_package/CMakeLists.txt * Update recipes/opendis6/all/conanfile.py --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco --- recipes/opendis6/all/conandata.yml | 4 + recipes/opendis6/all/conanfile.py | 95 +++++++++++++++++++ .../opendis6/all/test_package/CMakeLists.txt | 8 ++ .../opendis6/all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.cpp | 14 +++ recipes/opendis6/config.yml | 3 + 6 files changed, 150 insertions(+) create mode 100644 recipes/opendis6/all/conandata.yml create mode 100644 recipes/opendis6/all/conanfile.py create mode 100644 recipes/opendis6/all/test_package/CMakeLists.txt create mode 100644 recipes/opendis6/all/test_package/conanfile.py create mode 100644 recipes/opendis6/all/test_package/test_package.cpp create mode 100644 recipes/opendis6/config.yml diff --git a/recipes/opendis6/all/conandata.yml b/recipes/opendis6/all/conandata.yml new file mode 100644 index 0000000000000..7824537ac8c80 --- /dev/null +++ b/recipes/opendis6/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.0": + url: "https://github.com/crhowell3/opendis6/archive/refs/tags/0.1.0.tar.gz" + sha256: "7acfd6ecdcea03c75f93834c4e8ad532aee03eb0fdd2736c9095e2d548214125" diff --git a/recipes/opendis6/all/conanfile.py b/recipes/opendis6/all/conanfile.py new file mode 100644 index 0000000000000..7e3a9bc79f7cc --- /dev/null +++ b/recipes/opendis6/all/conanfile.py @@ -0,0 +1,95 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration + +required_conan_version = ">=1.53.0" + +class OpenDis6Conan(ConanFile): + name = "opendis6" + homepage = "https://github.com/crhowell3/opendis6" + description = "Modern C++ implementation of IEEE 1278.1a-1998" + topics = ("library", "protocol", "dis") + url = "https://github.com/conan-io/conan-center-index" + license = "BSD-2-Clause" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + @property + def _min_cppstd(self): + return "17" + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "15", + "msvc": "191", + "gcc": "8.5", + "clang": "6", + "apple-clang": "14", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_EXAMPLES"] = False + tc.cache_variables["BUILD_TESTS"] = False + tc.generate() + + def layout(self): + cmake_layout(self, src_folder="src") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.22 <4]") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["OpenDIS6"] + self.cpp_info.set_property("cmake_file_name", "OpenDIS") + self.cpp_info.set_property("cmake_target_name", "OpenDIS::OpenDIS6") + self.cpp_info.set_property("cmake_target_aliases", ["OpenDIS::DIS6","OpenDIS6"]) + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/opendis6/all/test_package/CMakeLists.txt b/recipes/opendis6/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c3a404538b736 --- /dev/null +++ b/recipes/opendis6/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(OpenDIS CONFIG REQUIRED) + +add_executable(test_package_dis test_package.cpp) +target_link_libraries(test_package_dis PRIVATE OpenDIS::OpenDIS6) +set_target_properties(test_package_dis PROPERTIES CXX_STANDARD 17) diff --git a/recipes/opendis6/all/test_package/conanfile.py b/recipes/opendis6/all/test_package/conanfile.py new file mode 100644 index 0000000000000..8e56d28728132 --- /dev/null +++ b/recipes/opendis6/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + self.run(os.path.join(self.cpp.build.bindirs[0], + "test_package_dis"), env="conanrun") diff --git a/recipes/opendis6/all/test_package/test_package.cpp b/recipes/opendis6/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8d0bb6749255c --- /dev/null +++ b/recipes/opendis6/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include + +#include "dis6/entity_information/EntityStatePdu.h" + +int main() { + dis::EntityStatePdu pdu1, pdu2; + + dis::DataStream ds(dis::kBig); + pdu1.Marshal(ds); + pdu2.Unmarshal(ds); + + std::cout << "Success\n"; + return EXIT_SUCCESS; +} diff --git a/recipes/opendis6/config.yml b/recipes/opendis6/config.yml new file mode 100644 index 0000000000000..6c11a439d0bc2 --- /dev/null +++ b/recipes/opendis6/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.0": + folder: all From b45854204eae2884529c79477f7553efc0828f8d Mon Sep 17 00:00:00 2001 From: Kleto Zan Date: Thu, 8 Feb 2024 17:28:41 -0300 Subject: [PATCH 020/108] (#22643) openssl: Add option to disable apps build in 3.x.x This is useful for example to disable build of http_server for tvOS. tvOS doesn't have fork() and http_server uses it: apps/lib/http_server.c:156:24: error: 'fork' is unavailable: not available on tvOS switch (fpid = fork()) { --- recipes/openssl/3.x.x/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index f23cd0b52fadd..afcc879ec24a9 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -33,6 +33,7 @@ class OpenSSLConan(ConanFile): "enable_capieng": [True, False], "enable_trace": [True, False], "no_aria": [True, False], + "no_apps": [True, False], "no_autoload_config": [True, False], "no_asm": [True, False], "no_async": [True, False], From 3c55971a382fc32e1120cf299afb8a6d5048d46b Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 9 Feb 2024 16:48:02 +0900 Subject: [PATCH 021/108] (#22722) cli11: add version 2.4.1 --- recipes/cli11/all/conandata.yml | 3 +++ recipes/cli11/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cli11/all/conandata.yml b/recipes/cli11/all/conandata.yml index 710d40000e172..f6711af51ec3a 100644 --- a/recipes/cli11/all/conandata.yml +++ b/recipes/cli11/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.1": + url: "https://github.com/CLIUtils/CLI11/archive/v2.4.1.tar.gz" + sha256: "73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58" "2.4.0": url: "https://github.com/CLIUtils/CLI11/archive/v2.4.0.tar.gz" sha256: "d2ce8d5318d2a7a7d1120e2a18caac49cd65423d5d4158cbbc0267e6768af522" diff --git a/recipes/cli11/config.yml b/recipes/cli11/config.yml index 77e437062a028..29883272197c4 100644 --- a/recipes/cli11/config.yml +++ b/recipes/cli11/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.1": + folder: all "2.4.0": folder: all "2.3.2": From 899aaf6144e1c8b1014d8ec94c405de9f993a24e Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 9 Feb 2024 17:07:58 +0900 Subject: [PATCH 022/108] (#22726) 7bitdi: add version 2.1.0 --- recipes/7bitdi/all/conandata.yml | 3 +++ recipes/7bitdi/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/7bitdi/all/conandata.yml b/recipes/7bitdi/all/conandata.yml index d7e7e7fe4e22e..22d7e84c10e0a 100644 --- a/recipes/7bitdi/all/conandata.yml +++ b/recipes/7bitdi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v2.1.0.tar.gz" + sha256: "54edceb4f90bf652126310ca0b78150d05a02d7081cef3c9ccaba5f4dd112935" "2.0.0": url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v2.0.0.tar.gz" sha256: "ae6d01c677b928a9c0979b9b2395692f9a3d876e07189d9b191e7b55c13d9ef4" diff --git a/recipes/7bitdi/config.yml b/recipes/7bitdi/config.yml index 870fb33e55af0..4a1d176d1dc7e 100644 --- a/recipes/7bitdi/config.yml +++ b/recipes/7bitdi/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.0": + folder: all "2.0.0": folder: all "1.0.0": From 9094090695d3e76f6946fcfea251334e99a4a696 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 9 Feb 2024 17:27:57 +0900 Subject: [PATCH 023/108] (#22721) glaze: add version 2.0.7 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 5573aaa9a0d2c..247424073dd75 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.7": + url: "https://github.com/stephenberry/glaze/archive/v2.0.7.tar.gz" + sha256: "1bf981e72733fb5a02a91c9642d91fa39e4a1ebe42f81e8fc6a016c11ed762cb" "2.0.6": url: "https://github.com/stephenberry/glaze/archive/v2.0.6.tar.gz" sha256: "aa5d4921382e9781998ebbf6d36964556daa3367a2aef5ca814122502b450abc" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 4091325ce2c5a..67e6a0900ca46 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.7": + folder: all "2.0.6": folder: all "2.0.5": From 5ebf11c428dcdef18ba1168f8833db23debb19bd Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 9 Feb 2024 17:48:11 +0900 Subject: [PATCH 024/108] (#22724) usockets: add version 0.8.8 --- recipes/usockets/all/conandata.yml | 7 +++++++ recipes/usockets/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/usockets/all/conandata.yml b/recipes/usockets/all/conandata.yml index df56cdd674867..3fbcf6ef2a19d 100644 --- a/recipes/usockets/all/conandata.yml +++ b/recipes/usockets/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.8": + url: "https://github.com/uNetworking/uSockets/archive/v0.8.8.tar.gz" + sha256: "d14d2efe1df767dbebfb8d6f5b52aa952faf66b30c822fbe464debaa0c5c0b17" "0.8.7": url: "https://github.com/uNetworking/uSockets/archive/v0.8.7.tar.gz" sha256: "920313a2ae42bbda17bded6fc83b3df635af24cc9abefc87905ad60fdc596edf" @@ -27,6 +30,10 @@ sources: url: "https://github.com/uNetworking/uSockets/archive/v0.4.0.tar.gz" sha256: "f9f15b395def578cc79a5b32abc64fa9cff5dac873062911f515b984b90f7cc2" patches: + "0.8.8": + - patch_file: "patches/0001-makefile_0.8.6.patch" + patch_description: "remove lto options" + patch_type: "portability" "0.8.7": - patch_file: "patches/0001-makefile_0.8.6.patch" patch_description: "remove lto options" diff --git a/recipes/usockets/config.yml b/recipes/usockets/config.yml index c71afbcfba697..a6ec735be30d3 100644 --- a/recipes/usockets/config.yml +++ b/recipes/usockets/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.8": + folder: all "0.8.7": folder: all "0.8.6": From 30c5f6b4aeeb9bce3614b9b2f1db7ea3324d8cdc Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 9 Feb 2024 18:08:24 +0900 Subject: [PATCH 025/108] (#22725) wise_enum: add version 3.1.0 --- recipes/wise_enum/all/conandata.yml | 5 ++++- recipes/wise_enum/config.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/wise_enum/all/conandata.yml b/recipes/wise_enum/all/conandata.yml index a7eb4605abb61..05e03d94a0301 100644 --- a/recipes/wise_enum/all/conandata.yml +++ b/recipes/wise_enum/all/conandata.yml @@ -1,4 +1,7 @@ -sources: +sources: + "3.1.0": + url: "https://github.com/quicknir/wise_enum/archive/refs/tags/3.1.0.tar.gz" + sha256: "79410816314941ea2c00b2bbd6932797caefa397a76db425d2b96e6211d1069b" "3.0.0": url: "https://github.com/quicknir/wise_enum/archive/refs/tags/3.0.0.tar.gz" sha256: "6e0d62855854ea755dd4277e74a599d1f4e7eec95562baf751151cc2e4df5eb8" diff --git a/recipes/wise_enum/config.yml b/recipes/wise_enum/config.yml index c6ac749e0b234..fba1ec47d0659 100644 --- a/recipes/wise_enum/config.yml +++ b/recipes/wise_enum/config.yml @@ -1,3 +1,5 @@ versions: + "3.1.0": + folder: all "3.0.0": folder: all From 58d741970cf1915ad54d81b76fab1cd11daa209a Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Fri, 9 Feb 2024 11:49:21 +0100 Subject: [PATCH 026/108] (#22717) [openapi-generator] Add version 7.3.0 --- recipes/openapi-generator/all/conandata.yml | 3 +++ recipes/openapi-generator/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index f0c50c95fa214..62465f2d111e7 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.3.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.3.0/openapi-generator-cli-7.3.0.jar" + sha256: "879c15340a75a19a7e720efc242c3223e0e4207b0694d6d1cea5c7dd87cf1cce" "7.2.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.2.0/openapi-generator-cli-7.2.0.jar" sha256: "1cf0c80de12c0fdc8594289c19e414b402108ef10b8dd0bfda1953151341ab5d" diff --git a/recipes/openapi-generator/config.yml b/recipes/openapi-generator/config.yml index 797b4078e69ca..07bf0a2fcdb65 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,4 +1,6 @@ versions: + "7.3.0": + folder: all "7.2.0": folder: all "7.0.0": From d350f314ca6ee649534b914f6d552969d8310073 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 9 Feb 2024 20:24:03 +0900 Subject: [PATCH 027/108] (#19148) influxdb-cxx: add recipe * influxdb-cxx: add recipe * remove unused import * fix compilation error on msvc shared build * Use 0.7.2, fix test_package, reference github issue --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/influxdb-cxx/all/conandata.yml | 4 + recipes/influxdb-cxx/all/conanfile.py | 102 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 ++ .../all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.cpp | 16 +++ recipes/influxdb-cxx/config.yml | 3 + 6 files changed, 159 insertions(+) create mode 100644 recipes/influxdb-cxx/all/conandata.yml create mode 100644 recipes/influxdb-cxx/all/conanfile.py create mode 100644 recipes/influxdb-cxx/all/test_package/CMakeLists.txt create mode 100644 recipes/influxdb-cxx/all/test_package/conanfile.py create mode 100644 recipes/influxdb-cxx/all/test_package/test_package.cpp create mode 100644 recipes/influxdb-cxx/config.yml diff --git a/recipes/influxdb-cxx/all/conandata.yml b/recipes/influxdb-cxx/all/conandata.yml new file mode 100644 index 0000000000000..465f6aea89730 --- /dev/null +++ b/recipes/influxdb-cxx/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.7.2": + url: "https://github.com/offa/influxdb-cxx/archive/refs/tags/v0.7.2.tar.gz" + sha256: "951e067df5731cb23b72f53fcbea8e56920819c6191b6885ea180168eb1950d9" diff --git a/recipes/influxdb-cxx/all/conanfile.py b/recipes/influxdb-cxx/all/conanfile.py new file mode 100644 index 0000000000000..c903fb4c5efc1 --- /dev/null +++ b/recipes/influxdb-cxx/all/conanfile.py @@ -0,0 +1,102 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class InfluxdbCxxConan(ConanFile): + name = "influxdb-cxx" + description = "InfluxDB C++ client library." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/offa/influxdb-cxx" + topics = ("influxdb", "influxdb-client") + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + "boost": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "boost": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("cpr/1.10.4") + if self.options.boost: + self.requires("boost/1.82.0") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + # BUILD_SHARED_LIBS is defined explicitly in CMakeLists.txt + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.cache_variables["INFLUXCXX_TESTING"] = False + tc.cache_variables["INFLUXCXX_WITH_BOOST"] = self.options.boost + if self.options.shared: + # See https://github.com/offa/influxdb-cxx/issues/194 + tc.preprocessor_definitions["InfluxDB_EXPORTS"] = 1 + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["InfluxDB"] + + self.cpp_info.set_property("cmake_file_name", "InfluxDB") + self.cpp_info.set_property("cmake_target_name", "InfluxData::InfluxDB") diff --git a/recipes/influxdb-cxx/all/test_package/CMakeLists.txt b/recipes/influxdb-cxx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2f8068d41fdb4 --- /dev/null +++ b/recipes/influxdb-cxx/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(InfluxDB REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(test_package PRIVATE InfluxData::InfluxDB) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/influxdb-cxx/all/test_package/conanfile.py b/recipes/influxdb-cxx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/influxdb-cxx/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/influxdb-cxx/all/test_package/test_package.cpp b/recipes/influxdb-cxx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..e91f55ee908cc --- /dev/null +++ b/recipes/influxdb-cxx/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include +#include + +int main() +{ + try { + auto influxdb = influxdb::InfluxDBFactory::Get("xyz://foobar"); + } + catch(influxdb::InfluxDBException& e) { + + } + + std::cout << "Influxdb-cxx test package successful\n"; + return 0; +} diff --git a/recipes/influxdb-cxx/config.yml b/recipes/influxdb-cxx/config.yml new file mode 100644 index 0000000000000..eb766ff2f024b --- /dev/null +++ b/recipes/influxdb-cxx/config.yml @@ -0,0 +1,3 @@ +versions: + "0.7.2": + folder: all From aef45be65a8453ae15e00f272ba35084c0ef14c4 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 9 Feb 2024 15:10:40 +0300 Subject: [PATCH 028/108] (#22703) Add gc/8.2.6 recipe --- recipes/bdwgc/all/conandata.yml | 5 +++++ .../bdwgc/all/patches/update-cmake-8_2_6.patch | 15 +++++++++++++++ recipes/bdwgc/config.yml | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 recipes/bdwgc/all/patches/update-cmake-8_2_6.patch diff --git a/recipes/bdwgc/all/conandata.yml b/recipes/bdwgc/all/conandata.yml index 8dfe6c5a2d882..d463c9bb2301b 100644 --- a/recipes/bdwgc/all/conandata.yml +++ b/recipes/bdwgc/all/conandata.yml @@ -11,6 +11,9 @@ sources: "8.2.4": url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.4/gc-8.2.4.tar.gz" sha256: "3d0d3cdbe077403d3106bb40f0cbb563413d6efdbb2a7e1cd6886595dec48fc2" + "8.2.6": + url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.6/gc-8.2.6.tar.gz" + sha256: "b9183fe49d4c44c7327992f626f8eaa1d8b14de140f243edb1c9dcff7719a7fc" patches: "8.0.4": - patch_file: "patches/update-cmake-8_0_4.patch" @@ -20,3 +23,5 @@ patches: - patch_file: "patches/update-cmake-8_2_2.patch" "8.2.4": - patch_file: "patches/update-cmake-8_2_4.patch" + "8.2.6": + - patch_file: "patches/update-cmake-8_2_6.patch" diff --git a/recipes/bdwgc/all/patches/update-cmake-8_2_6.patch b/recipes/bdwgc/all/patches/update-cmake-8_2_6.patch new file mode 100644 index 0000000000000..1ae810763c0db --- /dev/null +++ b/recipes/bdwgc/all/patches/update-cmake-8_2_6.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -177,6 +177,12 @@ if (enable_threads) + message(STATUS "Thread library: ${CMAKE_THREAD_LIBS_INIT}") + if (without_libatomic_ops OR BORLAND OR MSVC OR WATCOM) + include_directories(libatomic_ops/src) ++ find_package(Atomic_ops CONFIG) ++ if (Atomic_ops_FOUND) ++ get_target_property(AO_INCLUDE_DIRS Atomic_ops::atomic_ops ++ INTERFACE_INCLUDE_DIRECTORIES) ++ include_directories(${AO_INCLUDE_DIRS}) ++ endif() + # Note: alternatively, use CFLAGS_EXTRA to pass -I<...>/libatomic_ops/src. + else() + # Assume the compiler supports GCC atomic intrinsics. diff --git a/recipes/bdwgc/config.yml b/recipes/bdwgc/config.yml index b018b2961234b..c736cacb36944 100644 --- a/recipes/bdwgc/config.yml +++ b/recipes/bdwgc/config.yml @@ -7,3 +7,5 @@ versions: folder: all "8.2.4": folder: all + "8.2.6": + folder: all From 2ccff6880a2a1ffcdfb9a6e4661ac7d6b88ba848 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 9 Feb 2024 14:26:43 +0200 Subject: [PATCH 029/108] (#22115) util-linux-libuuid: bump gettext dependency * util-linux-libuuid: bump gettext dependency * util-linux-libuuid: try to improve macOS build --- recipes/util-linux-libuuid/all/conanfile.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/recipes/util-linux-libuuid/all/conanfile.py b/recipes/util-linux-libuuid/all/conanfile.py index e5c35fe2c862b..0a90fad2ce052 100644 --- a/recipes/util-linux-libuuid/all/conanfile.py +++ b/recipes/util-linux-libuuid/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os, XCRun from conan.tools.files import copy, get, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.layout import basic_layout @@ -73,7 +73,7 @@ def validate(self): def requirements(self): if self.settings.os == "Macos": # Required because libintl.{a,dylib} is not distributed via libc on Macos - self.requires("libgettext/0.21") + self.requires("libgettext/0.22") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -86,6 +86,22 @@ def generate(self): tc.extra_defines.append("HAVE_SYS_FILE_H") if "x86" in self.settings.arch: tc.extra_cflags.append("-mstackrealign") + + # Based on https://github.com/conan-io/conan-center-index/blob/c647b1/recipes/libx264/all/conanfile.py#L94 + if is_apple_os(self) and self.settings.arch == "armv8": + tc.configure_args.append("--host=aarch64-apple-darwin") + tc.extra_asflags = ["-arch arm64"] + tc.extra_ldflags = ["-arch arm64"] + if self.settings.os != "Macos": + xcrun = XCRun(self) + platform_flags = ["-isysroot", xcrun.sdk_path] + apple_min_version_flag = AutotoolsToolchain(self).apple_min_version_flag + if apple_min_version_flag: + platform_flags.append(apple_min_version_flag) + tc.extra_asflags.extend(platform_flags) + tc.extra_cflags.extend(platform_flags) + tc.extra_ldflags.extend(platform_flags) + tc.generate() deps = AutotoolsDeps(self) From d48a7d283c0b002b337f941eaf191e2aff637009 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 9 Feb 2024 14:42:09 +0100 Subject: [PATCH 030/108] (#18016) [intel-ipsec-mb] Add new recipe: Intel IPSec MB 1.4 * Add Intel IPSec MB Signed-off-by: Uilian Ries * add cmake as build requirement Signed-off-by: Uilian Ries * bump cmake version to 3.16 Signed-off-by: Uilian Ries * fix nasm include folders Signed-off-by: Uilian Ries * Fix nasm path Signed-off-by: Uilian Ries * remove unused import Signed-off-by: Uilian Ries * call patch sources Signed-off-by: Uilian Ries * call patch sources Signed-off-by: Uilian Ries * fix cmake target for Windows Signed-off-by: Uilian Ries * enforce install prefix Signed-off-by: Uilian Ries * Fix Windows installation Signed-off-by: Uilian Ries * enforce prefix install Signed-off-by: Uilian Ries * fix windows build Signed-off-by: Uilian Ries * Set nasm path for Conan 1.x Signed-off-by: Uilian Ries * fix nasm path on Windows Signed-off-by: Uilian Ries * Fix asm environment for Windows Signed-off-by: Uilian Ries * Fix build on Linux Signed-off-by: Uilian Ries * improve topics Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/intel-ipsec-mb/all/conandata.yml | 12 ++ recipes/intel-ipsec-mb/all/conanfile.py | 104 ++++++++++++++++++ .../all/patches/0001-unix-fpic.patch | 13 +++ .../all/patches/0002-install-windows.patch | 36 ++++++ .../all/test_package/CMakeLists.txt | 8 ++ .../all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.c | 13 +++ recipes/intel-ipsec-mb/config.yml | 3 + 8 files changed, 215 insertions(+) create mode 100644 recipes/intel-ipsec-mb/all/conandata.yml create mode 100644 recipes/intel-ipsec-mb/all/conanfile.py create mode 100644 recipes/intel-ipsec-mb/all/patches/0001-unix-fpic.patch create mode 100644 recipes/intel-ipsec-mb/all/patches/0002-install-windows.patch create mode 100644 recipes/intel-ipsec-mb/all/test_package/CMakeLists.txt create mode 100644 recipes/intel-ipsec-mb/all/test_package/conanfile.py create mode 100644 recipes/intel-ipsec-mb/all/test_package/test_package.c create mode 100644 recipes/intel-ipsec-mb/config.yml diff --git a/recipes/intel-ipsec-mb/all/conandata.yml b/recipes/intel-ipsec-mb/all/conandata.yml new file mode 100644 index 0000000000000..d898ee0ccba2f --- /dev/null +++ b/recipes/intel-ipsec-mb/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "1.4": + url: "https://github.com/intel/intel-ipsec-mb/archive/refs/tags/v1.4.tar.gz" + sha256: "b441b3ecf0a9fe69ff675f2eb9fe4d1304814558a8f15f5617638ddc99e05873" +patches: + "1.4": + - patch_file: "patches/0001-unix-fpic.patch" + patch_description: "Do not enforce fPIC flag always" + patch_type: "conan" + - patch_file: "patches/0002-install-windows.patch" + patch_description: "Do not enforce Windows folders path when installing" + patch_type: "conan" diff --git a/recipes/intel-ipsec-mb/all/conanfile.py b/recipes/intel-ipsec-mb/all/conanfile.py new file mode 100644 index 0000000000000..4e9e314b05c43 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/conanfile.py @@ -0,0 +1,104 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv, Environment +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "intel-ipsec-mb" + description = "Intel(R) Multi-Buffer Crypto for IPSec" + license = "BSD-3-Clause" + homepage = "https://github.com/intel/intel-ipsec-mb" + url = "https://github.com/conan-io/conan-center-index" + topics = ("intel", "ipsec", "crypto", "security") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _cmake_target(self): + return "libIPSec_MB" if is_msvc(self) else "IPSec_MB" + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.os not in ("FreeBSD", "Linux", "Windows"): + raise ConanInvalidConfiguration(f"{self.ref} does not support the O.S. {self.settings.os}.") + + def build_requirements(self): + self.tool_requires("nasm/2.15.05") + self.tool_requires("cmake/[>3.16 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + # INFO: Conan 1.x does not find nasm package automatically due PATH priority. + nasm_bin_folder = os.path.join(self.dependencies.direct_build["nasm"].package_folder, "bin").replace("\\", "/") + nasm_path = os.path.join(nasm_bin_folder, "nasm").replace("\\", "/") + env = Environment() + env.define("AS", nasm_path) + env.prepend("PATH", nasm_bin_folder) + envvars = env.vars(self, scope="build") + envvars.save_script("asm_configuration") + + env = VirtualBuildEnv(self) + env.generate(scope="build") + tc = CMakeToolchain(self) + # INFO: intel-ipsec-mb project forces shared by default. + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + # INFO: When running on Linux, uses /usr/bin/nasm in case no enforced + if self._settings_build.os == "Linux": + tc.cache_variables["CMAKE_ASM_NASM_COMPILER"] = nasm_path + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build(target=self._cmake_target) + + def package(self): + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "intel-ipsec-mb.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "lib"), keep_path=False) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "man")) + rmdir(self, os.path.join(self.package_folder, "intel-ipsec-mb")) + + def package_info(self): + self.cpp_info.libs = [self._cmake_target] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/intel-ipsec-mb/all/patches/0001-unix-fpic.patch b/recipes/intel-ipsec-mb/all/patches/0001-unix-fpic.patch new file mode 100644 index 0000000000000..b4684f31ccc0b --- /dev/null +++ b/recipes/intel-ipsec-mb/all/patches/0001-unix-fpic.patch @@ -0,0 +1,13 @@ +diff --git a/lib/cmake/unix.cmake b/lib/cmake/unix.cmake +index 78aafae..d94297c 100644 +--- a/lib/cmake/unix.cmake ++++ b/lib/cmake/unix.cmake +@@ -38,7 +38,7 @@ string(APPEND CMAKE_ASM_NASM_FLAGS + + # set C compiler flags + set(CMAKE_C_FLAGS +- "-fPIC -W -Wall -Wextra -Wmissing-declarations \ ++ "-W -Wall -Wextra -Wmissing-declarations \ + -Wpointer-arith -Wcast-qual -Wundef -Wwrite-strings -Wformat \ + -Wformat-security -Wunreachable-code -Wmissing-noreturn \ + -Wsign-compare -Wno-endif-labels -Wstrict-prototypes \ diff --git a/recipes/intel-ipsec-mb/all/patches/0002-install-windows.patch b/recipes/intel-ipsec-mb/all/patches/0002-install-windows.patch new file mode 100644 index 0000000000000..ddaeab8b5f130 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/patches/0002-install-windows.patch @@ -0,0 +1,36 @@ +diff --git a/lib/cmake/windows.cmake b/lib/cmake/windows.cmake +index 02d39a1..0647029 100644 +--- a/lib/cmake/windows.cmake ++++ b/lib/cmake/windows.cmake +@@ -93,27 +93,18 @@ endif() + add_library(${LIB} ${SRC_FILES_ASM} ${SRC_FILES_C} ${SRC_DEF_FILE}) + + # set install rules +-set(CMAKE_INSTALL_PREFIX "c:/Program Files" +- CACHE STRING "Set default installation directory" FORCE) + install(TARGETS ${LIB} +- DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_PROJECT_NAME}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ++ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) ++ + install(FILES + ${IMB_HDR} + ${SRC_DEF_FILE} + DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_PROJECT_NAME}) +-if(BUILD_SHARED_LIBS) +- install(FILES +- $/${LIB}.exp +- $/${LIB}.pdb +- DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_PROJECT_NAME}) +- install(FILES +- $/${LIB}.dll +- DESTINATION $ENV{WINDIR}/system32) +-endif() + + execute_process( + COMMAND cmd /C ${GEN_DEF_FILE_CMD} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_QUIET + ) +- diff --git a/recipes/intel-ipsec-mb/all/test_package/CMakeLists.txt b/recipes/intel-ipsec-mb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..094c6cf883fd7 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package C) + +find_package(intel-ipsec-mb REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE intel-ipsec-mb::intel-ipsec-mb) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/intel-ipsec-mb/all/test_package/conanfile.py b/recipes/intel-ipsec-mb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/intel-ipsec-mb/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/intel-ipsec-mb/all/test_package/test_package.c b/recipes/intel-ipsec-mb/all/test_package/test_package.c new file mode 100644 index 0000000000000..231c42793f295 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/test_package/test_package.c @@ -0,0 +1,13 @@ +#include "intel-ipsec-mb.h" + +#include +#include + +int main() { + const char * version = NULL; + + version = imb_get_version_str(); + printf("Intel IPSec MB Version: %s\n", version); + + return EXIT_SUCCESS; +} diff --git a/recipes/intel-ipsec-mb/config.yml b/recipes/intel-ipsec-mb/config.yml new file mode 100644 index 0000000000000..49afec8b671eb --- /dev/null +++ b/recipes/intel-ipsec-mb/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4": + folder: all From 85d840a1312f8ee1bd02ca86cd8d06c14c2dfdbc Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 12 Feb 2024 10:50:44 +0100 Subject: [PATCH 031/108] (#22728) stale: process older PRs first * stale: process older PRs first also, increase the number of operations. github has a limit of 15000/hour, so we have some leeway cf https://github.com/conan-io/conan-center-index/actions/runs/7840520311/job/21395244351#step:2:1486 * Update stale.yml --- .github/workflows/stale.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 00910a77f7c49..c9c6239fc08ea 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -34,6 +34,8 @@ jobs: # Idle number of days before closing stale PRs days-before-pr-close: 30 + # process older PRs first + ascending: true # Labels on PRs exempted from stale exempt-pr-labels: blocked,infrastructure From 4612ffa489c29196ef6d3e15df9a3817f7ead7c7 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 19:09:49 +0900 Subject: [PATCH 032/108] (#22730) drogon: add version 1.9.3 --- recipes/drogon/all/conandata.yml | 10 ++++++++++ recipes/drogon/all/test_package/conanfile.py | 1 + recipes/drogon/config.yml | 2 ++ 3 files changed, 13 insertions(+) diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 363e991a86f99..5ade6257a65f6 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.3": + url: "https://github.com/drogonframework/drogon/archive/v1.9.3.tar.gz" + sha256: "fb4ef351b3e4c06ed850cfbbf50c571502decb1738fb7d62a9d7d70077c9fc23" "1.9.2": url: "https://github.com/drogonframework/drogon/archive/v1.9.2.tar.gz" sha256: "5bfcb7e11df83de45efc24e2785646276a0166893e0475221d8e7fa82832ffbd" @@ -21,6 +24,13 @@ sources: url: "https://github.com/drogonframework/drogon/archive/v1.8.4.tar.gz" sha256: "6f2f59ead0f0c37b0aac4bc889cbaedf3c2540f3020e892596c72f0a4d887a18" patches: + "1.9.3": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" "1.9.2": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" diff --git a/recipes/drogon/all/test_package/conanfile.py b/recipes/drogon/all/test_package/conanfile.py index 84eaa369e4a72..99d0db4a34c2c 100644 --- a/recipes/drogon/all/test_package/conanfile.py +++ b/recipes/drogon/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type", generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/drogon/config.yml b/recipes/drogon/config.yml index 0849cdfebfa68..e9c9e23f0ecf5 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.3": + folder: "all" "1.9.2": folder: "all" "1.9.1": From 77fb1742549fe162574b9a5a85067881d9e31047 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 19:28:48 +0900 Subject: [PATCH 033/108] (#22736) poco: add version 1.13.1 --- recipes/poco/all/conandata.yml | 10 ++++++++++ recipes/poco/config.yml | 2 ++ 2 files changed, 12 insertions(+) diff --git a/recipes/poco/all/conandata.yml b/recipes/poco/all/conandata.yml index c2db4d028c469..67de3df463e94 100644 --- a/recipes/poco/all/conandata.yml +++ b/recipes/poco/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.13.1": + url: "https://github.com/pocoproject/poco/archive/poco-1.13.1-release.tar.gz" + sha256: "8accf6c6ebb9ae686e7c8e2390a35beaab08d0ca1abda537cc2d0b7ab9296be5" "1.13.0": url: "https://github.com/pocoproject/poco/archive/poco-1.13.0-release.tar.gz" sha256: "0135160663795901f317215272fadf71f3b526f38daacb2ae8d6b07ad11d319b" @@ -27,6 +30,13 @@ sources: url: "https://github.com/pocoproject/poco/archive/poco-1.11.3-release.tar.gz" sha256: "fb5e8e70c7dbc8f3b59ec8560140a267b4eaf06ee519dc21f312d0eb195cba37" patches: + "1.13.1": + - patch_file: patches/1.13.0.patch + patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" + patch_type: "conan" + - patch_file: patches/1.13.0-0002-mysql-include.patch + patch_description: "include mysql.h instead of mysql/mysql.h" + patch_type: "portability" "1.13.0": - patch_file: patches/1.13.0.patch patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" diff --git a/recipes/poco/config.yml b/recipes/poco/config.yml index a59a7f8e7171f..aa504b39ac1af 100644 --- a/recipes/poco/config.yml +++ b/recipes/poco/config.yml @@ -1,4 +1,6 @@ versions: + "1.13.1": + folder: all "1.13.0": folder: all "1.12.5p2": From 15c464aecbf3f89e42dc512c7cc72492ae2dfc44 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 19:50:05 +0900 Subject: [PATCH 034/108] (#22742) libnfs: add version 5.0.3 --- recipes/libnfs/all/conandata.yml | 8 ++++++++ recipes/libnfs/config.yml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/recipes/libnfs/all/conandata.yml b/recipes/libnfs/all/conandata.yml index b4b4af80e776c..782953e21dab6 100644 --- a/recipes/libnfs/all/conandata.yml +++ b/recipes/libnfs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.0.3": + url: "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.3.tar.gz" + sha256: "d945cb4f4c8f82ee1f3640893a168810f794a28e1010bb007ec5add345e9df3e" "5.0.2": url: "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.2.tar.gz" sha256: "637e56643b19da9fba98f06847788c4dad308b723156a64748041035dcdf9bd3" @@ -6,6 +9,11 @@ sources: url: "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.1.tar.gz" sha256: "7ef445410b42f36b9bad426608b53ccb9ccca4101e545c383f564c11db672ca8" patches: + "5.0.3": + - patch_file: "patches/5.0.1-0001-remove-exports.patch" + patch_description: "Fix installation" + patch_type: "conan" + patch_source: "https://github.com/sahlberg/libnfs/pull/377" "5.0.2": - patch_file: "patches/5.0.1-0001-remove-exports.patch" patch_description: "Fix installation" diff --git a/recipes/libnfs/config.yml b/recipes/libnfs/config.yml index 7e49cd33d0bdc..7ec3cb9fcf03a 100644 --- a/recipes/libnfs/config.yml +++ b/recipes/libnfs/config.yml @@ -1,4 +1,6 @@ versions: + "5.0.3": + folder: "all" "5.0.2": folder: "all" "5.0.1": From c03526a677426444782871e2de9909eccd5bae6b Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 20:10:11 +0900 Subject: [PATCH 035/108] (#22723) libuv: add version 1.48.0, remove older versions * libuv: add version 1.48.0, remove older versions * remove versions in config.yml --- recipes/libuv/all/conandata.yml | 24 ++---- .../libuv/all/patches/1.38.1/fix-cmake.patch | 80 ------------------- .../libuv/all/patches/1.40.0/fix-cmake.patch | 77 ------------------ .../libuv/all/patches/1.48.0/fix-cmake.patch | 65 +++++++++++++++ recipes/libuv/config.yml | 6 +- 5 files changed, 74 insertions(+), 178 deletions(-) delete mode 100644 recipes/libuv/all/patches/1.38.1/fix-cmake.patch delete mode 100644 recipes/libuv/all/patches/1.40.0/fix-cmake.patch create mode 100644 recipes/libuv/all/patches/1.48.0/fix-cmake.patch diff --git a/recipes/libuv/all/conandata.yml b/recipes/libuv/all/conandata.yml index de25f5782ee20..578b3b599b79b 100644 --- a/recipes/libuv/all/conandata.yml +++ b/recipes/libuv/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.48.0": + url: "https://github.com/libuv/libuv/archive/v1.48.0.tar.gz" + sha256: "8c253adb0f800926a6cbd1c6576abae0bc8eb86a4f891049b72f9e5b7dc58f33" "1.47.0": url: "https://github.com/libuv/libuv/archive/v1.47.0.tar.gz" sha256: "d50af7e6d72526db137e66fad812421c8a1cae09d146b0ec2bb9a22c5f23ba93" @@ -26,13 +29,11 @@ sources: "1.41.0": url: "https://github.com/libuv/libuv/archive/v1.41.0.zip" sha256: "cb89a8b9f686c5ccf7ed09a9e0ece151a73ebebc17af3813159c335b02181794" - "1.40.0": - url: "https://github.com/libuv/libuv/archive/v1.40.0.zip" - sha256: "61366e30d8484197dc9e4a94dbd98a0ba52fb55cb6c6d991af1f3701b10f322b" - "1.38.1": - url: "https://github.com/libuv/libuv/archive/v1.38.1.zip" - sha256: "0359369492742eb2a36312fffe26f80bcffe4cec981a4fd72d182b061ee14890" patches: + "1.48.0": + - patch_file: "patches/1.48.0/fix-cmake.patch" + patch_description: "separate shared and static library build" + patch_type: "conan" "1.47.0": - patch_file: "patches/1.47.0/fix-cmake.patch" patch_description: "separate shared and static library build" @@ -73,14 +74,3 @@ patches: - patch_file: "patches/1.40.0/fix-ios.patch" patch_description: "fix dlopen filename" patch_type: "portability" - "1.40.0": - - patch_file: "patches/1.40.0/fix-cmake.patch" - patch_description: "separate shared and static library build" - patch_type: "conan" - - patch_file: "patches/1.40.0/fix-ios.patch" - patch_description: "fix dlopen filename" - patch_type: "portability" - "1.38.1": - - patch_file: "patches/1.38.1/fix-cmake.patch" - patch_description: "separate shared and static library build" - patch_type: "conan" diff --git a/recipes/libuv/all/patches/1.38.1/fix-cmake.patch b/recipes/libuv/all/patches/1.38.1/fix-cmake.patch deleted file mode 100644 index 752d2ecdc5cea..0000000000000 --- a/recipes/libuv/all/patches/1.38.1/fix-cmake.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2518c747..05b5add1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -297,13 +297,19 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD") - list(APPEND uv_test_libraries util) - endif() - --add_library(uv SHARED ${uv_sources}) --target_compile_definitions(uv -- INTERFACE -- USING_UV_SHARED=1 -- PRIVATE -- BUILDING_UV_SHARED=1 -- ${uv_defines}) -+add_library(uv ${uv_sources}) -+get_target_property(target_type uv TYPE) -+if (target_type STREQUAL "SHARED_LIBRARY") -+ target_compile_definitions(uv -+ INTERFACE -+ USING_UV_SHARED=1 -+ PRIVATE -+ BUILDING_UV_SHARED=1 -+ ) -+else() -+ set_property(TARGET uv PROPERTY OUTPUT_NAME "uv_a") -+endif() -+target_compile_definitions(uv PRIVATE ${uv_defines}) - target_compile_options(uv PRIVATE ${uv_cflags}) - target_include_directories(uv - PUBLIC -@@ -313,17 +319,6 @@ target_include_directories(uv - $) - target_link_libraries(uv ${uv_libraries}) - --add_library(uv_a STATIC ${uv_sources}) --target_compile_definitions(uv_a PRIVATE ${uv_defines}) --target_compile_options(uv_a PRIVATE ${uv_cflags}) --target_include_directories(uv_a -- PUBLIC -- $ -- $ -- PRIVATE -- $) --target_link_libraries(uv_a ${uv_libraries}) -- - if(LIBUV_BUILD_TESTS) - # Small hack: use ${uv_test_sources} now to get the runner skeleton, - # before the actual tests are added. -@@ -558,22 +553,20 @@ if(UNIX) - set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) - set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - set(prefix ${CMAKE_INSTALL_PREFIX}) -- configure_file(libuv.pc.in libuv.pc @ONLY) - - install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -- install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) -- install(FILES ${PROJECT_BINARY_DIR}/libuv.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -- install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(WIN32) - install(DIRECTORY include/ DESTINATION include) -- install(FILES LICENSE DESTINATION .) -- install(TARGETS uv uv_a -- RUNTIME DESTINATION lib/$ -- ARCHIVE DESTINATION lib/$) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib) - endif() - - message(STATUS "summary of build options: diff --git a/recipes/libuv/all/patches/1.40.0/fix-cmake.patch b/recipes/libuv/all/patches/1.40.0/fix-cmake.patch deleted file mode 100644 index 194123f2f2d1b..0000000000000 --- a/recipes/libuv/all/patches/1.40.0/fix-cmake.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e648b00..080f403 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -326,13 +326,19 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD") - list(APPEND uv_test_libraries util) - endif() - --add_library(uv SHARED ${uv_sources}) --target_compile_definitions(uv -- INTERFACE -- USING_UV_SHARED=1 -- PRIVATE -- BUILDING_UV_SHARED=1 -- ${uv_defines}) -+add_library(uv ${uv_sources}) -+get_target_property(target_type uv TYPE) -+if (target_type STREQUAL "SHARED_LIBRARY") -+ target_compile_definitions(uv -+ INTERFACE -+ USING_UV_SHARED=1 -+ PRIVATE -+ BUILDING_UV_SHARED=1 -+ ) -+else() -+ set_property(TARGET uv PROPERTY OUTPUT_NAME "uv_a") -+endif() -+target_compile_definitions(uv PRIVATE ${uv_defines}) - target_compile_options(uv PRIVATE ${uv_cflags}) - target_include_directories(uv - PUBLIC -@@ -342,17 +348,6 @@ target_include_directories(uv - $) - target_link_libraries(uv ${uv_libraries}) - --add_library(uv_a STATIC ${uv_sources}) --target_compile_definitions(uv_a PRIVATE ${uv_defines}) --target_compile_options(uv_a PRIVATE ${uv_cflags}) --target_include_directories(uv_a -- PUBLIC -- $ -- $ -- PRIVATE -- $) --target_link_libraries(uv_a ${uv_libraries}) -- - if(LIBUV_BUILD_TESTS) - # Small hack: use ${uv_test_sources} now to get the runner skeleton, - # before the actual tests are added. -@@ -595,19 +590,18 @@ if(UNIX OR MINGW) - configure_file(libuv-static.pc.in libuv-static.pc @ONLY) - - install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -- install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) -- install(FILES ${PROJECT_BINARY_DIR}/libuv.pc ${PROJECT_BINARY_DIR}/libuv-static.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -- install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(MSVC) - install(DIRECTORY include/ DESTINATION include) -- install(FILES LICENSE DESTINATION .) -- install(TARGETS uv uv_a -- RUNTIME DESTINATION lib/$ -- ARCHIVE DESTINATION lib/$) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib) - endif() - - message(STATUS "summary of build options: diff --git a/recipes/libuv/all/patches/1.48.0/fix-cmake.patch b/recipes/libuv/all/patches/1.48.0/fix-cmake.patch new file mode 100644 index 0000000000000..4fbe54ddf91e7 --- /dev/null +++ b/recipes/libuv/all/patches/1.48.0/fix-cmake.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e8e016..427bd86 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -465,7 +465,7 @@ if(LIBUV_BUILD_SHARED) + endif() + target_link_libraries(uv ${uv_libraries}) + set_target_properties(uv PROPERTIES OUTPUT_NAME "uv") +-endif() ++else() + + add_library(uv_a STATIC ${uv_sources}) + target_compile_definitions(uv_a PRIVATE ${uv_defines}) +@@ -485,7 +485,7 @@ set_target_properties(uv_a PROPERTIES OUTPUT_NAME "uv") + if(WIN32) + set_target_properties(uv_a PROPERTIES PREFIX "lib") + endif() +- ++endif() + if(LIBUV_BUILD_TESTS) + # Small hack: use ${uv_test_sources} now to get the runner skeleton, + # before the actual tests are added. +@@ -750,18 +750,18 @@ set(UV_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) + set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(prefix ${CMAKE_INSTALL_PREFIX}) +-configure_file(libuv-static.pc.in libuv-static.pc @ONLY) ++# configure_file(libuv-static.pc.in libuv-static.pc @ONLY) + + install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(FILES LICENSE-extra DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +-install(TARGETS uv_a EXPORT libuvConfig +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(EXPORT libuvConfig +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv +- NAMESPACE libuv::) ++# install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++# install(TARGETS uv_a EXPORT libuvConfig ++# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++# install(EXPORT libuvConfig ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv ++# NAMESPACE libuv::) + + if(LIBUV_BUILD_SHARED) + # The version in the filename is mirroring the behaviour of autotools. +@@ -775,6 +775,15 @@ if(LIBUV_BUILD_SHARED) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++else() ++ configure_file(libuv-static.pc.in libuv-static.pc @ONLY) ++ install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ install(TARGETS uv_a EXPORT libuvConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(EXPORT libuvConfig ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv ++ NAMESPACE libuv::) + endif() + + if(MSVC) diff --git a/recipes/libuv/config.yml b/recipes/libuv/config.yml index 4c8ae03d813d7..55c98b3fd5a25 100644 --- a/recipes/libuv/config.yml +++ b/recipes/libuv/config.yml @@ -1,4 +1,6 @@ versions: + "1.48.0": + folder: all "1.47.0": folder: all "1.46.0": @@ -17,7 +19,3 @@ versions: folder: all "1.41.0": folder: all - "1.40.0": - folder: all - "1.38.1": - folder: all From b4fa44e8e28dc286daabe7dbb221ab6caf3ef007 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 20:32:23 +0900 Subject: [PATCH 036/108] (#22745) nanomsg: add version 1.2.1 --- recipes/nanomsg/all/conandata.yml | 3 +++ recipes/nanomsg/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/nanomsg/all/conandata.yml b/recipes/nanomsg/all/conandata.yml index 1d7161c198806..dbc431024b1fd 100644 --- a/recipes/nanomsg/all/conandata.yml +++ b/recipes/nanomsg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.1": + url: "https://github.com/nanomsg/nanomsg/archive/refs/tags/1.2.1.tar.gz" + sha256: "2e6c20dbfcd4882e133c819ac77501e9b323cb17ae5b3376702c4446261fbc23" "1.2": url: "https://github.com/nanomsg/nanomsg/archive/refs/tags/1.2.tar.gz" sha256: "6ef7282e833df6a364f3617692ef21e59d5c4878acea4f2d7d36e21c8858de67" diff --git a/recipes/nanomsg/config.yml b/recipes/nanomsg/config.yml index a0777b5aa931c..faec73d798c80 100644 --- a/recipes/nanomsg/config.yml +++ b/recipes/nanomsg/config.yml @@ -1,3 +1,5 @@ versions: + "1.2.1": + folder: all "1.2": folder: all From 120e3fea8ef10250cecf353f6954fbeeebc1f5fa Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 20:52:28 +0900 Subject: [PATCH 037/108] (#22750) bezier: add recipe * bezier: add recipe * drop support gcc 5 --- recipes/bezier/all/conandata.yml | 4 ++ recipes/bezier/all/conanfile.py | 63 +++++++++++++++++++ .../bezier/all/test_package/CMakeLists.txt | 8 +++ recipes/bezier/all/test_package/conanfile.py | 26 ++++++++ .../bezier/all/test_package/test_package.cpp | 9 +++ recipes/bezier/config.yml | 3 + 6 files changed, 113 insertions(+) create mode 100644 recipes/bezier/all/conandata.yml create mode 100644 recipes/bezier/all/conanfile.py create mode 100644 recipes/bezier/all/test_package/CMakeLists.txt create mode 100644 recipes/bezier/all/test_package/conanfile.py create mode 100644 recipes/bezier/all/test_package/test_package.cpp create mode 100644 recipes/bezier/config.yml diff --git a/recipes/bezier/all/conandata.yml b/recipes/bezier/all/conandata.yml new file mode 100644 index 0000000000000..4bb4e5cf2851f --- /dev/null +++ b/recipes/bezier/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.2.1": + url: "https://github.com/oysteinmyrmo/bezier/archive/refs/tags/v0.2.1.tar.gz" + sha256: "fce93c766f31ec445f6f48d0d1438c128640f0728d29745ca9e5424d9daf944f" diff --git a/recipes/bezier/all/conanfile.py b/recipes/bezier/all/conanfile.py new file mode 100644 index 0000000000000..b308756aa16cc --- /dev/null +++ b/recipes/bezier/all/conanfile.py @@ -0,0 +1,63 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class BezierConan(ConanFile): + name = "bezier" + description = "A single header only C++ library for Bezier curve calculations and manipulations." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/oysteinmyrmo/bezier" + topics = ("curve", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/bezier/all/test_package/CMakeLists.txt b/recipes/bezier/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b5a9211efc1a8 --- /dev/null +++ b/recipes/bezier/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(bezier REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE bezier::bezier) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/bezier/all/test_package/conanfile.py b/recipes/bezier/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/bezier/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/bezier/all/test_package/test_package.cpp b/recipes/bezier/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..72113a98c3ad7 --- /dev/null +++ b/recipes/bezier/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include +#include "bezier/bezier.h" + +int main(void) { + bezier::Bezier<3> cubicBezier({ {120, 160}, {35, 200}, {220, 260}, {220, 40} }); + + bezier::Point p = cubicBezier.valueAt(0.5); + std::cout << p.x << " " << p.y << std::endl; +} diff --git a/recipes/bezier/config.yml b/recipes/bezier/config.yml new file mode 100644 index 0000000000000..f975c1e3261f7 --- /dev/null +++ b/recipes/bezier/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.1": + folder: all From 4ac1fbf5dd2b3b9af9a54f7e4f2d6b331da9fda9 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 12 Feb 2024 13:22:34 +0100 Subject: [PATCH 038/108] (#22752) [json-c] Add include folder following the upstream Signed-off-by: Uilian Ries --- recipes/json-c/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/json-c/all/conanfile.py b/recipes/json-c/all/conanfile.py index 8963e15ae1e8f..222938814d365 100644 --- a/recipes/json-c/all/conanfile.py +++ b/recipes/json-c/all/conanfile.py @@ -68,3 +68,4 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "json-c::json-c") self.cpp_info.set_property("pkg_config_name", "json-c") self.cpp_info.libs = collect_libs(self) + self.cpp_info.includedirs = ["include", "include/json-c"] From 9c2db6b1ebd20687b2be36fb9e7a82941654edc8 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:26:36 +0100 Subject: [PATCH 039/108] (#18943) popt/1.19: Added support for popt/1.19 and QNX portability --- recipes/popt/{all => 1.16}/conandata.yml | 0 recipes/popt/{all => 1.16}/conanfile.py | 4 + .../patches/0004-vcpkg-fixmsvc.patch | 0 .../{all => 1.16}/test_package/CMakeLists.txt | 0 .../{all => 1.16}/test_package/conanfile.py | 0 .../{all => 1.16}/test_package/test_package.c | 0 .../test_v1_package/CMakeLists.txt | 0 .../test_v1_package/conanfile.py | 0 recipes/popt/1.19/conandata.yml | 4 + recipes/popt/1.19/conanfile.py | 88 +++++++++++++++++++ recipes/popt/1.19/test_package/CMakeLists.txt | 7 ++ recipes/popt/1.19/test_package/conanfile.py | 26 ++++++ recipes/popt/1.19/test_package/test_package.c | 17 ++++ recipes/popt/config.yml | 4 +- 14 files changed, 149 insertions(+), 1 deletion(-) rename recipes/popt/{all => 1.16}/conandata.yml (100%) rename recipes/popt/{all => 1.16}/conanfile.py (97%) rename recipes/popt/{all => 1.16}/patches/0004-vcpkg-fixmsvc.patch (100%) rename recipes/popt/{all => 1.16}/test_package/CMakeLists.txt (100%) rename recipes/popt/{all => 1.16}/test_package/conanfile.py (100%) rename recipes/popt/{all => 1.16}/test_package/test_package.c (100%) rename recipes/popt/{all => 1.16}/test_v1_package/CMakeLists.txt (100%) rename recipes/popt/{all => 1.16}/test_v1_package/conanfile.py (100%) create mode 100755 recipes/popt/1.19/conandata.yml create mode 100755 recipes/popt/1.19/conanfile.py create mode 100755 recipes/popt/1.19/test_package/CMakeLists.txt create mode 100755 recipes/popt/1.19/test_package/conanfile.py create mode 100755 recipes/popt/1.19/test_package/test_package.c mode change 100644 => 100755 recipes/popt/config.yml diff --git a/recipes/popt/all/conandata.yml b/recipes/popt/1.16/conandata.yml similarity index 100% rename from recipes/popt/all/conandata.yml rename to recipes/popt/1.16/conandata.yml diff --git a/recipes/popt/all/conanfile.py b/recipes/popt/1.16/conanfile.py similarity index 97% rename from recipes/popt/all/conanfile.py rename to recipes/popt/1.16/conanfile.py index ce3a9a4e859ec..441401f46468c 100644 --- a/recipes/popt/all/conanfile.py +++ b/recipes/popt/1.16/conanfile.py @@ -53,6 +53,10 @@ def validate(self): if is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") + def requirements(self): + if self.settings.os == "Neutrino": + self.requires("libiconv/[>=1.15]") + def build_requirements(self): self.tool_requires("gnu-config/cci.20210814") if self._settings_build.os == "Windows": diff --git a/recipes/popt/all/patches/0004-vcpkg-fixmsvc.patch b/recipes/popt/1.16/patches/0004-vcpkg-fixmsvc.patch similarity index 100% rename from recipes/popt/all/patches/0004-vcpkg-fixmsvc.patch rename to recipes/popt/1.16/patches/0004-vcpkg-fixmsvc.patch diff --git a/recipes/popt/all/test_package/CMakeLists.txt b/recipes/popt/1.16/test_package/CMakeLists.txt similarity index 100% rename from recipes/popt/all/test_package/CMakeLists.txt rename to recipes/popt/1.16/test_package/CMakeLists.txt diff --git a/recipes/popt/all/test_package/conanfile.py b/recipes/popt/1.16/test_package/conanfile.py similarity index 100% rename from recipes/popt/all/test_package/conanfile.py rename to recipes/popt/1.16/test_package/conanfile.py diff --git a/recipes/popt/all/test_package/test_package.c b/recipes/popt/1.16/test_package/test_package.c similarity index 100% rename from recipes/popt/all/test_package/test_package.c rename to recipes/popt/1.16/test_package/test_package.c diff --git a/recipes/popt/all/test_v1_package/CMakeLists.txt b/recipes/popt/1.16/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/popt/all/test_v1_package/CMakeLists.txt rename to recipes/popt/1.16/test_v1_package/CMakeLists.txt diff --git a/recipes/popt/all/test_v1_package/conanfile.py b/recipes/popt/1.16/test_v1_package/conanfile.py similarity index 100% rename from recipes/popt/all/test_v1_package/conanfile.py rename to recipes/popt/1.16/test_v1_package/conanfile.py diff --git a/recipes/popt/1.19/conandata.yml b/recipes/popt/1.19/conandata.yml new file mode 100755 index 0000000000000..9154d03ec87c9 --- /dev/null +++ b/recipes/popt/1.19/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.19": + url: "http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.19.tar.gz" + sha256: "c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9" diff --git a/recipes/popt/1.19/conanfile.py b/recipes/popt/1.19/conanfile.py new file mode 100755 index 0000000000000..a8a39dc69c064 --- /dev/null +++ b/recipes/popt/1.19/conanfile.py @@ -0,0 +1,88 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.files import collect_libs, copy, get, rmdir, rm +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.54.0" + +class PoptConan(ConanFile): + name = "popt" + description = "Library for parsing command line parameters" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/rpm-software-management/popt" + topics = ("command line", "options", "parsing") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def requirements(self): + if self.settings.os == "Neutrino": + self.requires("libiconv/1.15") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} can not be built with shared on Visual Studio and msvc, use mingw.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + ad = AutotoolsDeps(self) + ad.generate() + + tc = AutotoolsToolchain(self) + tc.ldflags.append("-lintl") + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, pattern="COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + autotools = Autotools(self) + autotools.install() + + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = collect_libs(self) + + if is_apple_os(self): + self.cpp_info.system_libs = ["iconv"] + + if self.settings.os == "Neutrino": + self.cpp_info.system_libs = ["intl"] diff --git a/recipes/popt/1.19/test_package/CMakeLists.txt b/recipes/popt/1.19/test_package/CMakeLists.txt new file mode 100755 index 0000000000000..22ec2254e31d1 --- /dev/null +++ b/recipes/popt/1.19/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(popt REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE popt::popt) diff --git a/recipes/popt/1.19/test_package/conanfile.py b/recipes/popt/1.19/test_package/conanfile.py new file mode 100755 index 0000000000000..e845ae751a301 --- /dev/null +++ b/recipes/popt/1.19/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/popt/1.19/test_package/test_package.c b/recipes/popt/1.19/test_package/test_package.c new file mode 100755 index 0000000000000..1ba85997582a9 --- /dev/null +++ b/recipes/popt/1.19/test_package/test_package.c @@ -0,0 +1,17 @@ +#include +#include +#include "popt.h" + + +int main(int argc, const char* argv[]) { + struct poptOption table[] = { + POPT_AUTOHELP + POPT_TABLEEND + }; + + poptContext context = poptGetContext(NULL, argc, argv, table, 0); + poptGetNextOpt(context); + poptFreeContext(context); + + return EXIT_SUCCESS; +} diff --git a/recipes/popt/config.yml b/recipes/popt/config.yml old mode 100644 new mode 100755 index b41d4f764c9b5..5701e758adc33 --- a/recipes/popt/config.yml +++ b/recipes/popt/config.yml @@ -1,3 +1,5 @@ versions: + "1.19": + folder: "1.19" "1.16": - folder: all + folder: "1.16" From 333c1f4276a18013cdb039df9be35b6c00fe8aec Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 22:51:06 +0900 Subject: [PATCH 040/108] (#22733) imgui: add version 1.90.2, 1.90.2-docking --- recipes/imgui/all/conandata.yml | 6 ++++++ recipes/imgui/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 99f46ac0b18c0..326ffeb754602 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.90.2": + url: "https://github.com/ocornut/imgui/archive/v1.90.2.tar.gz" + sha256: "452d1c11e5c4b4dfcca272915644a65f1c076498e8318b141ca75cd30470dd68" + "1.90.2-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.2-docking.tar.gz" + sha256: "69f1cd78d49ec9cc847b7082d641434ea731f0be41c6930bea08a46a0794ac17" "1.90.1": url: "https://github.com/ocornut/imgui/archive/v1.90.1.tar.gz" sha256: "21dcc985bb2ae8fe48047c86135dbc438d6980a8f2e08babbda5be820592f282" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index 5444f395d2f43..86b810236bae7 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,8 @@ versions: + "1.90.2": + folder: all + "1.90.2-docking": + folder: all "1.90.1": folder: all "1.90.1-docking": From 39073effa061fb033e5d1a24e5c93f6656622d7e Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 23:09:11 +0900 Subject: [PATCH 041/108] (#22743) libzippp: add version 7.1-1.10.1 --- recipes/libzippp/all/conandata.yml | 3 +++ recipes/libzippp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libzippp/all/conandata.yml b/recipes/libzippp/all/conandata.yml index 20f731c93139a..8419667338e92 100644 --- a/recipes/libzippp/all/conandata.yml +++ b/recipes/libzippp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.1-1.10.1": + url: "https://github.com/ctabin/libzippp/archive/libzippp-v7.1-1.10.1.tar.gz" + sha256: "9ded3c4b5641e65d2b3a3dd0cbc4106209ee17c17df70e5187e7171420752546" "7.0-1.10.1": url: "https://github.com/ctabin/libzippp/archive/libzippp-v7.0-1.10.1.tar.gz" sha256: "67d6808406b4fc255016ede52c7b5105e2d0e43899a3331de9ed86da5dea07a1" diff --git a/recipes/libzippp/config.yml b/recipes/libzippp/config.yml index ce3931e22d5f5..eb03fe8bdec4f 100644 --- a/recipes/libzippp/config.yml +++ b/recipes/libzippp/config.yml @@ -1,4 +1,6 @@ versions: + "7.1-1.10.1": + folder: all "7.0-1.10.1": folder: all "6.1-1.9.2": From 99ecffbf6c15636c3ff801479ea01cd1754638e0 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 12 Feb 2024 23:30:51 +0900 Subject: [PATCH 042/108] (#22749) nng: add version 1.7.2, remove older versions, update mbedtls * nng: add version 1.7.2, remove older versions, update mbedtls * remove older versions in config.yml --- recipes/nng/all/conandata.yml | 19 +++---------------- recipes/nng/all/conanfile.py | 8 +++++++- .../0001-fix-ios-tvos-watchos-1.3.0.patch | 11 ----------- recipes/nng/config.yml | 6 ++---- 4 files changed, 12 insertions(+), 32 deletions(-) delete mode 100644 recipes/nng/all/patches/0001-fix-ios-tvos-watchos-1.3.0.patch diff --git a/recipes/nng/all/conandata.yml b/recipes/nng/all/conandata.yml index 84d072aa8848a..a0f5356224bc7 100644 --- a/recipes/nng/all/conandata.yml +++ b/recipes/nng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.2": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.2.tar.gz" + sha256: "40e6af7bdd5d02ee98ba8fe5fd5c149ce3e5a555f202cdc837e3ead2d7cc7534" "1.7.1": url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.1.tar.gz" sha256: "b62b2170d2b4757f9f01fb65e5aa9f078dec726735e9de5ed5d7e332cbbbf2ef" @@ -17,12 +20,6 @@ sources: "1.3.2": url: "https://github.com/nanomsg/nng/archive/v1.3.2.tar.gz" sha256: "0f8f2ede7f5ea2018c7fa615c76f48662eb06d39c71c3339f8ff38da44470855" - "1.3.1": - url: "https://github.com/nanomsg/nng/archive/v1.3.1.tar.gz" - sha256: "3f258514b6aed931485ce1a6e5745e07416d32e6c4315ae771ff358e9fd18e55" - "1.3.0": - url: "https://github.com/nanomsg/nng/archive/v1.3.0.tar.gz" - sha256: "e8fe50d0f79ec3243733f8b4c25099c88b2597ed1bb0d94a27c4385a2a24ecac" patches: "1.5.1": - patch_file: patches/0001-fix-ios-tvos-watchos-1.5.1.patch @@ -34,13 +31,3 @@ patches: patch_description: "add support iOS, tvOS and watchOS" patch_type: "portability" patch_source: "https://github.com/nanomsg/nng/pull/1474" - "1.3.1": - - patch_file: patches/0001-fix-ios-tvos-watchos-1.3.1.patch - patch_description: "add support iOS, tvOS and watchOS" - patch_type: "portability" - patch_source: "https://github.com/nanomsg/nng/pull/1474" - "1.3.0": - - patch_file: patches/0001-fix-ios-tvos-watchos-1.3.0.patch - patch_description: "add support iOS, tvOS and watchOS" - patch_type: "portability" - patch_source: "https://github.com/nanomsg/nng/pull/1474" diff --git a/recipes/nng/all/conanfile.py b/recipes/nng/all/conanfile.py index 418a70d42be1f..3de52cd9ed251 100644 --- a/recipes/nng/all/conanfile.py +++ b/recipes/nng/all/conanfile.py @@ -26,6 +26,7 @@ class NngConan(ConanFile): "max_taskq_threads": ["ANY"], "max_expire_threads": ["ANY"], "max_poller_threads": ["ANY"], + "compat": [True, False], } default_options = { "shared": False, @@ -36,6 +37,7 @@ class NngConan(ConanFile): "max_taskq_threads": "16", "max_expire_threads": "8", "max_poller_threads": "8", + "compat": True, } def export_sources(self): @@ -48,6 +50,8 @@ def config_options(self): del self.options.max_expire_threads if Version(self.version) < "1.7.0": del self.options.max_poller_threads + if Version(self.version) < "1.7.2": + del self.options.compat def configure(self): if self.options.shared: @@ -63,7 +67,7 @@ def requirements(self): if Version(self.version) < "1.5.2": self.requires("mbedtls/2.25.0") else: - self.requires("mbedtls/3.5.1") + self.requires("mbedtls/3.5.2") def validate(self): compiler_minimum_version = { @@ -96,6 +100,8 @@ def generate(self): tc.variables["NNG_MAX_EXPIRE_THREADS"] = self.options.max_expire_threads if "max_poller_threads" in self.options: tc.variables["NNG_MAX_POLLER_THREADS"] = self.options.max_poller_threads + if "compat" in self.options: + tc.variables["NNG_ENABLE_COMPAT"] = self.options.compat tc.generate() def build(self): diff --git a/recipes/nng/all/patches/0001-fix-ios-tvos-watchos-1.3.0.patch b/recipes/nng/all/patches/0001-fix-ios-tvos-watchos-1.3.0.patch deleted file mode 100644 index 3b71e923ae407..0000000000000 --- a/recipes/nng/all/patches/0001-fix-ios-tvos-watchos-1.3.0.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -214,7 +214,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Android") - add_definitions(-DNNG_USE_EVENTFD) - set(NNG_PLATFORM_POSIX ON) - --elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") -+elseif (APPLE) - add_definitions(-DNNG_PLATFORM_POSIX) - add_definitions(-DNNG_PLATFORM_DARWIN) - set(NNG_PLATFORM_POSIX ON) diff --git a/recipes/nng/config.yml b/recipes/nng/config.yml index 3e8e4d6c71efa..5c118cf597a33 100644 --- a/recipes/nng/config.yml +++ b/recipes/nng/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.2": + folder: all "1.7.1": folder: all "1.7.0": @@ -11,7 +13,3 @@ versions: folder: all "1.3.2": folder: all - "1.3.1": - folder: all - "1.3.0": - folder: all From c631a5e52194a89f17fdad0141aef295d650d807 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 12 Feb 2024 17:57:37 +0300 Subject: [PATCH 043/108] (#16372) dnet: add 1.16.3 * Init libdnet * move to cmake * prepare for cmake * rename package * fix license * fix write header * fix libcxx and cppstd * bump to upstream * Apply suggestions from code review Co-authored-by: Martin Valgur * Remove test_v1_package, fix configure method --------- Co-authored-by: Martin Valgur Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/dnet/all/conandata.yml | 4 ++ recipes/dnet/all/conanfile.py | 70 ++++++++++++++++++++ recipes/dnet/all/test_package/CMakeLists.txt | 7 ++ recipes/dnet/all/test_package/conanfile.py | 26 ++++++++ recipes/dnet/all/test_package/test_package.c | 39 +++++++++++ recipes/dnet/config.yml | 3 + 6 files changed, 149 insertions(+) create mode 100644 recipes/dnet/all/conandata.yml create mode 100644 recipes/dnet/all/conanfile.py create mode 100644 recipes/dnet/all/test_package/CMakeLists.txt create mode 100644 recipes/dnet/all/test_package/conanfile.py create mode 100644 recipes/dnet/all/test_package/test_package.c create mode 100644 recipes/dnet/config.yml diff --git a/recipes/dnet/all/conandata.yml b/recipes/dnet/all/conandata.yml new file mode 100644 index 0000000000000..6e95e35e1a154 --- /dev/null +++ b/recipes/dnet/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.17.0": + url: "https://github.com/ofalk/libdnet/archive/refs/tags/libdnet-1.17.0.tar.gz" + sha256: "6be1ed0763151ede4c9665a403f1c9d974b2ffab2eacdb26b22078e461aae1dc" diff --git a/recipes/dnet/all/conanfile.py b/recipes/dnet/all/conanfile.py new file mode 100644 index 0000000000000..c8d803e208864 --- /dev/null +++ b/recipes/dnet/all/conanfile.py @@ -0,0 +1,70 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +import os + + +required_conan_version = ">=1.56.0" + + +class dnetConan(ConanFile): + name = "dnet" + description = "Provides a simplified, portable interface to several low-level networking routines." + homepage = "https://github.com/ofalk/libdnet" + topics = ("dnet", "libdnet", "libdumbnet") + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True + } + settings = "os", "arch", "compiler", "build_type" + + + def layout(self): + cmake_layout(self, src_folder="src") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + # This is a pure C project + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self,"LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.configure() + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs.append("dnet") + self.cpp_info.includedirs.append(os.path.join("include", "dnet")) + + if self.settings.os == 'Windows': + self.cpp_info.system_libs = ['Iphlpapi', 'wsock32'] diff --git a/recipes/dnet/all/test_package/CMakeLists.txt b/recipes/dnet/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d2b66a2eb9cdf --- /dev/null +++ b/recipes/dnet/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +find_package(dnet REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE dnet::dnet) diff --git a/recipes/dnet/all/test_package/conanfile.py b/recipes/dnet/all/test_package/conanfile.py new file mode 100644 index 0000000000000..dcfce1e159562 --- /dev/null +++ b/recipes/dnet/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run("{} {}".format(bin_path, "127.0.0.1"), env="conanrun") diff --git a/recipes/dnet/all/test_package/test_package.c b/recipes/dnet/all/test_package/test_package.c new file mode 100644 index 0000000000000..6102a898664e5 --- /dev/null +++ b/recipes/dnet/all/test_package/test_package.c @@ -0,0 +1,39 @@ +#include +#include +#include + +#include +#include +#include + +#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) +#include +#elif defined(_WIN32) +#include +#endif + +void addr_usage(void) +{ + fprintf(stderr, "Usage: dnet addr
...\n"); + exit(1); +} + +int main(int argc, char *argv[]) +{ + struct addr addr; + int c, len; + + if (argc == 1 || *(argv[1]) == '-') + addr_usage(); + + for (c = 1; c < argc; c++) { + if (addr_aton(argv[c], &addr) < 0) + addr_usage(); + + len = addr.addr_bits / 8; + + if (write(1, addr.addr_data8, len) != len) + err(1, "write"); + } + return 0; +} diff --git a/recipes/dnet/config.yml b/recipes/dnet/config.yml new file mode 100644 index 0000000000000..aad66aeff535b --- /dev/null +++ b/recipes/dnet/config.yml @@ -0,0 +1,3 @@ +versions: + "1.17.0": + folder: "all" From d4f8f3fc452a8be89cdc2900c9917a97e5851314 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:30:09 +0100 Subject: [PATCH 044/108] (#22675) qt: update libpng/1.6.42 Co-authored-by: Uilian Ries --- recipes/qt/5.x.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index ff873bf5ea419..8b1c566af5c7c 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -371,7 +371,7 @@ def requirements(self): else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_sqlite3 and not self.options.multiconfiguration: self.requires("sqlite3/3.45.0") if self.options.get_safe("with_mysql", False): From cc9c2eafb0f71e4f1bce172bd91b8f0d4a270cad Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 01:09:10 +0900 Subject: [PATCH 045/108] (#22741) glaze: add version 2.0.9 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 247424073dd75..082ab5fde6a56 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.9": + url: "https://github.com/stephenberry/glaze/archive/v2.0.9.tar.gz" + sha256: "c1ffede3db5c74d2c46a3abe576985dc729c95df1b48ab575079427b55488bbd" "2.0.7": url: "https://github.com/stephenberry/glaze/archive/v2.0.7.tar.gz" sha256: "1bf981e72733fb5a02a91c9642d91fa39e4a1ebe42f81e8fc6a016c11ed762cb" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 67e6a0900ca46..5d09cdcfa69bd 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.9": + folder: all "2.0.7": folder: all "2.0.6": From 99fc90a31176bc52e6ebefb826d1d284f8d457c9 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 01:29:53 +0900 Subject: [PATCH 046/108] (#22756) leveldb: update snappy/1.1.10 --- recipes/leveldb/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/leveldb/all/conanfile.py b/recipes/leveldb/all/conanfile.py index 25822de4f07a9..8886ea342497d 100644 --- a/recipes/leveldb/all/conanfile.py +++ b/recipes/leveldb/all/conanfile.py @@ -52,7 +52,7 @@ def requirements(self): # there is no "official" conan package yet; when that is available, we # can add similar with options for those if self.options.with_snappy: - self.requires("snappy/1.1.9") + self.requires("snappy/1.1.10") if self.options.with_crc32c: self.requires("crc32c/1.1.2") From 4cd206343279143418283690f95a77256143fee2 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 12 Feb 2024 18:10:02 +0100 Subject: [PATCH 047/108] (#22709) aws-c-auth: update dependencies Due to #21033, we'll have to raise the aws-c-io dependency here as well. --- recipes/aws-c-auth/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/aws-c-auth/all/conanfile.py b/recipes/aws-c-auth/all/conanfile.py index 0181ea2ac5e2c..edc82083e9c0b 100644 --- a/recipes/aws-c-auth/all/conanfile.py +++ b/recipes/aws-c-auth/all/conanfile.py @@ -61,7 +61,7 @@ def requirements(self): else: self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.32", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) self.requires("aws-c-http/0.7.14", transitive_headers=True) self.requires("aws-c-sdkutils/0.1.12", transitive_headers=True) From 11f8b5b175d9beaac1c4f0b8d293f39f29fc13fb Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 12 Feb 2024 18:22:58 +0000 Subject: [PATCH 048/108] (#22754) [bot] Update authorized users list (2024-02-12) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 4200ed3ec3c89..37b43973ce278 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1284,3 +1284,7 @@ authorized_users: - MelamudMichael - Rodarin - philippun1 +- Kaaml +- AlexanderBabansky +- matthiasbuhl +- cnicolaescu From f79bb63fc77a749aeb1cac56dda0e5c049094058 Mon Sep 17 00:00:00 2001 From: PeteAudinate <99274874+PeteAudinate@users.noreply.github.com> Date: Mon, 12 Feb 2024 18:49:09 +0000 Subject: [PATCH 049/108] (#22732) b2: Don't apply CXXFLAGS env var if it doesn't exist Without this cxxflags are set to "None" which causes a compile failure. --- recipes/b2/portable/conanfile.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/recipes/b2/portable/conanfile.py b/recipes/b2/portable/conanfile.py index f93460f8b28cf..eb45936017eef 100644 --- a/recipes/b2/portable/conanfile.py +++ b/recipes/b2/portable/conanfile.py @@ -159,13 +159,14 @@ def build(self): if self.options.use_cxx_env: envvars = VirtualBuildEnv(self).vars() - cxx = envvars.get("CXX") - if cxx: - command += f" --cxx={cxx}" - self._write_project_config(cxx) + cxx_env = envvars.get("CXX") + if cxx_env: + command += f" --cxx={cxx_env}" + self._write_project_config(cxx_env) cxxflags_env = envvars.get("CXXFLAGS") - cxxflags = f"{cxxflags} {cxxflags_env}" + if cxxflags_env: + cxxflags = f"{cxxflags} {cxxflags_env}" if cxxflags: command += f' --cxxflags="{cxxflags}"' From 9540705c64a0b4fb8a375f40b2f793b091826a30 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 05:49:44 +0900 Subject: [PATCH 050/108] (#22755) uvw: add version 3.3.0 --- recipes/uvw/all/conandata.yml | 3 +++ recipes/uvw/all/conanfile.py | 1 + recipes/uvw/config.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/recipes/uvw/all/conandata.yml b/recipes/uvw/all/conandata.yml index 2ce44b1f85239..f88dde6763845 100644 --- a/recipes/uvw/all/conandata.yml +++ b/recipes/uvw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.0": + url: "https://github.com/skypjack/uvw/archive/v3.3.0_libuv_v1.47.tar.gz" + sha256: "aabb17d3d8f0b3481b44e981c889dd4a2a6a3f1a96a4d01055e669f4b7d37d0e" "3.2.0": url: "https://github.com/skypjack/uvw/archive/v3.2.0_libuv_v1.46.tar.gz" sha256: "bd5aed741765950074b1ea2507291dce81e528abdf56c406991ad4a27d8d1714" diff --git a/recipes/uvw/all/conanfile.py b/recipes/uvw/all/conanfile.py index af145be3d5ce2..fc221de9ee0df 100644 --- a/recipes/uvw/all/conanfile.py +++ b/recipes/uvw/all/conanfile.py @@ -38,6 +38,7 @@ def _compilers_minimum_version(self): @property def _required_libuv_version(self): return { + "3.3.0": "1.47.0", "3.2.0": "1.46.0", "3.1.0": "1.45.0", "2.12.1": "1.44.2", diff --git a/recipes/uvw/config.yml b/recipes/uvw/config.yml index f7ecad1e5c9ed..7b4a0bac4b71c 100644 --- a/recipes/uvw/config.yml +++ b/recipes/uvw/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.0": + folder: "all" "3.2.0": folder: "all" "3.1.0": From ad0b678359127ee31176de2881c505ffb903aceb Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:47:20 +0000 Subject: [PATCH 051/108] (#22758) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: conan-center-bot --- .c3i/conan_v2_ready_references.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 8eeed5f74f09b..c8822abbf29a6 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -343,6 +343,7 @@ required_for_references: - erikzenker-hsm - erkir - etc2comp +- etcd-cpp-apiv3 - eternal - ethash - etl @@ -530,8 +531,10 @@ required_for_references: - indicators - indirect_value - influxdb-cpp +- influxdb-cxx - inih - inja +- intel-ipsec-mb - intel-neon2sse - intx - inversify-cpp @@ -801,6 +804,7 @@ required_for_references: - linux-syscall-support - litehtml - lksctp-tools +- llama-cpp - llhttp - llvm-openmp - lmdb @@ -831,6 +835,7 @@ required_for_references: - make - mapbox-geometry - mapbox-variant +- mapbox-wagyu - mariadb-connector-c - marisa - matchit @@ -859,6 +864,7 @@ required_for_references: - metall - metis - mfast +- mgclient - mgs - microprofile - microservice-essentials @@ -983,6 +989,7 @@ required_for_references: - opencore-amr - opencv - openddl-parser +- opendis6 - opene57 - openexr - openfbx From b7d0b6343d9648658d971b7468687e55b6cdfef1 Mon Sep 17 00:00:00 2001 From: Cristi N Date: Tue, 13 Feb 2024 09:50:35 +0100 Subject: [PATCH 052/108] (#22753) sqlite3: added `use_uri` option - which translates into `SQLITE_USE_URI` compile option --- recipes/sqlite3/all/CMakeLists.txt | 4 ++++ recipes/sqlite3/all/conanfile.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/recipes/sqlite3/all/CMakeLists.txt b/recipes/sqlite3/all/CMakeLists.txt index 1f1e60b9b2dcf..9d6257e47853f 100644 --- a/recipes/sqlite3/all/CMakeLists.txt +++ b/recipes/sqlite3/all/CMakeLists.txt @@ -17,6 +17,7 @@ option(ENABLE_RTREE "Enable support for the R*Tree index extension") option(ENABLE_UNLOCK_NOTIFY "Enable support for the unlock notify API") option(ENABLE_DEFAULT_SECURE_DELETE "Turns on secure deletion by default") option(USE_ALLOCA "The alloca() memory allocator will be used in a few situations where it is appropriate.") +option(USE_URI "This option causes the URI filename process logic to be enabled by default.") option(OMIT_LOAD_EXTENSION "Omits the entire extension loading mechanism from SQLite") option(OMIT_DEPRECATED "Omits deprecated interfaces and features") if(SQLITE3_VERSION VERSION_GREATER_EQUAL "3.35.0") @@ -93,6 +94,9 @@ endif() if(USE_ALLOCA) target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_USE_ALLOCA) endif() +if(USE_URI) + target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_USE_URI) +endif() if(OMIT_LOAD_EXTENSION) target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_OMIT_LOAD_EXTENSION) endif() diff --git a/recipes/sqlite3/all/conanfile.py b/recipes/sqlite3/all/conanfile.py index eddf425a36988..8c9aee8f54806 100644 --- a/recipes/sqlite3/all/conanfile.py +++ b/recipes/sqlite3/all/conanfile.py @@ -35,6 +35,7 @@ class Sqlite3Conan(ConanFile): "enable_preupdate_hook": [True, False], "enable_rtree": [True, False], "use_alloca": [True, False], + "use_uri": [True, False], "omit_load_extension": [True, False], "omit_deprecated": [True, False], "enable_math_functions": [True, False], @@ -64,6 +65,7 @@ class Sqlite3Conan(ConanFile): "enable_preupdate_hook": False, "enable_rtree": True, "use_alloca": False, + "use_uri": False, "omit_load_extension": False, "omit_deprecated": False, "enable_math_functions": True, @@ -130,6 +132,7 @@ def generate(self): tc.variables["ENABLE_UNLOCK_NOTIFY"] = self.options.enable_unlock_notify tc.variables["ENABLE_DEFAULT_SECURE_DELETE"] = self.options.enable_default_secure_delete tc.variables["USE_ALLOCA"] = self.options.use_alloca + tc.variables["USE_URI"] = self.options.use_uri tc.variables["OMIT_LOAD_EXTENSION"] = self.options.omit_load_extension tc.variables["OMIT_DEPRECATED"] = self.options.omit_deprecated if self._has_enable_math_function_option: From 2472bc0fdd9da2f19710d337413db85ee603bb32 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 18:27:56 +0900 Subject: [PATCH 053/108] (#22760) glaze: add version 2.1.0 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 082ab5fde6a56..4e699ca475415 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.0": + url: "https://github.com/stephenberry/glaze/archive/v2.1.0.tar.gz" + sha256: "b3bb4d886f17d266f37a6eec2c42b2e57e287918b20511297c4eb6b9960f0f8f" "2.0.9": url: "https://github.com/stephenberry/glaze/archive/v2.0.9.tar.gz" sha256: "c1ffede3db5c74d2c46a3abe576985dc729c95df1b48ab575079427b55488bbd" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 5d09cdcfa69bd..45dcbfc2283ba 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.0": + folder: all "2.0.9": folder: all "2.0.7": From c83402cd0166e66c662b1bbfafcfc130bdf5c8ce Mon Sep 17 00:00:00 2001 From: Johannes Wolf <519002+johannes-wolf@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:47:57 +0100 Subject: [PATCH 054/108] (#22757) sfl: Add sfl version 1.2.3 * sfl: Add sfl conan package * sfl: Add sfl conan package --- recipes/sfl/all/conandata.yml | 4 ++ recipes/sfl/all/conanfile.py | 45 +++++++++++++++++++ recipes/sfl/all/test_package/CMakeLists.txt | 8 ++++ recipes/sfl/all/test_package/conanfile.py | 28 ++++++++++++ recipes/sfl/all/test_package/test_package.cpp | 23 ++++++++++ recipes/sfl/config.yml | 3 ++ 6 files changed, 111 insertions(+) create mode 100644 recipes/sfl/all/conandata.yml create mode 100644 recipes/sfl/all/conanfile.py create mode 100644 recipes/sfl/all/test_package/CMakeLists.txt create mode 100644 recipes/sfl/all/test_package/conanfile.py create mode 100644 recipes/sfl/all/test_package/test_package.cpp create mode 100644 recipes/sfl/config.yml diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml new file mode 100644 index 0000000000000..78138456b199b --- /dev/null +++ b/recipes/sfl/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.3": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.3.tar.gz" + sha256: "6111a81b5dcad091c5c8a420d127c1bbfb06f8fbb7d915e6a30b4b7d2d67db71" diff --git a/recipes/sfl/all/conanfile.py b/recipes/sfl/all/conanfile.py new file mode 100644 index 0000000000000..ef6582dd3b15f --- /dev/null +++ b/recipes/sfl/all/conanfile.py @@ -0,0 +1,45 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.62.0" + + +class SflConan(ConanFile): + name = "sfl" + description = "A header-only C++11 library that offers several new containers" + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/slavenf/sfl-library" + topics = ("containers", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/sfl/all/test_package/CMakeLists.txt b/recipes/sfl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f8085bbcbe2d6 --- /dev/null +++ b/recipes/sfl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(sfl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE sfl::sfl) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/sfl/all/test_package/conanfile.py b/recipes/sfl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e62d4fe972ff2 --- /dev/null +++ b/recipes/sfl/all/test_package/conanfile.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sfl/all/test_package/test_package.cpp b/recipes/sfl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..78ba6f47df1d5 --- /dev/null +++ b/recipes/sfl/all/test_package/test_package.cpp @@ -0,0 +1,23 @@ +#include + +#include "sfl/small_vector.hpp" +#include "sfl/small_flat_set.hpp" +#include "sfl/small_flat_map.hpp" +#include "sfl/small_flat_multiset.hpp" +#include "sfl/small_flat_multimap.hpp" +#include "sfl/small_unordered_flat_set.hpp" +#include "sfl/small_unordered_flat_map.hpp" +#include "sfl/small_unordered_flat_multiset.hpp" +#include "sfl/small_unordered_flat_multimap.hpp" +#include "sfl/compact_vector.hpp" +#include "sfl/segmented_vector.hpp" + +int main() { + sfl::small_vector v1; + v1.push_back(123); + + sfl::segmented_vector v2; + v2.push_back(123); + + return EXIT_SUCCESS; +} diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml new file mode 100644 index 0000000000000..81ff4bc37c872 --- /dev/null +++ b/recipes/sfl/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.3": + folder: "all" From 1240f77542b77a9b245583162c8b63e980b2a59c Mon Sep 17 00:00:00 2001 From: igormironchik Date: Tue, 13 Feb 2024 14:48:12 +0300 Subject: [PATCH 055/108] (#22716) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 16e0c43dea8d2..59b1267eb8b5a 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.1": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.1.tar.gz" + sha256: "054cbaa286cfd3ce2d4e5c178b303b80eb23ad5bd54541571d6c9afbd285986e" "2.7.0": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.0.tar.gz" sha256: "e5722b586fa6c6d126487056fa47f0d933b94413ac44b79f52573226eca04a07" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 36c498e0d5bfd..3527c586022c3 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.1": + folder: all "2.7.0": folder: all "2.6.0": From 5daf02ff7bbafca2444af6c5b4d2c90d777b8176 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Tue, 13 Feb 2024 17:28:09 +0300 Subject: [PATCH 056/108] (#22762) md4qt: bump version to 2.7.2 --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 59b1267eb8b5a..315e8aca50cf0 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.2": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.2.tar.gz" + sha256: "2d6b65db799fff944f2ecb8bb411f17687e41e0d5a17a37ad1c4bd22fe997d8b" "2.7.1": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.1.tar.gz" sha256: "054cbaa286cfd3ce2d4e5c178b303b80eb23ad5bd54541571d6c9afbd285986e" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 3527c586022c3..e03897a5ac97e 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.2": + folder: all "2.7.1": folder: all "2.7.0": From 96c442996dfa00e8ca3bcc1407a4982c49440b27 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 13 Feb 2024 16:02:11 +0100 Subject: [PATCH 057/108] (#22763) [hiredis] Use cache variables to make work with Cmake Signed-off-by: Uilian Ries --- recipes/hiredis/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/hiredis/all/conanfile.py b/recipes/hiredis/all/conanfile.py index 4973e6b1da136..f81b8f52adbcd 100644 --- a/recipes/hiredis/all/conanfile.py +++ b/recipes/hiredis/all/conanfile.py @@ -56,9 +56,9 @@ def generate(self): # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option() if Version(self.version) >= "1.2.0": tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["ENABLE_SSL"] = self.options.with_ssl - tc.variables["DISABLE_TESTS"] = True - tc.variables["ENABLE_EXAMPLES"] = False + tc.cache_variables["ENABLE_SSL"] = self.options.with_ssl + tc.cache_variables["DISABLE_TESTS"] = True + tc.cache_variables["ENABLE_EXAMPLES"] = False tc.generate() deps = CMakeDeps(self) deps.generate() From 37ed7f626150388f389b951994bd7a3477c40d45 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 13 Feb 2024 20:07:42 +0200 Subject: [PATCH 058/108] (#22295) physx: add v4.1.2, add package_type and no_copy_source=True MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * physx: add v4.1.2 * physx: set no_copy_source = True, package_type = "library" The source archive is more than 600 MB alone. * physx: fix test_package * physx: CMakeDeps is not needed * physx: use f-strings * Patch on source() method instead of build() due to no_copy_source=True We checked that the patches do not depend on the configuration --------- Co-authored-by: Rubén Rincón Blanco --- recipes/physx/4.x.x/conandata.yml | 13 ++++++++++ recipes/physx/4.x.x/conanfile.py | 25 ++++++++----------- recipes/physx/4.x.x/test_package/conanfile.py | 5 ++-- recipes/physx/config.yml | 2 ++ 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/recipes/physx/4.x.x/conandata.yml b/recipes/physx/4.x.x/conandata.yml index 6ce5c7aca0b19..3407713e50946 100644 --- a/recipes/physx/4.x.x/conandata.yml +++ b/recipes/physx/4.x.x/conandata.yml @@ -1,8 +1,21 @@ sources: + "4.1.2": + url: "https://github.com/NVIDIAGameWorks/PhysX/archive/a2c0428acab643e60618c681b501e86f7fd558cc.zip" + sha256: "d9c1939490a990277f8c773f288294cecb10e6fad8c820acad90fd4168b8ace3" "4.1.1": url: "https://github.com/NVIDIAGameWorks/PhysX/archive/ae80dede0546d652040ae6260a810e53e20a06fa.zip" sha256: "dd7db4c7879659658753029de57d04b18047ec04687b60f70335cde148a48d68" patches: + "4.1.2": + - patch_file: "patches/0003-PsWindowsInlineAoS-msvc142-bug-workaround.patch" + patch_description: "Workaround for a MSVC 142 bug on V3LoadA" + patch_type: "portability" + - patch_file: "patches/0004-Conan-PhysXGpu-name-workaround.patch" + patch_description: "Fix PhysXGpu library name" + patch_type: "conan" + - patch_file: "patches/0005-CMake-macos-ios-android-install-targets.patch" + patch_description: "Add installation targets for iOS, MacOS, Android" + patch_type: "portability" "4.1.1": - patch_file: "patches/0001-PsAllocator-include-typeinfo.patch" patch_description: "Fixed typeinfo inclusion for some VS versions" diff --git a/recipes/physx/4.x.x/conanfile.py b/recipes/physx/4.x.x/conanfile.py index 502ac7ccfc798..35264535f45b5 100644 --- a/recipes/physx/4.x.x/conanfile.py +++ b/recipes/physx/4.x.x/conanfile.py @@ -18,6 +18,7 @@ class PhysXConan(ConanFile): homepage = "https://github.com/NVIDIAGameWorks/PhysX" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "compiler", "arch", "build_type" options = { "shared": [True, False], @@ -35,8 +36,7 @@ class PhysXConan(ConanFile): } short_paths = True - - generators = "CMakeDeps" + no_copy_source = True def export_sources(self): export_conandata_patches(self) @@ -64,30 +64,28 @@ def validate(self): if self.settings.os == "Macos": if self.settings.arch not in ["x86", "x86_64"]: - raise ConanInvalidConfiguration("{} only supports x86 and x86_64 on macOS".format(self.name)) - + raise ConanInvalidConfiguration(f"{self.name} only supports x86 and x86_64 on macOS") + if valid_min_cppstd(self, 17): - raise ConanInvalidConfiguration("{} is not supported with C++ 17. Contributions are welcome.".format(self.name)) + raise ConanInvalidConfiguration(f"{self.name} is not supported with C++ 17. Contributions are welcome.") build_type = self.settings.build_type if build_type not in ["Debug", "RelWithDebInfo", "Release"]: raise ConanInvalidConfiguration("Current build_type is not supported") if self.settings.os == "Windows" and not is_msvc(self): - raise ConanInvalidConfiguration("{} only supports Visual Studio on Windows".format(self.name)) + raise ConanInvalidConfiguration(f"{self.name} only supports Visual Studio on Windows") if is_msvc(self): allowed_runtimes = ["MDd", "MTd"] if build_type == "Debug" else ["MD", "MT"] if msvc_runtime_flag(self) not in allowed_runtimes: raise ConanInvalidConfiguration( - "Visual Studio runtime {0} is required for {1} build type".format( - " or ".join(allowed_runtimes), - build_type, - ) + f"Visual Studio runtime {' or '.join(allowed_runtimes)} is required for {build_type} build type" ) def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + self._patch_sources() def generate(self): tc = CMakeToolchain(self) @@ -141,8 +139,6 @@ def generate(self): tc.generate() def build(self): - self._patch_sources() - cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "physx/compiler/public")) cmake.build(build_type=self._get_physx_build_type()) @@ -185,8 +181,7 @@ def _patch_sources(self): ): target, _ = os.path.splitext(os.path.basename(cmake_file)) replace_in_file(self, os.path.join(physx_source_cmake_dir, cmake_file), - "SET_TARGET_PROPERTIES({} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)".format(target), - "") + f"SET_TARGET_PROPERTIES({target} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)", "") # No error for compiler warnings replace_in_file(self, os.path.join(physx_source_cmake_dir, "windows", "CMakeLists.txt"), @@ -263,7 +258,7 @@ def _copy_external_bin(self): "pattern": "PhysXDevice*.dll", "vc_ver": {"180": "vc120", "190": "vc140", "191": "vc141"}.get(str(compiler_version), "vc142") }] - + package_dst_bin_dir = os.path.join(self.package_folder, "bin") for dll_info in dll_info_list: diff --git a/recipes/physx/4.x.x/test_package/conanfile.py b/recipes/physx/4.x.x/test_package/conanfile.py index 3bc1fe0a67f9f..ff6d00f1438e2 100644 --- a/recipes/physx/4.x.x/test_package/conanfile.py +++ b/recipes/physx/4.x.x/test_package/conanfile.py @@ -6,6 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) @@ -15,7 +16,7 @@ def layout(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["TEST_SHARED_LIBRARY"] = True if "fPIC" not in self.options["physx"].fields else self.options["physx"].fPIC + tc.variables["TEST_SHARED_LIBRARY"] = self.dependencies["physx"].options.get_safe("fPIC", True) tc.generate() def build(self): @@ -25,5 +26,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/physx/config.yml b/recipes/physx/config.yml index ff5afb6866457..f46b35cc99652 100644 --- a/recipes/physx/config.yml +++ b/recipes/physx/config.yml @@ -1,3 +1,5 @@ versions: + "4.1.2": + folder: "4.x.x" "4.1.1": folder: "4.x.x" From c9662ba806cbd111fbffc50b0560e743ad26b3f4 Mon Sep 17 00:00:00 2001 From: Kim Lindberger Date: Wed, 14 Feb 2024 12:09:27 +0100 Subject: [PATCH 059/108] (#21761) pthreadpool: Add cci.20231129 --- recipes/pthreadpool/all/conandata.yml | 3 +++ recipes/pthreadpool/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/pthreadpool/all/conandata.yml b/recipes/pthreadpool/all/conandata.yml index 4a1b5d58d8c57..5b276e0fd5b93 100644 --- a/recipes/pthreadpool/all/conandata.yml +++ b/recipes/pthreadpool/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231129": + url: "https://github.com/Maratyszcza/pthreadpool/archive/4fe0e1e183925bf8cfa6aae24237e724a96479b8.zip" + sha256: "a4cf06de57bfdf8d7b537c61f1c3071bce74e57524fe053e0bbd2332feca7f95" "cci.20210218": url: "https://github.com/Maratyszcza/pthreadpool/archive/b4589998be9a0f794236cf46f1b5b232b2b15ca3.zip" sha256: "b09f79d1b609239861bce5ed4ba4fbcf04f36e2c31471276158c44e5e15fde95" diff --git a/recipes/pthreadpool/config.yml b/recipes/pthreadpool/config.yml index 888d588d579dc..cb37cf1973096 100644 --- a/recipes/pthreadpool/config.yml +++ b/recipes/pthreadpool/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20231129": + folder: all "cci.20210218": folder: all From c05d1e9fe8eef997d59346269594368c4c39824e Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 15 Feb 2024 01:47:05 +0900 Subject: [PATCH 060/108] (#19698) oatpp-sqlite: update sqlite3, use transitive_headers, use rm_safe * oatpp-sqlite: update sqlite3, use transitive_headers, use rm_safe * update sqlite3/3.43.1 * update dependencies Co-authored-by: Matthieu Darbois * update sqlite3 --------- Co-authored-by: Matthieu Darbois --- recipes/oatpp-sqlite/all/conanfile.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/recipes/oatpp-sqlite/all/conanfile.py b/recipes/oatpp-sqlite/all/conanfile.py index 75896ed5f3e71..5d2b46351ef5e 100644 --- a/recipes/oatpp-sqlite/all/conanfile.py +++ b/recipes/oatpp-sqlite/all/conanfile.py @@ -7,17 +7,17 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.53.0" class OatppsqliteConan(ConanFile): name = "oatpp-sqlite" + description = "SQLite adapter for oatpp ORM." license = "Apache-2.0" - homepage = "https://github.com/oatpp/oatpp-sqlite" url = "https://github.com/conan-io/conan-center-index" - description = "oat++ SQLite library" + homepage = "https://github.com/oatpp/oatpp-sqlite" topics = ("oat++", "oatpp", "sqlite") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,17 +34,14 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires(f"oatpp/{self.version}") - self.requires("sqlite3/3.39.4") + self.requires(f"oatpp/{self.version}", transitive_headers=True) + self.requires("sqlite3/3.45.0") def validate(self): if self.info.settings.compiler.get_safe("cppstd"): @@ -57,8 +54,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires GCC >=5") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) From 02ff9d0d653fa0ca9c2cba9ce1c46bef0e79f176 Mon Sep 17 00:00:00 2001 From: Alexis Placet Date: Wed, 14 Feb 2024 18:11:09 +0100 Subject: [PATCH 061/108] (#22710) sqlcipher: Add 4.5.6 * sqlcipher: Add 4.5.6 * sqlcipher: Add 4.5.6 * sqlcipher: Fix topic case and add missing endline * sqlcipher: Fix license for version >4.5.6 * do not enforce cmake in test package Signed-off-by: Uilian Ries * sqlcipher: relax license filename to copy Co-authored-by: Uilian Ries * sqlcipher: Add option to enable column metadata * sqlcipher: do not enforce cmake in test package #2 --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/sqlcipher/all/conandata.yml | 7 + recipes/sqlcipher/all/conanfile.py | 11 +- .../all/patches/Makefile.in-v4.5.6.patch | 25 +++ .../all/patches/Makefile.msc-v4.5.6.patch | 161 ++++++++++++++++++ .../all/patches/fix_configure-v4.5.6.patch | 20 +++ .../sqlcipher/all/test_package/conanfile.py | 9 - .../all/test_v1_package/conanfile.py | 9 - recipes/sqlcipher/config.yml | 2 + 8 files changed, 223 insertions(+), 21 deletions(-) create mode 100644 recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch create mode 100644 recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch create mode 100644 recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch diff --git a/recipes/sqlcipher/all/conandata.yml b/recipes/sqlcipher/all/conandata.yml index a6f870e23b894..b9d316e874757 100644 --- a/recipes/sqlcipher/all/conandata.yml +++ b/recipes/sqlcipher/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.5.6": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.6.zip" + sha256: "5d269166c33c39c4dc6fc14be4ac8cd78b022f8bd59b0775becf0c896331a539" "4.5.1": url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.1.zip" sha256: "08a1024b299b5527d5b5ed79f67957938b516567f68662e973c4bec1b843b28e" @@ -18,6 +21,10 @@ sources: url: "https://github.com/sqlcipher/sqlcipher/archive/v4.3.0.zip" sha256: "41e1408465488e9c478ca5b7c5f8410405a10caa73b82db60ac115a76c563c05" patches: + "4.5.6": + - patch_file: patches/Makefile.in-v4.5.6.patch + - patch_file: patches/Makefile.msc-v4.5.6.patch + - patch_file: patches/fix_configure-v4.5.6.patch "4.5.1": - patch_file: patches/Makefile.in-v4.5.1.patch - patch_file: patches/Makefile.msc-v4.5.1.patch diff --git a/recipes/sqlcipher/all/conanfile.py b/recipes/sqlcipher/all/conanfile.py index d61f784a9ae42..103c2ec526cd3 100644 --- a/recipes/sqlcipher/all/conanfile.py +++ b/recipes/sqlcipher/all/conanfile.py @@ -20,7 +20,7 @@ class SqlcipherConan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.zetetic.net/sqlcipher/" - topics = ("database", "encryption", "SQLite") + topics = ("database", "encryption", "sqlite") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -30,6 +30,7 @@ class SqlcipherConan(ConanFile): "crypto_library": ["openssl", "libressl", "commoncrypto"], "with_largefile": [True, False], "temporary_store": ["always_file", "default_file", "default_memory", "always_memory"], + "enable_column_metadata": [True, False], } default_options = { "shared": False, @@ -37,6 +38,7 @@ class SqlcipherConan(ConanFile): "crypto_library": "openssl", "with_largefile": True, "temporary_store": "default_memory", + "enable_column_metadata": False, } @property @@ -114,7 +116,10 @@ def _generate_msvc(self): env.define("OPTS", f'-I{crypto_dep.includedir} -DSQLITE_HAS_CODEC') env.define("NO_TCL", "1") env.define("USE_AMALGAMATION", "1") - env.define("OPT_FEATURE_FLAGS", "-DSQLCIPHER_CRYPTO_OPENSSL") + opt_feature_flags = "-DSQLCIPHER_CRYPTO_OPENSSL" + if self.options.enable_column_metadata: + opt_feature_flags += " -DSQLITE_ENABLE_COLUMN_METADATA" + env.define("OPT_FEATURE_FLAGS", opt_feature_flags) env.define("SQLITE_TEMP_STORE", self._temp_store_nmake_value) env.define("TCLSH_CMD", self.dependencies.build['tcl'].runenv_info.vars(self)['TCLSH']) @@ -221,7 +226,7 @@ def build(self): autotools.make() def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) if is_msvc(self): copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.source_folder, keep_path=False) copy(self, "*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.source_folder, keep_path=False) diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch new file mode 100644 index 0000000000000..ea44332dff260 --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile.in b/Makefile.in +index 870c5d30..4dc5d292 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -672,8 +672,7 @@ SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-all: sqlite3.h libsqlcipher.la $(SQLITE3_SHELL_TARGET) \ +- $(HAVE_TCL:1=libtclsqlite3.la) ++all: sqlite3.h libsqlcipher.la + + Makefile: $(TOP)/Makefile.in + ./config.status +@@ -1557,9 +1556,8 @@ lib_install: libsqlcipher.la + $(INSTALL) -d $(DESTDIR)$(libdir) + $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) + +-install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install} ++install: lib_install sqlite3.h sqlcipher.pc + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) diff --git a/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch new file mode 100644 index 0000000000000..94b469d07e19d --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch @@ -0,0 +1,161 @@ +diff --git a/Makefile.msc b/Makefile.msc +index 85487315..e3c00752 100644 +--- a/Makefile.msc ++++ b/Makefile.msc +@@ -299,9 +299,9 @@ SQLITE3H = sqlite3.h + # + !IFNDEF SQLITE3DLL + !IF $(FOR_WIN10)!=0 +-SQLITE3DLL = winsqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ELSE +-SQLITE3DLL = sqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ENDIF + !ENDIF + +@@ -309,9 +309,9 @@ SQLITE3DLL = sqlite3.dll + # + !IFNDEF SQLITE3LIB + !IF $(FOR_WIN10)!=0 +-SQLITE3LIB = winsqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ELSE +-SQLITE3LIB = sqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ENDIF + !ENDIF + +@@ -696,7 +696,7 @@ SHELL_CORE_SRC = $(SQLITE3C) + SHELL_CORE_DEP = $(SQLITE3DLL) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_DEP = libsqlite3.lib ++SHELL_CORE_DEP = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_DEP = +@@ -719,7 +719,7 @@ TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP) + SHELL_CORE_LIB = $(SQLITE3LIB) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_LIB = libsqlite3.lib ++SHELL_CORE_LIB = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_LIB = +@@ -754,8 +754,9 @@ RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP + # C compiler options for the Windows 10 platform (needs MSVC 2015). + # + !IF $(FOR_WIN10)!=0 +-TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +-BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++# /d2guard4 requires /guard:cf to be present as well, but it doesn't work with /Zi (Debug builds) ++TCC = $(TCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++BCC = $(BCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + !ENDIF + + # Also, we need to dynamically link to the correct MSVC runtime +@@ -1039,8 +1040,10 @@ TLIBS = + # default to file, 2 to default to memory, and 3 to force temporary + # tables to always be in memory. + # +-TCC = $(TCC) -DSQLITE_TEMP_STORE=1 +-RCC = $(RCC) -DSQLITE_TEMP_STORE=1 ++ ++# Allow overriding the value ++TCC = $(TCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) ++RCC = $(RCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) + + # Enable/disable loadable extensions, and other optional features + # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). +@@ -1206,14 +1209,15 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" + !ENDIF + LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +-LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL + !ENDIF + + # When compiling for UWP or the Windows 10 platform, some extra linker + # options are also required. + # + !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 +-LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL ++LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) mincore.lib + !IFDEF PSDKLIBPATH + LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" +@@ -1268,7 +1272,7 @@ LTLIBS = $(LTLIBS) $(LIBICU) + # + LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ + backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ +- callback.lo complete.lo ctime.lo \ ++ callback.lo complete.lo crypto.lo crypto_impl.lo crypto_openssl.lo ctime.lo \ + date.lo dbpage.lo dbstat.lo delete.lo \ + expr.lo fault.lo fkey.lo \ + fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ +@@ -1774,7 +1778,7 @@ ALL_TCL_TARGETS = + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-core: dll libsqlite3.lib shell ++core: dll sqlcipher.lib shell + + # Targets that require the Tcl library. + # +@@ -1793,11 +1797,12 @@ dll: $(SQLITE3DLL) + shell: $(SQLITE3EXE) + + # <> +-libsqlite3.lib: $(LIBOBJ) +- $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++# LTLIBPATHS is required to find the openssl/libressl libs ++sqlcipher.lib: $(LIBOBJ) ++ $(LTLIB) $(LTLIBPATHS) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) + +-libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib +- $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS) ++libtclsqlite3.lib: tclsqlite.lo sqlcipher.lib ++ $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo sqlcipher.lib $(LIBTCLSTUB) $(TLIBS) + + tclsqlite3.def: tclsqlite.lo + echo EXPORTS > tclsqlite3.def +@@ -1819,9 +1824,9 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) + + # <> +-sqlite3.def: libsqlite3.lib ++sqlite3.def: sqlcipher.lib + echo EXPORTS > sqlite3.def +- dumpbin /all libsqlite3.lib \ ++ dumpbin /all sqlcipher.lib \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ + | sort >> sqlite3.def + # <> +@@ -2008,6 +2013,15 @@ callback.lo: $(TOP)\src\callback.c $(HDR) + complete.lo: $(TOP)\src\complete.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c + ++crypto.lo: $(TOP)\src\crypto.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto.c ++ ++crypto_impl.lo: $(TOP)\src\crypto_impl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_impl.c ++ ++crypto_openssl.lo: $(TOP)\src\crypto_openssl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_openssl.c ++ + ctime.lo: $(TOP)\src\ctime.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c + +@@ -2427,7 +2441,7 @@ sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR) + # Rules to build the 'testfixture' application. + # + # If using the amalgamation, use sqlite3.c directly to build the test +-# fixture. Otherwise link against libsqlite3.lib. (This distinction is ++# fixture. Otherwise link against sqlcipher.lib. (This distinction is + # necessary because the test fixture requires non-API symbols which are + # hidden when the library is built via the amalgamation). + # diff --git a/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch b/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch new file mode 100644 index 0000000000000..92c3d8c91d58c --- /dev/null +++ b/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch @@ -0,0 +1,20 @@ +diff --git a/configure b/configure +index a2909ce..9c25987 100755 +--- a/configure ++++ b/configure +@@ -12732,7 +12732,6 @@ then : + printf %s "(cached) " >&6 + else $as_nop + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -12764,7 +12763,6 @@ if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes + then : + printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h + +- LIBS="-lcrypto $LIBS" + + else $as_nop + as_fn_error $? "Library crypto not found. Install openssl!\"" "$LINENO" 5 diff --git a/recipes/sqlcipher/all/test_package/conanfile.py b/recipes/sqlcipher/all/test_package/conanfile.py index a2566c4cce099..f42142315949c 100644 --- a/recipes/sqlcipher/all/test_package/conanfile.py +++ b/recipes/sqlcipher/all/test_package/conanfile.py @@ -13,15 +13,6 @@ class TestPackageConan(ConanFile): def requirements(self): self.requires(self.tested_reference_str) - def build_requirements(self): - if is_apple_os(self) and self.settings.arch == "armv8": - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.tool_requires("cmake/[>=3.22]") - def layout(self): cmake_layout(self) diff --git a/recipes/sqlcipher/all/test_v1_package/conanfile.py b/recipes/sqlcipher/all/test_v1_package/conanfile.py index 84b7364551610..7bb57d9f4dc6a 100644 --- a/recipes/sqlcipher/all/test_v1_package/conanfile.py +++ b/recipes/sqlcipher/all/test_v1_package/conanfile.py @@ -7,15 +7,6 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" - def build_requirements(self): - if is_apple_os(self) and self.settings.arch == "armv8": - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.build_requires("cmake/3.22.0") - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/sqlcipher/config.yml b/recipes/sqlcipher/config.yml index 939fca7342f84..e679e5bd0c0e9 100644 --- a/recipes/sqlcipher/config.yml +++ b/recipes/sqlcipher/config.yml @@ -1,4 +1,6 @@ versions: + "4.5.6": + folder: all "4.5.1": folder: all "4.5.0": From aeb46ba84eb9a31e36c57fbdec4f9587f076ae9b Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 15 Feb 2024 02:49:57 +0900 Subject: [PATCH 062/108] (#22731) jasper: add version 4.2.0, update dependencies --- recipes/jasper/all/conandata.yml | 7 +++++++ recipes/jasper/all/conanfile.py | 12 ++++++------ .../patches/4.2.0-0003-deterministic-libname.patch | 13 +++++++++++++ recipes/jasper/config.yml | 2 ++ 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch diff --git a/recipes/jasper/all/conandata.yml b/recipes/jasper/all/conandata.yml index 0873904e06da9..0996a2f915ff8 100644 --- a/recipes/jasper/all/conandata.yml +++ b/recipes/jasper/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.2.0": + url: "https://github.com/jasper-software/jasper/releases/download/version-4.2.0/jasper-4.2.0.tar.gz" + sha256: "69f0b08a0cc281a06eaf7feed510736854bbff9af89ab1d01b77382ad57ec957" "4.1.2": url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.2/jasper-4.1.2.tar.gz" sha256: "22392e439b87c79aaf8689ec79a286a7147e811c4bee34edf3d0b239798d672b" @@ -18,6 +21,10 @@ sources: url: "https://github.com/jasper-software/jasper/releases/download/version-2.0.33/jasper-2.0.33.tar.gz" sha256: "28d28290cc2eaf70c8756d391ed8bcc8ab809a895b9a67ea6e89da23a611801a" patches: + "4.2.0": + - patch_file: "patches/4.2.0-0003-deterministic-libname.patch" + patch_description: "No generator dependent libname" + patch_type: "conan" "4.1.2": - patch_file: "patches/4.1.1-0001-skip-rpath.patch" patch_description: "Do not enforce rpath configuration" diff --git a/recipes/jasper/all/conanfile.py b/recipes/jasper/all/conanfile.py index 758b12ef086f4..29bbcb6c115d7 100644 --- a/recipes/jasper/all/conanfile.py +++ b/recipes/jasper/all/conanfile.py @@ -12,11 +12,11 @@ class JasperConan(ConanFile): name = "jasper" + description = "JasPer Image Processing/Coding Tool Kit" license = "JasPer-2.0" - homepage = "https://jasper-software.github.io/jasper" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://jasper-software.github.io/jasper" topics = ("toolkit", "coding", "jpeg", "images") - description = "JasPer Image Processing/Coding Tool Kit" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -50,9 +50,9 @@ def requirements(self): if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.0") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.1") + self.requires("mozjpeg/4.1.5") def build_requirements(self): if Version(self.version) >= "4.1.1": @@ -77,11 +77,11 @@ def generate(self): if Version(self.version) >= "3.0.0": tc.variables["JAS_ENABLE_LIBHEIF"] = False tc.variables["JAS_ENABLE_OPENGL"] = False - if cross_building(self): tc.cache_variables["JAS_CROSSCOMPILING"] = True tc.cache_variables["JAS_STDC_VERSION"] = "199901L" - + if Version(self.version) >= "4.2.0": + tc.variables["JAS_PACKAGING"] = True tc.generate() cmakedeps = CMakeDeps(self) diff --git a/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch b/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch new file mode 100644 index 0000000000000..ed1edf420e3b3 --- /dev/null +++ b/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6925e4..8392edf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,7 +274,7 @@ message("JAS_MULTICONFIGURATION_GENERATOR ${JAS_MULTICONFIGURATION_GENERATOR}") + # If a multiconfiguration generator is used, ensure that various output + # files are not placed in subdirectories (such as Debug and Release) + # as this will cause the CTest test suite to fail. +-if(JAS_MULTICONFIGURATION_GENERATOR) ++if(0) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY .) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY .) diff --git a/recipes/jasper/config.yml b/recipes/jasper/config.yml index d3b9298f87c1c..2539649ff499b 100644 --- a/recipes/jasper/config.yml +++ b/recipes/jasper/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.0": + folder: all "4.1.2": folder: all "4.1.1": From 3136377b8cd5ede828526dd7df84746c8100415c Mon Sep 17 00:00:00 2001 From: David Aceituno Date: Wed, 14 Feb 2024 19:29:06 +0100 Subject: [PATCH 063/108] (#22767) Update to h5pp/1.11.2 --- recipes/h5pp/all/conandata.yml | 3 +++ recipes/h5pp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/h5pp/all/conandata.yml b/recipes/h5pp/all/conandata.yml index bf1850769d043..8a624a3c51a3b 100644 --- a/recipes/h5pp/all/conandata.yml +++ b/recipes/h5pp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.11.2": + url: "https://github.com/DavidAce/h5pp/archive/v1.11.2.tar.gz" + sha256: "5638bf699a92049910c80a7af3d6c8495f02253dd32ee0000bc35a29a9e61e9c" "1.11.1": url: "https://github.com/DavidAce/h5pp/archive/v1.11.1.tar.gz" sha256: "659d566dcb011e7a0f14f9fec9d6e6c783559eec3fd051de1e5cf44d95fd752b" diff --git a/recipes/h5pp/config.yml b/recipes/h5pp/config.yml index 6306850e1fb06..a489a477b18f9 100644 --- a/recipes/h5pp/config.yml +++ b/recipes/h5pp/config.yml @@ -17,3 +17,5 @@ versions: folder: "all" "1.11.1": folder: "all" + "1.11.2": + folder: "all" From e49bd288886175aa11ee8eb2799df544f3bb402d Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Wed, 14 Feb 2024 23:47:55 -0500 Subject: [PATCH 064/108] (#22727) fontconfig: update expat * fontconfig: update expat * Revert expat on fontconfig<2.13.93 * Only revert expat on Mac * alphabetize * Simplify test package for <2.13.93 * Bump expat again * Re-add return value Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/fontconfig/all/conanfile.py | 2 +- .../all/test_package/test_package.c | 22 ++----------------- recipes/fontconfig/meson/conanfile.py | 2 +- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/recipes/fontconfig/all/conanfile.py b/recipes/fontconfig/all/conanfile.py index ddc997bea245a..543e746cf6bf8 100644 --- a/recipes/fontconfig/all/conanfile.py +++ b/recipes/fontconfig/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): def requirements(self): self.requires("freetype/2.13.2") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") if self.settings.os == "Linux": self.requires("util-linux-libuuid/2.39.2") diff --git a/recipes/fontconfig/all/test_package/test_package.c b/recipes/fontconfig/all/test_package/test_package.c index 7703ab64bbdec..3d2556b9cca2e 100644 --- a/recipes/fontconfig/all/test_package/test_package.c +++ b/recipes/fontconfig/all/test_package/test_package.c @@ -1,24 +1,6 @@ #include -#include -#include int main() { - FcConfig* config = FcInitLoadConfigAndFonts(); - FcPattern* pat = FcNameParse((const FcChar8*)"Arial"); - FcConfigSubstitute(config, pat, FcMatchPattern); - FcDefaultSubstitute(pat); - char* fontFile; - FcResult result; - FcPattern* font = FcFontMatch(config, pat, &result); - if (font) { - FcChar8* file = NULL; - if (FcPatternGetString(font, FC_FILE, 0, &file) == FcResultMatch) { - fontFile = (char*)file; - printf("%s\n",fontFile); - } - } else { - printf("Ops! I can't find any font!\n"); - } - FcPatternDestroy(pat); - return EXIT_SUCCESS; + FcInit(); + return 0; } diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/meson/conanfile.py index 550cc9984a1bb..95e3579f0f549 100644 --- a/recipes/fontconfig/meson/conanfile.py +++ b/recipes/fontconfig/meson/conanfile.py @@ -50,7 +50,7 @@ def layout(self): def requirements(self): self.requires("freetype/2.13.2") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") if self.settings.os == "Linux": self.requires("util-linux-libuuid/2.39.2") From 20afa4f7c2e81bd5a1ea4474ddedec70053168d1 Mon Sep 17 00:00:00 2001 From: sean <43609023+spnda@users.noreply.github.com> Date: Thu, 15 Feb 2024 06:27:46 +0100 Subject: [PATCH 065/108] (#22738) [fastgltf] Update to 0.7.0 * [fastgltf] Update to 0.7.0 * use cppstd to configure c++20 Signed-off-by: Uilian Ries * configure only since 0.7.0 Signed-off-by: Uilian Ries * Get compiler.cppstd --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/fastgltf/all/conandata.yml | 3 +++ recipes/fastgltf/all/conanfile.py | 9 +++++++-- recipes/fastgltf/all/test_package/CMakeLists.txt | 4 +++- recipes/fastgltf/all/test_package/test_package.cpp | 4 +++- recipes/fastgltf/config.yml | 2 ++ 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/recipes/fastgltf/all/conandata.yml b/recipes/fastgltf/all/conandata.yml index 7785359a1abd0..42f9e0fde5669 100644 --- a/recipes/fastgltf/all/conandata.yml +++ b/recipes/fastgltf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/spnda/fastgltf/archive/refs/tags/v0.7.0.tar.gz" + sha256: "1d0af69db938fd81dd34ea51f99e37f0023852c93befe63e23f9e55abd4a18ec" "0.6.1": url: "https://github.com/spnda/fastgltf/archive/refs/tags/v0.6.1.tar.gz" sha256: "5f10b153ec941f5e6465425f542d3864f586aca040b0b659cb9ae70d42369390" diff --git a/recipes/fastgltf/all/conanfile.py b/recipes/fastgltf/all/conanfile.py index 9eda29e2b49eb..507a972f624fe 100644 --- a/recipes/fastgltf/all/conanfile.py +++ b/recipes/fastgltf/all/conanfile.py @@ -83,13 +83,16 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["FASTGLTF_DOWNLOAD_SIMDJSON"] = False + if Version(self.version) <= "0.7.0": + tc.variables["FASTGLTF_DOWNLOAD_SIMDJSON"] = False if self.options.enable_small_vector: - tc.variables["FASTGLTF_USE_SMALL_VECTOR"] = True + tc.variables["FASTGLTF_USE_CUSTOM_SMALLVECTOR"] = True if self.options.get_safe("disable_custom_memory_pool"): tc.variables["FASTGLTF_DISABLE_CUSTOM_MEMORY_POOL"] = True if self.options.get_safe("use_64bit_float"): tc.variables["FASTGLTF_USE_64BIT_FLOAT"] = True + if Version(self.version) >= "0.7.0": + tc.variables["FASTGLTF_COMPILE_AS_CPP20"] = "20" in str(self.settings.get_safe("compiler.cppstd")) tc.generate() deps = CMakeDeps(self) deps.generate() @@ -108,3 +111,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["fastgltf"] + if "20" in str(self.settings.get_safe("compiler.cppstd")): + self.cpp_info.defines.append("FASTGLTF_CPP_20") diff --git a/recipes/fastgltf/all/test_package/CMakeLists.txt b/recipes/fastgltf/all/test_package/CMakeLists.txt index 7718a933cdc53..b4c6d8669be8e 100644 --- a/recipes/fastgltf/all/test_package/CMakeLists.txt +++ b/recipes/fastgltf/all/test_package/CMakeLists.txt @@ -6,6 +6,8 @@ find_package(fastgltf REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE fastgltf::fastgltf) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -if(fastgltf_VERSION VERSION_GREATER_EQUAL "0.5.0") +if(fastgltf_VERSION VERSION_GREATER_EQUAL "0.7.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE FASTGLTF_0_7_0_LATER) +elseif(fastgltf_VERSION VERSION_GREATER_EQUAL "0.5.0") target_compile_definitions(${PROJECT_NAME} PRIVATE FASTGLTF_0_5_0_LATER) endif() diff --git a/recipes/fastgltf/all/test_package/test_package.cpp b/recipes/fastgltf/all/test_package/test_package.cpp index 1e9f5938b4446..b076f02e4cb70 100644 --- a/recipes/fastgltf/all/test_package/test_package.cpp +++ b/recipes/fastgltf/all/test_package/test_package.cpp @@ -1,5 +1,7 @@ #include -#ifdef FASTGLTF_0_5_0_LATER +#if defined(FASTGLTF_0_7_0_LATER) +# include +#elif defined(FASTGLTF_0_5_0_LATER) # include #else # include diff --git a/recipes/fastgltf/config.yml b/recipes/fastgltf/config.yml index 355c180a5e90b..2ea713dd46d98 100644 --- a/recipes/fastgltf/config.yml +++ b/recipes/fastgltf/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.1": folder: all "0.5.0": From e84eaeaf6bbe0d843dd144c7a0ee78c34b6794bf Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 01:08:48 +0900 Subject: [PATCH 066/108] (#22773) scnlib: add version 2.0.1 --- recipes/scnlib/all/conandata.yml | 7 +++++++ recipes/scnlib/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/scnlib/all/conandata.yml b/recipes/scnlib/all/conandata.yml index 28c026a4701a3..959e4c6aa3f22 100644 --- a/recipes/scnlib/all/conandata.yml +++ b/recipes/scnlib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.1": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.1.tar.gz" + sha256: "f399d1b1f36f5d53a2d63fd2974797ab8f3f7e69c424d9661253830cb793b72e" "2.0.0": url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.0.tar.gz" sha256: "2a35356a3a7485fdf97f28cfbea52db077cf4e7bab0a5a0fc3b04e89630334cd" @@ -12,6 +15,10 @@ sources: url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.0.tar.gz" sha256: "5b8333e522206c2a74e57a9c9544c4fe4e7858cfe93e216905b463eaf91af5fe" patches: + "2.0.1": + - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" + patch_description: "remove re2 version on find_package" + patch_type: "portability" "2.0.0": - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" patch_description: "remove re2 version on find_package" diff --git a/recipes/scnlib/config.yml b/recipes/scnlib/config.yml index 8d8acc5534543..8c5c4f8a7d9ec 100644 --- a/recipes/scnlib/config.yml +++ b/recipes/scnlib/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.1": + folder: all "2.0.0": folder: all "1.1.3": From 2f62321e5f969fc78ae8f8849d49e3deb03f8aea Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 01:33:19 +0900 Subject: [PATCH 067/108] (#22774) cxxopts: add version 3.2.0 --- recipes/cxxopts/all/conandata.yml | 3 +++ recipes/cxxopts/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cxxopts/all/conandata.yml b/recipes/cxxopts/all/conandata.yml index ed4fef59dd9bc..607b321614b3b 100644 --- a/recipes/cxxopts/all/conandata.yml +++ b/recipes/cxxopts/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.0": + url: "https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.2.0.tar.gz" + sha256: "9f43fa972532e5df6c5fd5ad0f5bac606cdec541ccaf1732463d8070bbb7f03b" "3.1.1": url: "https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.1.1.tar.gz" sha256: "523175f792eb0ff04f9e653c90746c12655f10cb70f1d5e6d6d9491420298a08" diff --git a/recipes/cxxopts/config.yml b/recipes/cxxopts/config.yml index 60f4de8e82260..eeafb07402ec8 100644 --- a/recipes/cxxopts/config.yml +++ b/recipes/cxxopts/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.0": + folder: all "3.1.1": folder: all "3.0.0": From 70e656dafa69928ec981b26989a596e793193a31 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 03:10:10 +0900 Subject: [PATCH 068/108] (#22779) imgui: add version 1.90.3 --- recipes/imgui/all/conandata.yml | 6 ++++++ recipes/imgui/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 326ffeb754602..467e04fdf9e0f 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.90.3": + url: "https://github.com/ocornut/imgui/archive/v1.90.3.tar.gz" + sha256: "40b302d01092c9393373b372fe07ea33ac69e9491893ebab3bf952b2c1f5fd23" + "1.90.3-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.3-docking.tar.gz" + sha256: "ebd1da0f76a95a7a690f8a0dfa119e1c6da4eee40383e582fb75374792be0891" "1.90.2": url: "https://github.com/ocornut/imgui/archive/v1.90.2.tar.gz" sha256: "452d1c11e5c4b4dfcca272915644a65f1c076498e8318b141ca75cd30470dd68" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index 86b810236bae7..40705063b856e 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,8 @@ versions: + "1.90.3": + folder: all + "1.90.3-docking": + folder: all "1.90.2": folder: all "1.90.2-docking": From 77e11053c4f860b1c718ddcfaac5d7e35eeb2509 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 17:10:02 +0900 Subject: [PATCH 069/108] (#22780) objectbox: add version 0.21.0 --- recipes/objectbox/all/conandata.yml | 17 ++++-- ...make.patch => 0.17.0-0001-fix-cmake.patch} | 0 .../all/patches/0.21.0-0001-fix-cmake.patch | 54 +++++++++++++++++++ recipes/objectbox/config.yml | 2 + 4 files changed, 68 insertions(+), 5 deletions(-) rename recipes/objectbox/all/patches/{0001-fix-cmake.patch => 0.17.0-0001-fix-cmake.patch} (100%) create mode 100644 recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch diff --git a/recipes/objectbox/all/conandata.yml b/recipes/objectbox/all/conandata.yml index b4ebf9918d7ba..ca8ae614b9798 100644 --- a/recipes/objectbox/all/conandata.yml +++ b/recipes/objectbox/all/conandata.yml @@ -1,6 +1,9 @@ sources: # The release tarball is invalid, so we need to get the tarball from the v0.20.0 commit. # https://github.com/objectbox/objectbox-c/issues/38 + "0.21.0": + url: "https://github.com/objectbox/objectbox-c/archive/720559838e78a9fe6252c93ed1a3d46a1025767f.tar.gz" + sha256: "a2e7aa1d455a9703c49661515e820b4b296b6f53da7ab6b467b78776a29b0b93" "0.20.0": url: "https://github.com/objectbox/objectbox-c/archive/7e4a5a3ed94aa486acf0737b354726b493fd204c.tar.gz" sha256: "cb6ec8b7ceaed7963ad582c4519d06ddc887294f0893b3f9bf89e7d0789ce216" @@ -17,23 +20,27 @@ sources: url: "https://github.com/objectbox/objectbox-c/archive/refs/tags/v0.17.0.tar.gz" sha256: "3b936b3352ae0c8ea3706cc0a1790d2714a415cdce16007c2caca367ead5af8d" patches: + "0.21.0": + - patch_file: "patches/0.21.0-0001-fix-cmake.patch" + patch_description: "add sync option, disable tests/examples, support max length of windows path" + patch_type: "conan" "0.20.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.19.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.18.1": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.18.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.17.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" diff --git a/recipes/objectbox/all/patches/0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch similarity index 100% rename from recipes/objectbox/all/patches/0001-fix-cmake.patch rename to recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch diff --git a/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..c5c0e8e9c4a85 --- /dev/null +++ b/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e826e0..d6a2e18 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,8 +20,13 @@ else () + function(defineObjectBoxLibForURL VARIANT DL_URL) + include(FetchContent) + project(objectbox${VARIANT}-download) +- FetchContent_Declare(${PROJECT_NAME} URL ${DL_URL}) +- ++ FetchContent_Declare(${PROJECT_NAME} ++ URL ${DL_URL} ++ # workaround for max path length in Windows (260byte) ++ SUBBUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sub ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tmp ++ ) ++ + FetchContent_Populate(${PROJECT_NAME}) + set(DL_DIR "${${PROJECT_NAME}_SOURCE_DIR}") + message(STATUS "Pre-compiled ObjectBox library is saved in ${DL_DIR}") +@@ -35,6 +40,22 @@ else () + IMPORTED_IMPLIB ${DL_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} + INTERFACE_INCLUDE_DIRECTORIES "${objectbox_include_dirs}" + ) ++ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}") ++ install( ++ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX} ++ DESTINATION $,${CMAKE_INSTALL_BINDIR},${CMAKE_INSTALL_LIBDIR}> ++ ) ++ endif() ++ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX}") ++ install( ++ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ endif() ++ install( ++ DIRECTORY ${DL_DIR}/include/ ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++ ) + endfunction() + + function(defineObjectBoxLib VARIANT) +@@ -80,7 +101,9 @@ else () + defineObjectBoxLibForURL("" "${DL_URL}") + else () + defineObjectBoxLib("") +- defineObjectBoxLib("-sync") ++ if(OBJECTBOX_WITH_SYNC) ++ defineObjectBoxLib("-sync") ++ endif() + endif () + endif () + diff --git a/recipes/objectbox/config.yml b/recipes/objectbox/config.yml index 2fdec99a504b8..455f77377fdff 100644 --- a/recipes/objectbox/config.yml +++ b/recipes/objectbox/config.yml @@ -1,4 +1,6 @@ versions: + "0.21.0": + folder: all "0.20.0": folder: all "0.19.0": From 8f62df835a07d1a4309b37922f5134b445f92994 Mon Sep 17 00:00:00 2001 From: Philippe Lieser Date: Fri, 16 Feb 2024 10:23:12 +0100 Subject: [PATCH 070/108] (#18079) Adding Botan 3.0.0 recipe and make it compatible with Conan 2.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adding Botan 3.0.0 recipe * updated to conan 2 * ci lint fix * ci lint fix * ci lint fix * replacing version check * some more fixes to be ready for 2.0 * fixes * Keep old test package for Conan 1.x * Order imports * Remove unused import * Fix packaging * Fix msvc build and test * Use Version helper in package_info * Small fixes * Don't add -fPIC for msvc * Fix msvc package info for Botan 3.0.0 * Add missing patch_description and patch_type * Revert back to "sources" name for src folder * Try fixing KB-H010 for Conan 1 * Remove base_path for patches and switch again to `src` for src folder * Don't import from conan.tools.microsoft.subsystems * Fix KB-H010 by using double quotes https://github.com/conan-io/hooks/issues/448 * Disable getentropy * Move layout method * Add check for minimal compiler version * Fix getting env variables * Remove some older Botan versions * Fix removal of old versions * Replace apple_deployment_target_flag with apple_min_version_flag * Disable getrandom * Set 11.2 as minimal GCC * Set C++ standard in test package according to Botan version * Add min version for apple-clang * Remove redundant cpp_info.names["pkg_config"] * Use leading _ for member variable extra_cxxflags * Readd comment * Further improvements * Support for the OpenSSL provider was removed in Botan 2.19.2 * Add support for tools.build:sysroot * add a patch to support getrandome() in glibc < 2.25 * add Botan 3.1.0 and 3.1.1 * add Botan 3.2.0 * Botan 2.x is not compatible with OpenSSL 3.x * pin to specific OpenSSL version (1.1.1s) * FIX: warnings KB-H043 and KB-H077 * don't explicitly disable getrandom/getentropy on Linux * Apply suggestions from code review Co-authored-by: Uilian Ries * add patch sources to patches * Apply suggestions from code review Co-authored-by: Uilian Ries * FIX: linter warnings * FIX: default of CXXFLAGS * update recipe's meta data * use self.dependencies['boost'].options * add -o disable_modules * Workaround to support glibc < 2.25 This can (and should) be removed once CCI's CI images are updated with a newer glibc. * Apply suggestions from code review Co-authored-by: Uilian Ries --------- Co-authored-by: Maaown (Leonard Viktor Pooch) Co-authored-by: memsharded Co-authored-by: Rubén Rincón Co-authored-by: Rene Meusel Co-authored-by: René Meusel Co-authored-by: Uilian Ries --- recipes/botan/all/conandata.yml | 69 +++-- recipes/botan/all/conanfile.py | 236 ++++++++++++------ ...kport-getrandom-via-syscall-to-3.0.0.patch | 24 ++ ...kport-getrandom-via-syscall-to-3.1.0.patch | 24 ++ recipes/botan/all/patches/dll-dir.patch | 13 - .../fix-unrecognized-linker-flag.patch | 17 -- .../all/patches/vs2015-install-fix.patch | 56 ----- recipes/botan/all/test_package/CMakeLists.txt | 12 +- recipes/botan/all/test_package/conanfile.py | 25 +- .../botan/all/test_v1_package/CMakeLists.txt | 15 ++ .../botan/all/test_v1_package/conanfile.py | 17 ++ .../all/test_v1_package/test_package.cpp | 7 + recipes/botan/config.yml | 28 +-- 13 files changed, 315 insertions(+), 228 deletions(-) create mode 100644 recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch create mode 100644 recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch delete mode 100644 recipes/botan/all/patches/dll-dir.patch delete mode 100644 recipes/botan/all/patches/fix-unrecognized-linker-flag.patch delete mode 100644 recipes/botan/all/patches/vs2015-install-fix.patch create mode 100644 recipes/botan/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/botan/all/test_v1_package/conanfile.py create mode 100644 recipes/botan/all/test_v1_package/test_package.cpp diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index b4fd5502f1bd3..8bc337e6d41ee 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -1,37 +1,7 @@ sources: - "2.12.1": - url: "https://github.com/randombit/botan/archive/2.12.1.tar.gz" - sha256: "61d27332f053b0b1169659dc0fceb7de7d16cade230df3a14dfaa2c091888b98" - "2.13.0": - url: "https://github.com/randombit/botan/archive/2.13.0.tar.gz" - sha256: "29a57d8efd6ab297eab67cbf489a5a423b06e120e0520aff2583074e8aea151c" - "2.14.0": - url: "https://github.com/randombit/botan/archive/2.14.0.tar.gz" - sha256: "38e34b8ef7652e811382744425b82da1b1a7fb5f14cc281a7d3a18543eaf72f7" - "2.15.0": - url: "https://github.com/randombit/botan/archive/2.15.0.tar.gz" - sha256: "9a86b1a8adbac37fdff9cf5745b3a313020c33579d8fc51cb996c47d3adf5585" - "2.16.0": - url: "https://github.com/randombit/botan/archive/2.16.0.tar.gz" - sha256: "8f448b97120e884d755b946045753876d688b01f48f5e6a1cf37aebd5afecbe5" - "2.17.0": - url: "https://github.com/randombit/botan/archive/2.17.0.tar.gz" - sha256: "32874e4e14bf11428e1bc4919e5ee174a68e2f480d37bc79ed015b2b5ef87fef" - "2.17.1": - url: "https://github.com/randombit/botan/archive/2.17.1.tar.gz" - sha256: "ca562c00e61663c418bd9fdc6c70bdeaedafba8bef328cb6046a1d6390d39a71" - "2.17.2": - url: "https://github.com/randombit/botan/archive/2.17.2.tar.gz" - sha256: "3d99da64573abab6d6e8036a45f8c567a57721c8f23850e05aadd84fc2e0075c" "2.17.3": url: "https://github.com/randombit/botan/archive/2.17.3.tar.gz" sha256: "544c62e43be0c60fff7ac8707ee99fe134c75bef06bded217d04f0a4b333519a" - "2.18.0": - url: "https://github.com/randombit/botan/archive/2.18.0.tar.gz" - sha256: "8556991402f9ecf5f84f1f2c4de20ca3fd14a5ebd775f065ea6676b36646a77d" - "2.18.1": - url: "https://github.com/randombit/botan/archive/2.18.1.tar.gz" - sha256: "4afebf2dbfa2f047d161437dcc544003d5822f47ceac97ada6a24948297bd3ed" "2.18.2": url: "https://github.com/randombit/botan/archive/2.18.2.tar.gz" sha256: "10ded69c4fd4ade9d87527b394787beefa190b4ecb65ed04535bdd00e088cd96" @@ -44,15 +14,36 @@ sources: "2.19.3": url: "https://github.com/randombit/botan/archive/2.19.3.tar.gz" sha256: "8f568bf74c2e476d92ac8a1cfc2ba8407ec038fe9458bd0a11e7da827a9b8199" + "3.0.0": + url: "https://github.com/randombit/botan/archive/3.0.0.tar.gz" + sha256: "8bafe2e965fa9ccf92ef5741165d735c9fbbe6376c373bbf5702495ad2dfb814" + "3.1.0": + url: "https://github.com/randombit/botan/archive/3.1.0.tar.gz" + sha256: "f3680ab11122e581ac08993f149bf519030c7be13b32f5ac1e6bef0a2e6bb88e" + "3.1.1": + url: "https://github.com/randombit/botan/archive/3.1.1.tar.gz" + sha256: "2d0af0c3a7140572f3f7f1a22865f9c5eadc102a7fa58f03314709b0bee26c11" + "3.2.0": + url: "https://github.com/randombit/botan/archive/3.2.0.tar.gz" + sha256: "95af4935d56973000bb6ff20bb54ae56083f8764d5a2c89826cac26ac6127330" patches: - "2.12.1": - - patch_file: "patches/dll-dir.patch" - base_path: "sources" - - patch_file: "patches/fix-unrecognized-linker-flag.patch" - base_path: "sources" - "2.17.2": - - patch_file: "patches/vs2015-install-fix.patch" - base_path: "sources" "2.18.2": - patch_file: "patches/fix-amalgamation-build.patch" - base_path: "sources" + patch_description: "Backport a fix for amalgamation build" + patch_type: "bugfix" + patch_source: "https://github.com/randombit/botan/pull/2835" + "3.0.0": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.0.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" + "3.1.0": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.1.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" + "3.1.1": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.1.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" diff --git a/recipes/botan/all/conanfile.py b/recipes/botan/all/conanfile.py index e8599f32dde75..ce2b978ddda1d 100644 --- a/recipes/botan/all/conanfile.py +++ b/recipes/botan/all/conanfile.py @@ -1,9 +1,21 @@ -from conan.tools.microsoft import is_msvc, msvc_runtime_flag -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +import shutil +import platform -required_conan_version = ">=1.45.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name, XCRun +from conan.tools.build import build_jobs, check_min_cppstd +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get +from conan.tools.gnu import AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, VCVars, check_min_vs +from conan.tools.microsoft import unix_path +from conan.tools.scm import Version + + +required_conan_version = ">=1.55" class BotanConan(ConanFile): @@ -11,9 +23,10 @@ class BotanConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/randombit/botan" license = "BSD-2-Clause" - description = "Botan is a cryptography library written in C++11." - topics = ("cryptography", "crypto", "C++11", "tls") + description = "Botan is a cryptography library written in modern C++." + topics = ("cryptography", "crypto", "c++11", "c++20", "tls") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -39,8 +52,9 @@ class BotanConan(ConanFile): "with_neon": [True, False], "with_armv8crypto": [True, False], "with_powercrypto": [True, False], - "enable_modules": "ANY", - "system_cert_bundle": "ANY", + "enable_modules": [None, "ANY"], + "disable_modules": [None, "ANY"], + "system_cert_bundle": [None, "ANY"], "module_policy": [None, "bsi", "modern", "nist"], } default_options = { @@ -68,10 +82,13 @@ class BotanConan(ConanFile): "with_armv8crypto": True, "with_powercrypto": True, "enable_modules": None, + "disable_modules": None, "system_cert_bundle": None, "module_policy": None, } + _extra_cxxflags = None + @property def _is_x86(self): return str(self.settings.arch) in ['x86', 'x86_64'] @@ -84,14 +101,8 @@ def _is_ppc(self): def _is_arm(self): return 'arm' in str(self.settings.arch) - @property - def _source_subfolder(self): - # Required to build at least 2.12.1 - return "sources" - def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == 'Windows': @@ -117,84 +128,149 @@ def config_options(self): # --single-amalgamation option is no longer available # See also https://github.com/randombit/botan/pull/2246 - if tools.Version(self.version) >= '2.14.0': + if Version(self.version) >= '2.14.0': del self.options.single_amalgamation + # Support for the OpenSSL provider was removed in 2.19.2 + if Version(self.version) >= '2.19.2': + del self.options.with_openssl + def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") def requirements(self): if self.options.with_bzip2: self.requires("bzip2/1.0.8") - if self.options.with_openssl: - self.requires("openssl/1.1.1o") + if self.options.get_safe('with_openssl', False): + self.requires("openssl/[>=1.1 <3]") if self.options.with_zlib: - self.requires("zlib/1.2.12") + self.requires("zlib/[>=1.2.11 <2]") if self.options.with_sqlite3: self.requires("sqlite3/3.38.5") if self.options.with_boost: - self.requires("boost/1.79.0") + self.requires("boost/1.83.0") @property def _required_boost_components(self): return ['coroutine', 'system'] + @property + def _min_cppstd(self): + # From the same links as below + return 11 if Version(self.version) < "3.0.0" else 20 + + @property + def _compilers_minimum_version(self): + if Version(self.version).major < 3: + # From https://github.com/randombit/botan/blob/2.19.3/doc/support.rst + return { + "gcc": "4.8", + "clang": "3.5", + "Visual Studio": "14", + "msvc": "190", + } + else: + # From https://github.com/randombit/botan/blob/master/doc/support.rst + return { + "gcc": "11.2", + "clang": "14", + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + def validate(self): if self.options.with_boost: - miss_boost_required_comp = any(getattr(self.options['boost'], 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options['boost'].header_only or self.options['boost'].shared or self.options['boost'].magic_autolink or miss_boost_required_comp: - raise ConanInvalidConfiguration('{0} requires non-header-only static boost, without magic_autolink, and with these components: {1}'.format(self.name, ', '.join(self._required_boost_components))) + boost_opts = self.dependencies['boost'].options + miss_boost_required_comp = any(getattr(boost_opts, 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components) + if boost_opts.header_only or boost_opts.shared or boost_opts.magic_autolink or miss_boost_required_comp: + raise ConanInvalidConfiguration( + f"{self.name} requires non-header-only static boost, " + f"without magic_autolink, and with these components: {', '.join(self._required_boost_components)}") + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) compiler = self.settings.compiler - version = tools.Version(self.settings.compiler.version) + compiler_name = str(compiler) + compiler_version = Version(compiler.version) - if compiler == 'Visual Studio' and version < '14': - raise ConanInvalidConfiguration("Botan doesn't support MSVC < 14") + check_min_vs(self, self._compilers_minimum_version["msvc"]) + if not is_msvc(self): + minimum_version = self._compilers_minimum_version.get(compiler_name, False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + if not minimum_version: + self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") - elif compiler == 'gcc' and version >= '5' and compiler.libcxx != 'libstdc++11': + if self.settings.compiler == 'gcc' and compiler_version >= "5" and self.settings.compiler.libcxx != 'libstdc++11': raise ConanInvalidConfiguration( 'Using Botan with GCC >= 5 on Linux requires "compiler.libcxx=libstdc++11"') - elif compiler == 'clang' and compiler.libcxx not in ['libstdc++11', 'libc++']: + if self.settings.compiler == 'clang' and self.settings.compiler.libcxx not in ['libstdc++11', 'libc++']: raise ConanInvalidConfiguration( 'Using Botan with Clang on Linux requires either "compiler.libcxx=libstdc++11" ' \ 'or "compiler.libcxx=libc++"') # Some older compilers cannot handle the amalgamated build anymore # See also https://github.com/randombit/botan/issues/2328 - if tools.Version(self.version) >= '2.14.0' and self.options.amalgamation: - if (compiler == 'apple-clang' and version < '10') or \ - (compiler == 'gcc' and version < '8') or \ - (compiler == 'clang' and version < '7'): + if Version(self.version) >= '2.14.0' and self.options.amalgamation: + if (self.settings.compiler == 'apple-clang' and compiler_version < '10') or \ + (self.settings.compiler == 'gcc' and compiler_version < '8') or \ + (self.settings.compiler == 'clang' and compiler_version < '7'): raise ConanInvalidConfiguration( - 'botan amalgamation is not supported for {}/{}'.format(compiler, version)) + f"botan amalgamation is not supported for {compiler}/{compiler_version}") if self.options.get_safe("single_amalgamation", False) and not self.options.amalgamation: raise ConanInvalidConfiguration("botan:single_amalgamation=True requires botan:amalgamation=True") + def layout(self): + basic_layout(self, src_folder="src") + def source(self): - tools.get(**self.conan_data['sources'][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _cxxflags(self): + global_cxxflags = " ".join(self.conf.get("tools.build:cxxflags", default=[], check_type=list)) + env_cxxflags = VirtualBuildEnv(self).vars().get("CXXFLAGS", default="") + cxxflags = f"{env_cxxflags} {global_cxxflags}".strip() + return cxxflags if len(cxxflags) > 1 else None + + def generate(self): + if is_msvc(self): + ms = VCVars(self) + ms.generate() + + # This is to work around botan's configure script that *replaces* its + # standard (platform dependent) flags in presence of an environment + # variable ${CXXFLAGS}. Most notably, this would build botan with + # disabled compiler optimizations. + self._extra_cxxflags = self._cxxflags + self.buildenv.unset('CXXFLAGS') + VirtualBuildEnv(self).generate() def build(self): - for patch in self.conan_data.get('patches', {}).get(self.version, []): - tools.patch(**patch) - with tools.chdir(self._source_subfolder): + apply_conandata_patches(self) + with chdir(self, self.source_folder): self.run(self._configure_cmd) self.run(self._make_cmd) def package(self): - self.copy(pattern='license.txt', dst='licenses', src=self._source_subfolder) - with tools.chdir(self._source_subfolder): + copy(self, "license.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + with chdir(self, self.source_folder): + # Note: this will fail to properly consider the package_folder if a "conan build" followed by a "conan export-pkg" is executed self.run(self._make_install_cmd) + fix_apple_shared_install_name(self) def package_info(self): - major_version = tools.Version(self.version).major + major_version = Version(self.version).major self.cpp_info.set_property("pkg_config_name", f"botan-{major_version}") - self.cpp_info.names["pkg_config"] = f"botan-{major_version}" - self.cpp_info.libs = ["botan" if is_msvc(self) else f"botan-{major_version}"] + self.cpp_info.libs = ["botan" if is_msvc(self) and major_version < 3 else f"botan-{major_version}"] if self.settings.os == 'Linux': - self.cpp_info.system_libs.extend(['dl', 'rt', 'pthread']) + self.cpp_info.system_libs.extend(['dl', 'rt', 'pthread', 'm']) if self.settings.os == 'Macos': self.cpp_info.frameworks = ['Security', 'CoreFoundation'] if self.settings.os == 'Windows': @@ -220,10 +296,10 @@ def _botan_os(self): def _dependency_build_flags(self, dependency): # Since botan has a custom build system, we need to specifically inject # these build parameters so that it picks up the correct dependencies. - dep_cpp_info = self.deps_cpp_info[dependency] + dep_cpp_info = self.dependencies[dependency].cpp_info return \ - ['--with-external-includedir={}'.format(include_path) for include_path in dep_cpp_info.include_paths] + \ - ['--with-external-libdir={}'.format(lib_path) for lib_path in dep_cpp_info.lib_paths] + \ + ['--with-external-includedir={}'.format(include_path) for include_path in dep_cpp_info.includedirs] + \ + ['--with-external-libdir={}'.format(lib_path) for lib_path in dep_cpp_info.libdirs] + \ ['--define-build-macro={}'.format(define) for define in dep_cpp_info.defines] @property @@ -256,34 +332,27 @@ def _configure_cmd(self): elif self.settings.arch in ['x86_64']: botan_abi_flags.append('-arch x86_64') - if self.options.get_safe('fPIC', True): + if self.options.get_safe('fPIC', True) and not is_msvc(self): botan_extra_cxx_flags.append('-fPIC') - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): if self.settings.get_safe('os.version'): # Required, see https://github.com/conan-io/conan-center-index/pull/3456 - macos_min_version = tools.apple_deployment_target_flag(self.settings.os, - self.settings.get_safe('os.version'), - self.settings.get_safe('os.sdk'), - self.settings.get_safe('os.subsystem'), - self.settings.get_safe('arch')) + macos_min_version = macos_min_version = AutotoolsToolchain(self).apple_min_version_flag botan_extra_cxx_flags.append(macos_min_version) - macos_sdk_path = '-isysroot {}'.format(tools.XCRun(self.settings).sdk_path) + macos_sdk_path = '-isysroot {}'.format(XCRun(self).sdk_path) botan_extra_cxx_flags.append(macos_sdk_path) - # This is to work around botan's configure script that *replaces* its - # standard (platform dependent) flags in presence of an environment - # variable ${CXXFLAGS}. Most notably, this would build botan with - # disabled compiler optimizations. - environment_cxxflags = tools.get_env('CXXFLAGS') - if environment_cxxflags: - del os.environ['CXXFLAGS'] - botan_extra_cxx_flags.append(environment_cxxflags) + if self._extra_cxxflags: + botan_extra_cxx_flags.append(self._extra_cxxflags) if self.options.enable_modules: build_flags.append('--minimized-build') build_flags.append('--enable-modules={}'.format(self.options.enable_modules)) + if self.options.disable_modules: + build_flags.append('--disable-modules={}'.format(self.options.disable_modules)) + if self.options.amalgamation: build_flags.append('--amalgamation') @@ -293,11 +362,14 @@ def _configure_cmd(self): if self.options.system_cert_bundle: build_flags.append('--system-cert-bundle={}'.format(self.options.system_cert_bundle)) + if self.conf.get("tools.build:sysroot"): + build_flags.append(f'--with-sysroot-dir={self.conf.get("tools.build:sysroot")}') + if self.options.with_bzip2: build_flags.append('--with-bzip2') build_flags.extend(self._dependency_build_flags('bzip2')) - if self.options.with_openssl: + if self.options.get_safe('with_openssl', False): build_flags.append('--with-openssl') build_flags.extend(self._dependency_build_flags('openssl')) @@ -375,11 +447,17 @@ def _configure_cmd(self): if is_msvc(self): build_flags.append(f"--msvc-runtime={msvc_runtime_flag(self)}") + if self._is_glibc_older_than_2_25_on_linux and Version(self.version) >= '3.0': + # INFO: Botan 3.0+ requires glibc >= 2.25. Disable features to make it backward compatible + # FIXME: CCI Docker images are running Ubuntu 16.04. Remove it after supporting later version. + self.output.warning("Disabling usage of getentropy(), getrandom(), and explicit_bzero() due to old glibc version") + build_flags.append('--without-os-features=getentropy,getrandom,explicit_bzero') + build_flags.append('--without-pkg-config') call_python = 'python' if self.settings.os == 'Windows' else '' - prefix = tools.unix_path(self.package_folder) if self._is_mingw_windows else self.package_folder + prefix = unix_path(self, self.package_folder) if self._is_mingw_windows else self.package_folder botan_abi = ' '.join(botan_abi_flags) if botan_abi_flags else ' ' botan_cxx_extras = ' '.join(botan_extra_cxx_flags) if botan_extra_cxx_flags else ' ' @@ -413,27 +491,23 @@ def _make_cmd(self): @property def _make_program(self): - return tools.get_env('CONAN_MAKE_PROGRAM', tools.which('make') or tools.which('mingw32-make')) + return self.conf.get("tools.gnu:make_program", os.getenv('CONAN_MAKE_PROGRAM', shutil.which('make') or shutil.which('mingw32-make'))) @property def _gnumake_cmd(self): make_ldflags = 'LDFLAGS=-lc++abi' if self._is_linux_clang_libcxx else '' - make_cmd = ('{ldflags}' ' {make}' ' -j{cpucount}').format( - ldflags=make_ldflags, make=self._make_program, cpucount=tools.cpu_count()) + make_cmd = f"{make_ldflags} {self._make_program} -j{build_jobs(self)}" return make_cmd @property def _nmake_cmd(self): - vcvars = tools.vcvars_command(self.settings) - make_cmd = vcvars + ' && nmake' - return make_cmd + return 'nmake' @property def _make_install_cmd(self): if is_msvc(self): - vcvars = tools.vcvars_command(self.settings) - make_install_cmd = vcvars + ' && nmake install' + make_install_cmd = '{make} install'.format(make=self._nmake_cmd) else: make_install_cmd = '{make} install'.format(make=self._make_program) return make_install_cmd @@ -445,3 +519,19 @@ def _is_linux_clang_libcxx(self): self.settings.compiler == 'clang' and self.settings.compiler.libcxx == 'libc++' ) + + @property + def _is_glibc_older_than_2_25_on_linux(self): + # FIXME: glibc below 2.25 lacks support for certain syscalls that botan assumes + # to be present. Once CCI updated their CI images and provides a newer + # glibc, we can (and should) remove this workaround. + # + # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919206949 + # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919486839 + + libver = platform.libc_ver() + return ( + self.settings.os == 'Linux' and + libver[0] == 'glibc' and + Version(libver[1]) < '2.25' + ) diff --git a/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch new file mode 100644 index 0000000000000..54f8088a3d1e3 --- /dev/null +++ b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch @@ -0,0 +1,24 @@ +diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp +index 8a24ed9f6..45af0c507 100644 +--- a/src/lib/rng/system_rng/system_rng.cpp ++++ b/src/lib/rng/system_rng/system_rng.cpp +@@ -25,6 +25,7 @@ + #include + #elif defined(BOTAN_TARGET_OS_HAS_GETRANDOM) + #include ++ #include + #include + #elif defined(BOTAN_TARGET_OS_HAS_DEV_RANDOM) + #include +@@ -216,7 +217,11 @@ class System_RNG_Impl final : public RandomNumberGenerator + size_t len = output.size(); + while(len > 0) + { ++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25 ++ const ssize_t got = ::syscall(SYS_getrandom, buf, len, flags); ++#else + const ssize_t got = ::getrandom(buf, len, flags); ++#endif + + if(got < 0) + { diff --git a/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch new file mode 100644 index 0000000000000..dd376536584eb --- /dev/null +++ b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch @@ -0,0 +1,24 @@ +diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp +index b42ea5543..dcff78931 100644 +--- a/src/lib/rng/system_rng/system_rng.cpp ++++ b/src/lib/rng/system_rng/system_rng.cpp +@@ -26,6 +26,7 @@ + #elif defined(BOTAN_TARGET_OS_HAS_GETRANDOM) + #include + #include ++ #include + #elif defined(BOTAN_TARGET_OS_HAS_DEV_RANDOM) + #include + #include +@@ -211,7 +212,11 @@ class System_RNG_Impl final : public RandomNumberGenerator { + uint8_t* buf = output.data(); + size_t len = output.size(); + while(len > 0) { ++ #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25 ++ const ssize_t got = ::syscall(SYS_getrandom, buf, len, flags); ++ #else + const ssize_t got = ::getrandom(buf, len, flags); ++ #endif + + if(got < 0) { + if(errno == EINTR) { diff --git a/recipes/botan/all/patches/dll-dir.patch b/recipes/botan/all/patches/dll-dir.patch deleted file mode 100644 index d0cda481f6695..0000000000000 --- a/recipes/botan/all/patches/dll-dir.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/scripts/install.py b/src/scripts/install.py -index 4cbce5a8e..ed6fe897f 100755 ---- a/src/scripts/install.py -+++ b/src/scripts/install.py -@@ -191,7 +191,7 @@ def main(args): - libname = cfg['libname'] - soname_base = libname + '.dll' - copy_executable(os.path.join(out_dir, soname_base), -- prepend_destdir(os.path.join(lib_dir, soname_base))) -+ prepend_destdir(os.path.join(bin_dir, soname_base))) - else: - soname_patch = cfg['soname_patch'] - soname_abi = cfg['soname_abi'] diff --git a/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch b/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch deleted file mode 100644 index d70cce86690b9..0000000000000 --- a/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/configure.py b/configure.py -index 8b413db57..46331e78c 100755 ---- a/configure.py -+++ b/configure.py -@@ -2147,6 +2147,12 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, - 'mod_list': sorted([m.basename for m in modules]) - } - -+ if cc.basename == 'msvc' and variables['cxx_abi_flags'] != '': -+ # MSVC linker doesn't support/need the ABI options, -+ # just transfer them over to just the compiler invocations -+ variables['cc_compile_flags'] = '%s %s' % (variables['cxx_abi_flags'], variables['cc_compile_flags']) -+ variables['cxx_abi_flags'] = '' -+ - variables['lib_flags'] = cc.gen_lib_flags(options, variables) - variables['cmake_lib_flags'] = cmake_escape(variables['lib_flags']) - diff --git a/recipes/botan/all/patches/vs2015-install-fix.patch b/recipes/botan/all/patches/vs2015-install-fix.patch deleted file mode 100644 index c53e1a6c17844..0000000000000 --- a/recipes/botan/all/patches/vs2015-install-fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 42317bbcc7fe715b0a9f066bb52ed3c59dcc257e Mon Sep 17 00:00:00 2001 -From: Hannes Rantzsch -Date: Tue, 1 Dec 2020 09:40:38 +0100 -Subject: [PATCH] Backport a fix for a build issue in VS 2015 - -See https://github.com/randombit/botan/pull/2526 for details ---- - configure.py | 2 +- - src/build-data/makefile.in | 10 +++++----- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configure.py b/configure.py -index 88eeaa575..f7affad72 100755 ---- a/configure.py -+++ b/configure.py -@@ -1994,7 +1994,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, - def choose_python_exe(): - exe = sys.executable - -- if exe[1] == ':': # Windows style paths -+ if options.os == 'mingw': # mingw doesn't handle the backslashes in the absolute path well - return exe.replace('\\', '/') - - return exe -diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in -index 4d68ab1ec..b215bebb5 100644 ---- a/src/build-data/makefile.in -+++ b/src/build-data/makefile.in -@@ -48,19 +48,19 @@ docs: %{doc_stamp_file} - %{endif} - - %{doc_stamp_file}: %{doc_dir}/*.rst %{doc_dir}/api_ref/*.rst %{doc_dir}/dev_ref/*.rst -- $(PYTHON_EXE) $(SCRIPTS_DIR)/build_docs.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/build_docs.py" --build-dir="%{build_dir}" - - clean: -- $(PYTHON_EXE) $(SCRIPTS_DIR)/cleanup.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/cleanup.py" --build-dir="%{build_dir}" - - distclean: -- $(PYTHON_EXE) $(SCRIPTS_DIR)/cleanup.py --build-dir="%{build_dir}" --distclean -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/cleanup.py" --build-dir="%{build_dir}" --distclean - - install: %{install_targets} -- $(PYTHON_EXE) $(SCRIPTS_DIR)/install.py --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir=%{bindir} --libdir=%{libdir} --docdir=%{docdir} --includedir=%{includedir} -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/install.py" --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir="%{bindir}" --libdir="%{libdir}" --docdir="%{docdir}" --includedir="%{includedir}" - - check: tests -- $(PYTHON_EXE) $(SCRIPTS_DIR)/check.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/check.py" --build-dir="%{build_dir}" - - # Object Files - LIBOBJS = %{join lib_objs} --- -2.29.2 - diff --git a/recipes/botan/all/test_package/CMakeLists.txt b/recipes/botan/all/test_package/CMakeLists.txt index 5021b4e27691a..65e374a2711cc 100644 --- a/recipes/botan/all/test_package/CMakeLists.txt +++ b/recipes/botan/all/test_package/CMakeLists.txt @@ -1,11 +1,13 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package CXX) find_package(botan REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} botan::botan) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +if(botan_VERSION_STRING VERSION_LESS "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/botan/all/test_package/conanfile.py b/recipes/botan/all/test_package/conanfile.py index f4b0754b85efb..82bdc745af784 100644 --- a/recipes/botan/all/test_package/conanfile.py +++ b/recipes/botan/all/test_package/conanfile.py @@ -1,10 +1,25 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.microsoft import is_msvc, VCVars import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + if is_msvc(self): + ms = VCVars(self) + ms.generate() def build(self): cmake = CMake(self) @@ -12,6 +27,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.build_folder, self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/botan/all/test_v1_package/CMakeLists.txt b/recipes/botan/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..50dcf4911579b --- /dev/null +++ b/recipes/botan/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +find_package(botan REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} botan::botan) +if(botan_VERSION_STRING VERSION_LESS "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/botan/all/test_v1_package/conanfile.py b/recipes/botan/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..f4b0754b85efb --- /dev/null +++ b/recipes/botan/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/botan/all/test_v1_package/test_package.cpp b/recipes/botan/all/test_v1_package/test_package.cpp new file mode 100644 index 0000000000000..d8ace17201cc0 --- /dev/null +++ b/recipes/botan/all/test_v1_package/test_package.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + std::vector key = Botan::hex_decode("000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"); + return 0; +} diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index 7fdc77ee53c3b..aada9ec401094 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -1,26 +1,6 @@ versions: - "2.12.1": - folder: all - "2.13.0": - folder: all - "2.14.0": - folder: all - "2.15.0": - folder: all - "2.16.0": - folder: all - "2.17.0": - folder: all - "2.17.1": - folder: all - "2.17.2": - folder: all "2.17.3": folder: all - "2.18.0": - folder: all - "2.18.1": - folder: all "2.18.2": folder: all "2.19.1": @@ -29,3 +9,11 @@ versions: folder: all "2.19.3": folder: all + "3.0.0": + folder: all + "3.1.0": + folder: all + "3.1.1": + folder: all + "3.2.0": + folder: all From 1c4fc7d6fa6af1e238c9f4a783d5c62fe7601108 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 22:08:16 +0900 Subject: [PATCH 071/108] (#22691) libucl: add version 0.9.0 * libucl: add version 0.9.0 * link math lib * remove glib types --- recipes/libucl/all/conandata.yml | 14 +++ recipes/libucl/all/conanfile.py | 4 + ...0-cmake-add-install+use-find_package.patch | 119 ++++++++++++++++++ .../0006-0.9.0-remove-glib-types.patch | 32 +++++ recipes/libucl/config.yml | 2 + 5 files changed, 171 insertions(+) create mode 100644 recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch create mode 100644 recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch diff --git a/recipes/libucl/all/conandata.yml b/recipes/libucl/all/conandata.yml index 11db4b55879f9..656cf543d7403 100644 --- a/recipes/libucl/all/conandata.yml +++ b/recipes/libucl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.0": + url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.9.0.tar.gz" + sha256: "87b233048bca7d307b14cffb882d3c198dc3fff96b19e0c3515428f027b3ebfe" "0.8.2": url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.8.2.tar.gz" sha256: "d95a0e2151cc167a0f3e51864fea4e8977a0f4c473faa805269a347f7fb4e165" @@ -6,6 +9,17 @@ sources: url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.8.1.tar.gz" sha256: "a6397e179672f0e8171a0f9a2cfc37e01432b357fd748b13f4394436689d24ef" patches: + "0.9.0": + - patch_file: "patches/0001-0.8.1-shared-win32.patch" + patch_description: "fix UCL_EXTERN definition for shared build on win32" + patch_type: "portability" + - patch_file: "patches/0002-0.9.0-cmake-add-install+use-find_package.patch" + patch_description: "improve installation, use cci package" + patch_type: "conan" + - patch_file: "patches/0006-0.9.0-remove-glib-types.patch" + patch_description: "remove glib types, use char and size_t instead." + patch_type: "portability" + patch_source: "https://github.com/vstakhov/libucl/pull/283" "0.8.2": - patch_file: "patches/0001-0.8.1-shared-win32.patch" patch_description: "fix UCL_EXTERN definition for shared build on win32" diff --git a/recipes/libucl/all/conanfile.py b/recipes/libucl/all/conanfile.py index f81b0da544841..30bc268f05071 100644 --- a/recipes/libucl/all/conanfile.py +++ b/recipes/libucl/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -90,3 +91,6 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["pkg_config"] = "libucl" + + if Version(self.version) >= "0.9.0" and self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch b/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch new file mode 100644 index 0000000000000..139c3e606a3ba --- /dev/null +++ b/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch @@ -0,0 +1,119 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e23994..c67a5b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,12 +5,15 @@ SET(LIBUCL_VERSION_MAJOR 0) + SET(LIBUCL_VERSION_MINOR 9) + SET(LIBUCL_VERSION_PATCH 0) + +-SET(LIBUCL_VERSION +- "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") ++SET(LIBUCL_VERSION "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") + + INCLUDE(CheckCCompilerFlag) + INCLUDE(CheckCSourceCompiles) +-INCLUDE(FindOpenSSL) ++IF(ENABLE_URL_SIGN) ++ FIND_PACKAGE(OpenSSL REQUIRED) ++ SET(HAVE_OPENSSL 1) ++ ADD_DEFINITIONS(-DHAVE_OPENSSL) ++ENDIF(ENABLE_URL_SIGN) + INCLUDE(GNUInstallDirs) + + OPTION(ENABLE_URL_INCLUDE "Enable urls in ucl includes (requires libcurl or libfetch) [default: OFF]" OFF) +@@ -135,30 +138,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + + IF(ENABLE_URL_INCLUDE MATCHES "ON") +- FIND_LIBRARY(LIBFETCH_LIBRARY NAMES fetch PATHS PATH_SUFFIXES lib64 lib +- PATHS +- ~/Library/Frameworks +- /Library/Frameworks +- /usr/local +- /usr +- /sw +- /opt/local +- /opt/csw +- /opt +- DOC "Path where the libfetch library can be found") +- IF(LIBFETCH_LIBRARY) +- FIND_FILE(HAVE_FETCH_H NAMES fetch.h PATHS /usr/include +- /opt/include +- /usr/local/include +- DOC "Path to libfetch header") +- ELSE(LIBFETCH_LIBRARY) +- # Try to find libcurl +- FIND_PACKAGE(CURL) +- IF(NOT CURL_FOUND) +- MESSAGE(WARNING "Neither libcurl nor libfetch were found, no support of URL includes in configuration") +- ENDIF(NOT CURL_FOUND) +- ENDIF(LIBFETCH_LIBRARY) +-ENDIF(ENABLE_URL_INCLUDE MATCHES "ON") ++ FIND_PACKAGE(CURL REQUIRED) ++ ADD_DEFINITIONS(-DCURL_FOUND) ++ SET(CURL_LIBRARIES CURL::libcurl) ++ENDIF() + + set(SYNC_BUILTINS_TEST_SOURCE [====[ + int main() +@@ -249,35 +232,24 @@ TARGET_COMPILE_DEFINITIONS(ucl + ${UCL_COMPILE_DEFS} + ) + +-IF(ENABLE_LUA MATCHES "ON") +- IF(ENABLE_LUAJIT MATCHES "ON") +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") +- IF(NOT LUA_FOUND) +- MESSAGE(FATAL_ERROR "Lua not found, lua support is required") +- ELSE(NOT LUA_FOUND) +- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") +- ENDIF(NOT LUA_FOUND) +- ELSE(ENABLE_LUAJIT MATCHES "ON") +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "2" ROOT "${LUA_ROOT}") +- IF(NOT LUA_FOUND) +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") +- ENDIF(NOT LUA_FOUND) +- IF(NOT LUA_FOUND) +- MESSAGE(FATAL_ERROR "Lua not found, lua support is required") +- ELSE(NOT LUA_FOUND) +- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") +- ENDIF(NOT LUA_FOUND) +- ENDIF(ENABLE_LUAJIT MATCHES "ON") ++IF(ENABLE_LUA OR ENABLE_LUAJIT) + SET(UCL_LUA_SRC lua/lua_ucl.c) + ADD_LIBRARY(lua-ucl ${LIB_TYPE} ${UCL_LUA_SRC}) + ADD_LIBRARY(ucl::lua ALIAS lua-ucl) ++ TARGET_LINK_LIBRARIES(lua-ucl ucl) + IF(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl "${LUAJIT_LIBRARY}") ++ TARGET_LINK_LIBRARIES(lua-ucl luajit::luajit) + ELSE(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl "${LUA_LIBRARY}") ++ TARGET_LINK_LIBRARIES(lua-ucl lua::lua) + ENDIF(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl ucl) + TARGET_INCLUDE_DIRECTORIES(lua-ucl PUBLIC include PRIVATE src uthash) ++ IF(ENABLE_LUA) ++ FIND_PACKAGE(lua REQUIRED CONFIG) ++ TARGET_LINK_LIBRARIES(lua-ucl lua::lua) ++ ELSEIF(ENABLE_LUAJIT) ++ FIND_PACKAGE(luajit REQUIRED CONFIG) ++ TARGET_LINK_LIBRARIES(lua-ucl luajit::luajit) ++ ENDIF() + SET_TARGET_PROPERTIES(lua-ucl PROPERTIES + VERSION ${LIBUCL_VERSION} + SOVERSION ${LIBUCL_VERSION_MAJOR} +@@ -306,8 +278,11 @@ ENDIF(UNIX) + SET_TARGET_PROPERTIES(ucl PROPERTIES + PUBLIC_HEADER "${UCLHDR}") + +-INSTALL(TARGETS ucl EXPORT uclConfig DESTINATION ${CMAKE_INSTALL_LIBDIR} +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++INSTALL(TARGETS ucl EXPORT uclConfig ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + IF(ENABLE_UTILS MATCHES "ON") + ADD_SUBDIRECTORY(utils) diff --git a/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch b/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch new file mode 100644 index 0000000000000..f63df8c3abd20 --- /dev/null +++ b/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch @@ -0,0 +1,32 @@ +diff --git a/lua/lua_ucl.c b/lua/lua_ucl.c +index c2e39c4..d6be69e 100644 +--- a/lua/lua_ucl.c ++++ b/lua/lua_ucl.c +@@ -406,7 +406,6 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) + + /* Table iterate */ + if (is_array) { +- int i; + + if (!is_implicit) { + top = ucl_object_typed_new (UCL_ARRAY); +@@ -416,7 +415,7 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) + top = NULL; + } + +- for (i = 1; i <= max; i ++) { ++ for (size_t i = 1; i <= max; i ++) { + lua_pushinteger (L, i); + lua_gettable (L, idx); + +@@ -886,8 +885,8 @@ lua_ucl_parser_parse_text (lua_State *L) + t = lua_touserdata (L, 2); + } + else if (lua_type (L, 2) == LUA_TSTRING) { +- const gchar *s; +- gsize len; ++ const char *s; ++ size_t len; + static struct _rspamd_lua_text st_t; + + s = lua_tolstring (L, 2, &len); diff --git a/recipes/libucl/config.yml b/recipes/libucl/config.yml index 7a9cbb2ce8ecb..fa8c302279f91 100644 --- a/recipes/libucl/config.yml +++ b/recipes/libucl/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.0": + folder: all "0.8.2": folder: all "0.8.1": From b87c2fc3fcaab40772c2af3e2bb7ba00abd54ef2 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Sat, 17 Feb 2024 22:08:27 +0300 Subject: [PATCH 072/108] (#22782) md4qt: bump version to 2.7.3 --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 315e8aca50cf0..29dd0361a14fa 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.3": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.3.tar.gz" + sha256: "d464cd137a69218f88af1373b198610f1db6971c7aa56c6869219ffb34e6f0dd" "2.7.2": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.2.tar.gz" sha256: "2d6b65db799fff944f2ecb8bb411f17687e41e0d5a17a37ad1c4bd22fe997d8b" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index e03897a5ac97e..73bd1fd0bdc43 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.3": + folder: all "2.7.2": folder: all "2.7.1": From efe16266d5995ddbc24fd761c1afba58010454c7 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sat, 17 Feb 2024 20:28:00 +0100 Subject: [PATCH 073/108] (#22783) ccache: add version 4.9.1 --- recipes/ccache/all/conandata.yml | 7 +++++++ recipes/ccache/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/ccache/all/conandata.yml b/recipes/ccache/all/conandata.yml index 57fc624c15481..5c1cbd2adcc93 100644 --- a/recipes/ccache/all/conandata.yml +++ b/recipes/ccache/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.9.1": + url: "https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1.tar.xz" + sha256: "4c03bc840699127d16c3f0e6112e3f40ce6a230d5873daa78c60a59c7ef59d25" "4.9": url: "https://github.com/ccache/ccache/releases/download/v4.9/ccache-4.9.tar.xz" sha256: "1ebc72324e3ab52af0b562bf54189d108e85eef6478d6304a345a3c2dc4018e0" @@ -18,6 +21,10 @@ sources: url: "https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4.tar.xz" sha256: "df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36" patches: + "4.9.1": + - patch_file: "patches/4.9-cmake-msvc-runtime.patch" + patch_description: "fixup MSVC runtime" + patch_type: "conan" "4.9": - patch_file: "patches/4.9-cmake-msvc-runtime.patch" patch_description: "fixup MSVC runtime" diff --git a/recipes/ccache/config.yml b/recipes/ccache/config.yml index c2b3794787244..c3b3ce18a0b2b 100644 --- a/recipes/ccache/config.yml +++ b/recipes/ccache/config.yml @@ -1,4 +1,6 @@ versions: + "4.9.1": + folder: all "4.9": folder: all "4.8.3": From f0af52dfa9627cb4db2eddb598cfd88db55cbd80 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 18 Feb 2024 04:49:08 +0900 Subject: [PATCH 074/108] (#22798) ssp: add version 1.6.2 --- recipes/ssp/all/conandata.yml | 3 +++ recipes/ssp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ssp/all/conandata.yml b/recipes/ssp/all/conandata.yml index 72dce2c480ffe..7b9246ca69c3c 100644 --- a/recipes/ssp/all/conandata.yml +++ b/recipes/ssp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.2": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.2.tar.gz" + sha256: "6fa5ae1cd458eae3c1931e8cbcbd8d97956eda37db1388358456ca0743b48b7c" "1.6.1": url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.1.tar.gz" sha256: "4cdf75959b0a5fabd0b3e6ec1bad41d7c3f298d5b7f822d6e12b7e4d7dfcdd34" diff --git a/recipes/ssp/config.yml b/recipes/ssp/config.yml index bd3f43d241a52..8664a344402ec 100644 --- a/recipes/ssp/config.yml +++ b/recipes/ssp/config.yml @@ -1,3 +1,5 @@ versions: + "1.6.2": + folder: all "1.6.1": folder: all From 80a605249e29ca8357f75dfaf380aaf37abeb44a Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 18 Feb 2024 05:08:24 +0900 Subject: [PATCH 075/108] (#22800) rtm: add version 2.3.0 --- recipes/rtm/all/conandata.yml | 3 +++ recipes/rtm/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/rtm/all/conandata.yml b/recipes/rtm/all/conandata.yml index 41cc19013d6fa..e9ca9adc1569f 100644 --- a/recipes/rtm/all/conandata.yml +++ b/recipes/rtm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.0": + url: "https://github.com/nfrechette/rtm/archive/v2.3.0.tar.gz" + sha256: "2b5f2c3761bb52ae89802a574e9dc9949aec3b183f7e100b9b66a65adcc6f5ab" "2.2.1": url: "https://github.com/nfrechette/rtm/archive/v2.2.1.tar.gz" sha256: "678989368bc9859138db00719ad9e2f82b51acb0d8da6905426e4134223cee2a" diff --git a/recipes/rtm/config.yml b/recipes/rtm/config.yml index 3a396aa92fa44..92f533de05d77 100644 --- a/recipes/rtm/config.yml +++ b/recipes/rtm/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.0": + folder: "all" "2.2.1": folder: "all" "2.2.0": From ce4acb537ef60008ee8007c25a33e83588d03b73 Mon Sep 17 00:00:00 2001 From: Cameron <54868046+crhowell3@users.noreply.github.com> Date: Mon, 19 Feb 2024 02:49:16 -0600 Subject: [PATCH 076/108] (#22794) opendis6: Set Minimum C++ Standard to 14 for RHEL 8 Support [CRITICAL] * Decreased min C++ standard to 14 for RHEL 8 support * Adjusted compiler list and test package CXX standard --- recipes/opendis6/all/conanfile.py | 8 ++++---- recipes/opendis6/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/opendis6/all/conanfile.py b/recipes/opendis6/all/conanfile.py index 7e3a9bc79f7cc..1d7c11b706f15 100644 --- a/recipes/opendis6/all/conanfile.py +++ b/recipes/opendis6/all/conanfile.py @@ -29,16 +29,16 @@ class OpenDis6Conan(ConanFile): @property def _min_cppstd(self): - return "17" + return "14" @property def _compilers_minimum_version(self): return { "Visual Studio": "15", "msvc": "191", - "gcc": "8.5", - "clang": "6", - "apple-clang": "14", + "gcc": "7", + "clang": "7", + "apple-clang": "10", } def config_options(self): diff --git a/recipes/opendis6/all/test_package/CMakeLists.txt b/recipes/opendis6/all/test_package/CMakeLists.txt index c3a404538b736..84b0c539e5ca0 100644 --- a/recipes/opendis6/all/test_package/CMakeLists.txt +++ b/recipes/opendis6/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(OpenDIS CONFIG REQUIRED) add_executable(test_package_dis test_package.cpp) target_link_libraries(test_package_dis PRIVATE OpenDIS::OpenDIS6) -set_target_properties(test_package_dis PROPERTIES CXX_STANDARD 17) +set_target_properties(test_package_dis PROPERTIES CXX_STANDARD 14) From e6d41d3925c6116d1e11366215987ed88c206e2b Mon Sep 17 00:00:00 2001 From: Juan <35701596+juansblanco@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:24:57 +0100 Subject: [PATCH 077/108] (#22793) [libgpg-error] Fix crosscompile errors --- recipes/libgpg-error/all/conanfile.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/libgpg-error/all/conanfile.py b/recipes/libgpg-error/all/conanfile.py index 630c80e0b9233..2ed23af2c2e5b 100644 --- a/recipes/libgpg-error/all/conanfile.py +++ b/recipes/libgpg-error/all/conanfile.py @@ -57,10 +57,6 @@ def generate(self): ]) if self.options.get_safe("fPIC", True): tc.configure_args.append("--with-pic") - host = None - if self.settings.os == "Linux" and self.settings.arch == "x86": - host = "i686-linux-gnu" - tc.update_configure_args({"--host": host}) tc.generate() def build(self): From 04f986643e7cf4a9b3a06e2ee7827f6949258aea Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Mon, 19 Feb 2024 05:48:10 -0600 Subject: [PATCH 078/108] (#22629) libdwarf: Add 0.9.0 and 0.9.1 * Add libdwarf 0.9.0 and 0.9.1 * Correction for the test package * Try to fix 0.9.0 * comment out remaining 0.9.1 references temporarily * Patch off_t * Try to get 0.9.1 good to go * Update recipes/libdwarf/all/conanfile.py Co-authored-by: Uilian Ries * Remove libdwarf 20191104 * Handle dwarfdump license * Update patches to use lowercasae zstd --------- Co-authored-by: Uilian Ries --- recipes/libdwarf/all/conandata.yml | 21 ++- recipes/libdwarf/all/conanfile.py | 41 ++-- .../all/patches/0.9.0-0001-fixes.patch | 105 +++++++++++ .../all/patches/0.9.1-0001-fixes.patch | 86 +++++++++ .../all/patches/20191104-0001-patch.patch | 178 ------------------ .../libdwarf/all/test_package/CMakeLists.txt | 4 +- .../libdwarf/all/test_package/test_package.c | 8 +- recipes/libdwarf/config.yml | 6 +- 8 files changed, 236 insertions(+), 213 deletions(-) create mode 100644 recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch create mode 100644 recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch delete mode 100644 recipes/libdwarf/all/patches/20191104-0001-patch.patch diff --git a/recipes/libdwarf/all/conandata.yml b/recipes/libdwarf/all/conandata.yml index 6abc97da6d65a..1a5e4c96d2caf 100644 --- a/recipes/libdwarf/all/conandata.yml +++ b/recipes/libdwarf/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.9.1": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.1.tar.gz" + sha256: "6da3f46a9f92b4e284c97c733851879d9b91b16642bede90c7614860a946824e" + "0.9.0": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.0.tar.gz" + sha256: "6d4c0ee8a869e68dfeb15c99b869cafca7a5f715ecfc699cbf4fd30729b33226" "0.8.0": url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.8.0.tar.gz" sha256: "8ef0dbfb0816b02aac97b87426689ebaa4efb8ec2ca2c759ea34c5e4678dff3f" @@ -8,10 +14,15 @@ sources: "0.5.0": url: "https://www.prevanders.net/libdwarf-0.5.0.tar.xz" sha256: "11fa822c60317fa00e1a01a2ac9e8388f6693e8662ab72d352c5f50c7e0112a9" - "20191104": - url: "https://www.prevanders.net/libdwarf-20191104.tar.gz" - sha256: "45f50a966314421b7dab525859853616df6c9680f0ccf2f44b030c505236eaba" patches: + "0.9.1": + - patch_file: "patches/0.9.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" + "0.9.0": + - patch_file: "patches/0.9.0-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" "0.8.0": - patch_file: "patches/0.8.0-0001-fixes.patch" patch_description: "fix DW_API definition and cmake" @@ -30,7 +41,3 @@ patches: - patch_file: "patches/0.5.0-0001-fix-DW_API.patch" patch_description: "fix DW_API definition" patch_type: "portability" - "20191104": - - patch_file: "patches/20191104-0001-patch.patch" - patch_description: "use cci package, remove lib64/bin64 install folders" - patch_type: "conan" diff --git a/recipes/libdwarf/all/conanfile.py b/recipes/libdwarf/all/conanfile.py index 0149255b7e4f0..8eab28c0da9ce 100644 --- a/recipes/libdwarf/all/conanfile.py +++ b/recipes/libdwarf/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rename from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -9,7 +10,7 @@ class LibdwarfConan(ConanFile): name = "libdwarf" description = "A library and a set of command-line tools for reading and writing DWARF2" - license = ("LGPL-2.1-only", "BSD-2-Clause-Views") + license = ("LGPL-2.1-only", "BSD-2-Clause-Views", "GPL-2.0-only") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.prevanders.net/dwarf.html" topics = ("debug", "dwarf", "dwarf2", "elf") @@ -20,11 +21,13 @@ class LibdwarfConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_dwarfgen": [True, False], + "with_dwarfdump": [True, False], } default_options = { "shared": False, "fPIC": True, "with_dwarfgen": False, + "with_dwarfdump": False, } def export_sources(self): @@ -41,15 +44,19 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") if not self.options.with_dwarfgen: - self.license = "LGPL-2.1-only" + self.license = (l for l in self.license if l != "BSD-2-Clause-Views") + if not self.options.with_dwarfdump: + self.license = (l for l in self.license if l != "GPL-2.0-only") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if self.options.with_dwarfgen or self.version == "20191104": + if self.options.with_dwarfgen: self.requires("libelf/0.8.13") self.requires("zlib/[>=1.2.11 <2]") + if Version(self.version) >= Version("0.9.0"): + self.requires("zstd/1.5.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -60,6 +67,7 @@ def generate(self): tc.variables["BUILD_NON_SHARED"] = not self.options.shared tc.variables["BUILD_SHARED"] = self.options.shared tc.variables["BUILD_DWARFGEN"] = self.options.with_dwarfgen + tc.variables["BUILD_DWARFDUMP"] = self.options.with_dwarfdump tc.variables["BUILD_DWARFEXAMPLE"] = False if cross_building(self): tc.variables["HAVE_UNUSED_ATTRIBUTE_EXITCODE"] = "0" @@ -76,20 +84,15 @@ def build(self): cmake.build() def package(self): - if self.version == "20191104": - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "libdwarf")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) - if self.options.with_dwarfgen: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "dwarfgen")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - else: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "lib", "libdwarf")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) - if self.options.with_dwarfgen: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfgen")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "lib", "libdwarf")) + rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) + if self.options.with_dwarfgen: + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfgen")) + rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) + if self.options.with_dwarfdump: + copy(self, pattern="GPL.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfdump")) + rename(self, os.path.join(self.package_folder, "licenses", "GPL.txt"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfdump")) + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() @@ -103,6 +106,4 @@ def package_info(self): bindir = os.path.join(self.package_folder, "bin") self.output.info(f'Appending PATH environment variable: {bindir}') self.env_info.PATH.append(bindir) - - if self.version != "20191104": - self.cpp_info.libs.append("dwarfp") + self.cpp_info.libs.append("dwarfp") diff --git a/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch new file mode 100644 index 0000000000000..5c91298881e9c --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch @@ -0,0 +1,105 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f444af27..5c9390d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -181,14 +181,20 @@ endif() + + # Zlib and ZSTD need to be found otherwise disable it + find_package(ZLIB) +-find_package(ZSTD) +-if (ZLIB_FOUND AND ZSTD_FOUND ) ++find_package(zstd) ++if (ZLIB_FOUND AND zstd_FOUND ) + set(HAVE_ZLIB TRUE) + set(HAVE_ZLIB_H TRUE) + set(HAVE_ZSTD TRUE) + set(HAVE_ZSTD_H TRUE) + endif() + ++if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++else() ++ set(ZSTD_LIB zstd::libzstd_static) ++endif() ++ + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) + + # DW_FWALLXX are gnu C++ options. +diff --git a/src/bin/dwarfdump/CMakeLists.txt b/src/bin/dwarfdump/CMakeLists.txt +index 6d2c328b..bc105813 100644 +--- a/src/bin/dwarfdump/CMakeLists.txt ++++ b/src/bin/dwarfdump/CMakeLists.txt +@@ -68,7 +68,7 @@ target_compile_options(dwarfdump PRIVATE ${DW_FWALL}) + + target_link_libraries(dwarfdump PRIVATE dwarf) + +-if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) ++if(0) + set(SUFFIX 64) + endif() + set(LIBDIR lib${SUFFIX}) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 4ad5c4fb..052208a1 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -107,11 +107,10 @@ target_include_directories(dwarf PUBLIC + $ + $ + ) +-if(ZLIB_FOUND AND ZSTD_FOUND) +- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) ++if(ZLIB_FOUND AND zstd_FOUND) ++ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) + endif() + +-set(SUFFIX $<$:64>) + set(LIBDIR lib${SUFFIX}) + set(BINDIR bin${SUFFIX}) + +@@ -120,7 +119,7 @@ install(TARGETS dwarf + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -145,6 +144,8 @@ install( + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.h + DESTINATION include/libdwarf) ++if(0) + install( FILES ${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc + DESTINATION lib/pkgconfig + ) ++endif() +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index ed3d1d0b..91f2fd8b 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch new file mode 100644 index 0000000000000..c7952f7107937 --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch @@ -0,0 +1,86 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70839abd..972a2b9e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,14 +188,20 @@ if (ENABLE_DECOMPRESSION) + find_package(ZLIB) + endif() + if(NOT TARGET ZSTD::ZSTD) +- find_package(ZSTD) ++ find_package(zstd) + endif() +- if (ZLIB_FOUND AND ZSTD_FOUND ) ++ if (ZLIB_FOUND AND zstd_FOUND ) + set(HAVE_ZLIB TRUE) + set(HAVE_ZLIB_H TRUE) + set(HAVE_ZSTD TRUE) + set(HAVE_ZSTD_H TRUE) + endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() + endif () + + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 7500c9f4..ce1461fb 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -104,8 +104,8 @@ target_include_directories(dwarf PUBLIC + $ + $ + ) +-if(ZLIB_FOUND AND ZSTD_FOUND) +- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) ++if(ZLIB_FOUND AND zstd_FOUND) ++ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) + endif() + set_target_properties(dwarf PROPERTIES PUBLIC_HEADER "libdwarf.h;dwarf.h") + +@@ -116,7 +116,7 @@ install(TARGETS dwarf + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -131,4 +131,4 @@ install(EXPORT libdwarfTargets + NAMESPACE libdwarf:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") + install(FILES cmake/libdwarf-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index 380d2ef7..8c62ee7e 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/20191104-0001-patch.patch b/recipes/libdwarf/all/patches/20191104-0001-patch.patch deleted file mode 100644 index aadcac9dfe8fd..0000000000000 --- a/recipes/libdwarf/all/patches/20191104-0001-patch.patch +++ /dev/null @@ -1,178 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2607e56..3ca4ac5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -73,9 +73,9 @@ check_include_file( "unistd.h" HAVE_UNISTD_H ) - check_include_file( "sgidefs.h" HAVE_SGIDEFS_H ) - check_include_file( "stdafx.h" HAVE_STDAFX_H ) - check_include_file( "Windows.h" HAVE_WINDOWS_H ) --check_include_file( "elf.h" HAVE_ELF_H ) --check_include_file( "libelf.h" HAVE_LIBELF_H ) --check_include_file( "libelf/libelf.h" HAVE_LIBELF_LIBELF_H) -+set(HAVE_ELF_H FALSE) -+set(HAVE_LIBELF_H FALSE) -+set(HAVE_LIBELF_LIBELF_H TRUE) - check_include_file( "alloca.h" HAVE_ALLOCA_H ) - check_include_file( "elfaccess.h" HAVE_ELFACCESS_H) - check_include_file( "sys/elf_386.h" HAVE_SYS_ELF_386_H ) -@@ -128,6 +128,8 @@ endif() - # It's not really setting the location of libelfheader, - # it is really # either elf.h, or if that is missing - # it is assuming elf.h data is in the supplied libelf. -+find_package(libelf REQUIRED CONFIG) -+find_package(ZLIB REQUIRED CONFIG) - - if(HAVE_ELF_H) - set(HAVE_LOCATION_OF_LIBELFHEADER "") -@@ -146,12 +148,13 @@ elseif(HAVE_LIBELF_LIBELF_H) - endif() - - if (HAVE_LIBELF_H OR HAVE_LIBELF_LIBELF_H) -- set (CMAKE_REQUIRED_LIBRARIES elf) -+ set (CMAKE_REQUIRED_DEFINITIONS -D__LIBELF64=1) - message(STATUS "libelf header ${PLAIN_JUST_LIBELF} checking for elf64_getehdr") - check_symbol_exists( elf64_getehdr ${PLAIN_JUST_LIBELF} HAVE_ELF64_GETEHDR) - message(STATUS "libelf header ${PLAIN_JUST_LIBELF} checking for elf64_getshdr") - check_symbol_exists( elf64_getshdr ${PLAIN_JUST_LIBELF} HAVE_ELF64_GETSHDR) - set (CMAKE_REQUIRED_LIBRARIES) -+ set (CMAKE_REQUIRED_DEFINITIONS) - endif() - - option(DWARF_WITH_LIBELF "Use libelf (default is YES)" TRUE) -@@ -166,6 +169,9 @@ if (DWARF_WITH_LIBELF) - message(STATUS "checking using HAVE_ELF_H ... ${HAVE_ELF_H}") - message(STATUS "checking using elf header ... ${HAVE_LOCATION_OF_LIBELFHEADER}") - message(STATUS "checking using libelf header ... ${JUST_LIBELF}") -+ -+ set (CMAKE_REQUIRED_DEFINITIONS -D__LIBELF64=1) -+ - check_c_source_compiles(" - #include ${HAVE_LOCATION_OF_LIBELFHEADER} - int main() -@@ -202,7 +208,7 @@ if (DWARF_WITH_LIBELF) - # to set HAVE_LIBELF_OFF64_OK at present. - check_c_source_compiles(" - #define _GNU_SOURCE 1 -- #include ${JUST_LIBELF} -+ #include <${JUST_LIBELF}> - int main() - { - off64_t p; p = 0; -@@ -210,7 +216,7 @@ if (DWARF_WITH_LIBELF) - }" HAVE_LIBELF_OFF64_OK) - - check_c_source_compiles(" -- #include ${JUST_LIBELF} -+ #include <${JUST_LIBELF}> - /* This must be at global scope */ - struct _Elf; - typedef struct _Elf Elf; -@@ -220,6 +226,10 @@ if (DWARF_WITH_LIBELF) - int i = 12; - return 0; - }" HAVE_STRUCT_UNDERSCORE_ELF) -+ -+ set (CMAKE_REQUIRED_LIBRARIES) -+ set (CMAKE_REQUIRED_DEFINITIONS) -+ - endif() - message(STATUS "Assuming struct Elf for the default libdwarf.h") - # Because cmake treats ; in an interesting way attempting -@@ -378,10 +388,9 @@ message(STATUS "Checking producer generates only 32bit... ${HAVE_STRICT_DWARF2_3 - - - # This references cmake/FindLibElf.cmake. See cmake documentation. --find_package(LibElf REQUIRED) - list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBELF_INCLUDE_DIRS}) - --configure_file(config.h.in.cmake config.h) -+configure_file(${CMAKE_SOURCE_DIR}/config.h.in.cmake ${CMAKE_BINARY_DIR}/config.h) - - if(BUILD_NON_SHARED) - set(DWARF_TARGETS dwarf-static) -@@ -395,7 +404,6 @@ if(BUILD_SHARED) - endif() - - add_subdirectory(libdwarf) --add_subdirectory(dwarfdump) - if ( BUILD_DWARFGEN ) - if ( DWARF_WITH_LIBELF ) - add_subdirectory(dwarfgen) -diff --git a/dwarfdump/CMakeLists.txt b/dwarfdump/CMakeLists.txt -index b94f6c8..6bdb57f 100644 ---- a/dwarfdump/CMakeLists.txt -+++ b/dwarfdump/CMakeLists.txt -@@ -31,7 +31,7 @@ set_source_group(CONFIGURATION_FILES "Configuration Files" - ${CMAKE_SOURCE_DIR}/config.h.in.cmake - ${CMAKE_BINARY_DIR}/config.h) - --add_executable(dwarfdump ${SOURCES} ${HEADERS} ${CONFIGURATION_FILES}) -+add_executable(dwarfdump ${SOURCES} ${HEADERS} ${CONFIGURATION_FILES} ${libelf_LIBRARIES}) - - set_folder(dwarfdump dwarfdump) - -diff --git a/dwarfgen/CMakeLists.txt b/dwarfgen/CMakeLists.txt -index 488b820..5bde9eb 100644 ---- a/dwarfgen/CMakeLists.txt -+++ b/dwarfgen/CMakeLists.txt -@@ -20,16 +20,16 @@ set_folder(dwarfgen dwarfgen) - - target_compile_options(dwarfgen PRIVATE ${DW_FWALLXX}) - --target_link_libraries(dwarfgen PRIVATE ${dwarf-target} ${DW_FZLIB}) -+target_link_libraries(dwarfgen PRIVATE ${dwarf-target} ${DW_FZLIB} ${libelf_LIBRARIES}) - - set(SUFFIX $<$:64>) - set(LIBDIR lib${SUFFIX}) - set(BINDIR bin${SUFFIX}) - - install(TARGETS dwarfgen DESTINATION -- RUNTIME DESTINATION ${BINDIR} -- LIBRARY DESTINATION ${LIBDIR} -- ARCHIVE DESTINATION ${LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) - - #install(FILES dwarfgen.conf DESTINATION lib) - -diff --git a/libdwarf/CMakeLists.txt b/libdwarf/CMakeLists.txt -index c610522..3a69533 100644 ---- a/libdwarf/CMakeLists.txt -+++ b/libdwarf/CMakeLists.txt -@@ -81,12 +81,9 @@ foreach(i RANGE ${targetCount}) - ${GENNAMES_OUTPUT} ${CONFIGURATION_FILES}) - - set_folder(${target} libdwarf) -- target_include_directories(${target} PUBLIC -- ${LIBELF_INCLUDE_DIRS}) -- target_compile_options(${target} PRIVATE ${DW_FWALL}) - msvc_posix(${target}) - -- target_link_libraries(${target} PUBLIC ${LIBELF_LIBRARIES}) -+ target_link_libraries(${target} PUBLIC ${libelf_LIBRARIES} ${ZLIB_LIBRARIES}) - - set_target_properties(${target} PROPERTIES OUTPUT_NAME dwarf) - -@@ -95,15 +92,14 @@ foreach(i RANGE ${targetCount}) - set(BINDIR bin${SUFFIX}) - - install(TARGETS ${target} -- RUNTIME DESTINATION ${BINDIR} -- LIBRARY DESTINATION ${LIBDIR} -- ARCHIVE DESTINATION ${LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) - endforeach() - --if(UNIX AND BUILD_SHARED) -- target_link_libraries(dwarf-shared PUBLIC z) --endif() -- -+install(FILES ${CMAKE_BINARY_DIR}/libdwarf/libdwarf.h DESTINATION include) -+install(FILES dwarf.h DESTINATION include) -+ - if (DO_TESTING) - set_source_group(TESTLEB "Source Files" dwarf_leb_test.c - dwarf_leb.c pro_encode_nm.c ) diff --git a/recipes/libdwarf/all/test_package/CMakeLists.txt b/recipes/libdwarf/all/test_package/CMakeLists.txt index a2fbbf0a474e1..8abbd68a6f049 100644 --- a/recipes/libdwarf/all/test_package/CMakeLists.txt +++ b/recipes/libdwarf/all/test_package/CMakeLists.txt @@ -6,6 +6,6 @@ find_package(libdwarf REQUIRED) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE libdwarf::libdwarf) -if(NOT libdwarf_VERSION MATCHES "^[0-9]*$") - target_compile_definitions(${PROJECT_NAME} PRIVATE "LIBDWARF_NEW_STRUCTURE") +if(${libdwarf_VERSION} VERSION_LESS "0.9.1") + target_compile_definitions(${PROJECT_NAME} PRIVATE "LIBDWARF_NESTED_INCLUDE") endif() diff --git a/recipes/libdwarf/all/test_package/test_package.c b/recipes/libdwarf/all/test_package/test_package.c index 27d0d196b5a8d..287828193ab29 100644 --- a/recipes/libdwarf/all/test_package/test_package.c +++ b/recipes/libdwarf/all/test_package/test_package.c @@ -3,12 +3,12 @@ #include #include -#ifndef LIBDWARF_NEW_STRUCTURE - #include "dwarf.h" - #include "libdwarf.h" -#else +#ifdef LIBDWARF_NESTED_INCLUDE #include "libdwarf/dwarf.h" #include "libdwarf/libdwarf.h" +#else + #include "dwarf.h" + #include "libdwarf.h" #endif void example1(Dwarf_Die somedie) { diff --git a/recipes/libdwarf/config.yml b/recipes/libdwarf/config.yml index 2bad80aa2207b..b5a49fc99b335 100644 --- a/recipes/libdwarf/config.yml +++ b/recipes/libdwarf/config.yml @@ -1,9 +1,11 @@ versions: + "0.9.1": + folder: all + "0.9.0": + folder: all "0.8.0": folder: all "0.7.0": folder: all "0.5.0": folder: all - "20191104": - folder: all From f4213db268522332ad65ca7b7b6e550ba9e872a2 Mon Sep 17 00:00:00 2001 From: Rob Baily Date: Mon, 19 Feb 2024 08:47:48 -0500 Subject: [PATCH 079/108] (#22673) cli: new recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cli: new recipe * Ensure files have final endline * cli: new recipe * Ensure files have final endline * Remove share folder for package * Updated checks for minimum cpp and compiler versions * Add import for ConanInvalidConfiguration * Try Apple clang minimum version 12 * Try apple-clang compatibility at version 14 * Apply suggestions from code review Co-authored-by: Rubén Rincón Blanco * Set CMake generated names to lower case * add option for boost and asio Signed-off-by: Uilian Ries * Add test_package example using the with_asio option * Fix newline at end of file * Fix last line for example_complete.cpp * simplify recipe Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/cli/all/conandata.yml | 4 ++ recipes/cli/all/conanfile.py | 64 +++++++++++++++++++ recipes/cli/all/test_package/CMakeLists.txt | 8 +++ recipes/cli/all/test_package/conanfile.py | 29 +++++++++ recipes/cli/all/test_package/test_package.cpp | 22 +++++++ recipes/cli/config.yml | 3 + 6 files changed, 130 insertions(+) create mode 100644 recipes/cli/all/conandata.yml create mode 100644 recipes/cli/all/conanfile.py create mode 100644 recipes/cli/all/test_package/CMakeLists.txt create mode 100644 recipes/cli/all/test_package/conanfile.py create mode 100644 recipes/cli/all/test_package/test_package.cpp create mode 100644 recipes/cli/config.yml diff --git a/recipes/cli/all/conandata.yml b/recipes/cli/all/conandata.yml new file mode 100644 index 0000000000000..10682c56d384f --- /dev/null +++ b/recipes/cli/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.1.0": + url: "https://github.com/daniele77/cli/archive/refs/tags/v2.1.0.tar.gz" + sha256: "dfc9fc7c72a6cdfdf852d89f151699b57460ff49775a8ff27d2a69477649acf9" diff --git a/recipes/cli/all/conanfile.py b/recipes/cli/all/conanfile.py new file mode 100644 index 0000000000000..d36d374460adf --- /dev/null +++ b/recipes/cli/all/conanfile.py @@ -0,0 +1,64 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +import os + +class CLIConan(ConanFile): + name = "cli" + description = "A library for interactive command line interfaces in modern C++" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/daniele77/cli" + topics = "cli-interface", "cpp14", "no-dependencies", "header-only" + package_type = "header-library" + settings = "os", "compiler", "build_type", "arch" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "Visual Studio": "16", + "msvc": "192", + "apple-clang": "14", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/cli/all/test_package/CMakeLists.txt b/recipes/cli/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..532e9ff7fa4f7 --- /dev/null +++ b/recipes/cli/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(cli CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} cli::cli) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/cli/all/test_package/conanfile.py b/recipes/cli/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d55c28d73bebf --- /dev/null +++ b/recipes/cli/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain +from conan.tools.build import can_run + +class cliTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps" + + def requirements(self): + self.requires(self.tested_reference_str) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/cli/all/test_package/test_package.cpp b/recipes/cli/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..238aaf7e42157 --- /dev/null +++ b/recipes/cli/all/test_package/test_package.cpp @@ -0,0 +1,22 @@ +#include +#include + +using namespace cli; +using namespace std; + + +int main() +{ + auto rootMenu = make_unique< Menu >( "cli" ); + rootMenu -> Insert( + "hello", + [](std::ostream& out){ out << "Hello, world\n"; }, + "Print hello world" ); + + Cli cli( std::move(rootMenu) ); + cli.ExitAction( [](auto& out){ out << "Goodbye and thanks for all the fish.\n"; } ); + + CliFileSession input(cli); + + return 0; +} diff --git a/recipes/cli/config.yml b/recipes/cli/config.yml new file mode 100644 index 0000000000000..dfff490f9a9b6 --- /dev/null +++ b/recipes/cli/config.yml @@ -0,0 +1,3 @@ +versions: + "2.1.0": + folder: all From 64aba482ce1f61b7746b052373907c7d3a15aefd Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 19 Feb 2024 23:30:15 +0900 Subject: [PATCH 080/108] (#22764) libcoro: add version 0.11.1 * libcoro: add version 0.11 * relax compiler checks * update to version 0.11.1 Signed-off-by: Uilian Ries * require newer compilers Signed-off-by: Uilian Ries * update config Signed-off-by: Uilian Ries * Update recipes/libcoro/all/conanfile.py * fix library name on Windows Signed-off-by: Uilian Ries * some options are not available on Windows Signed-off-by: Uilian Ries * typo Signed-off-by: Uilian Ries * disable shared Signed-off-by: Uilian Ries * set CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * revert CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * manage shared option Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/libcoro/all/conandata.yml | 15 ++----- recipes/libcoro/all/conanfile.py | 42 +++++++++++++------ .../patches/0.10-0001-allow-shared-lib.patch | 13 ------ .../patches/0.7-0001-allow-shared-lib.patch | 9 ---- .../patches/0.8-0001-allow-shared-lib.patch | 13 ------ .../patches/0.9-0001-allow-shared-lib.patch | 13 ------ recipes/libcoro/config.yml | 2 + 7 files changed, 35 insertions(+), 72 deletions(-) delete mode 100644 recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch delete mode 100644 recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch delete mode 100644 recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch delete mode 100644 recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch diff --git a/recipes/libcoro/all/conandata.yml b/recipes/libcoro/all/conandata.yml index 2ae02b6941d0a..1587140b431f7 100644 --- a/recipes/libcoro/all/conandata.yml +++ b/recipes/libcoro/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.1": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.11.1.tar.gz" + sha256: "c7eb1bf133519ec0e0bc2e3e018ac4d1447a143e5e7385dab19204277d7c7671" "0.10": url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.10.tar.gz" sha256: "0e952e72012925b75910f80772f3642dac631644578dbbc0db4fee047badc745" @@ -13,17 +16,11 @@ sources: sha256: "ce1f3f1c4fa21b53d1cd195a29bd5a2313e53aa35637b402db04207d02316e51" patches: "0.10": - - patch_file: "patches/0.10-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.10-0002-disable-git-config.patch" patch_type: "official" patch_description: "Comment out invocation of git config command" patch_source: "https://github.com/jbaldwin/libcoro/pull/234" "0.9": - - patch_file: "patches/0.9-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.9-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" @@ -32,16 +29,10 @@ patches: patch_source: "https://github.com/jbaldwin/libcoro/pull/169" patch_description: "include std headers" "0.8": - - patch_file: "patches/0.8-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.8-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" "0.7": - - patch_file: "patches/0.7-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.7-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" diff --git a/recipes/libcoro/all/conanfile.py b/recipes/libcoro/all/conanfile.py index 7873b320afe48..60b120e4f9dc5 100644 --- a/recipes/libcoro/all/conanfile.py +++ b/recipes/libcoro/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd +from conan.tools.microsoft import is_msvc from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.scm import Version @@ -40,8 +41,12 @@ def _min_cppstd(self): @property def _minimum_compilers_version(self): return { - "gcc": "10.2.1", - } + "gcc": "10.2.1", + "clang": "16.0.0", + "apple-clang": "16", + "Visual Studio": "16", + "msvc": "192", + } def export_sources(self): export_conandata_patches(self) @@ -54,10 +59,15 @@ def config_options(self): if Version(self.version) < "0.9": del self.options.with_ssl del self.options.with_threading + if is_msvc(self) or self.settings.os == "Emscripten": + self.options.rm_safe("with_networking") + self.options.rm_safe("with_ssl") def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if Version(self.version) < "0.11": + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") @@ -71,10 +81,11 @@ def requirements(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") - if self.settings.compiler != "gcc": - raise ConanInvalidConfiguration(f"The Conan recipe {self.ref} only supports GCC for now. Contributions are welcome!") + if Version(self.version) < "0.10": + if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration(f"The Conan recipe {self.ref} only supports GCC for now. Contributions are welcome!") minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: @@ -82,6 +93,9 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) < "0.11" and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} Only supports shared linking for versions >=0.11") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -91,10 +105,14 @@ def generate(self): tc.variables["LIBCORO_BUILD_EXAMPLES"] = False if Version(self.version) >= "0.8": tc.variables["LIBCORO_EXTERNAL_DEPENDENCIES"] = True - tc.variables["LIBCORO_FEATURE_NETWORKING"] = self.options.with_networking + tc.variables["LIBCORO_FEATURE_NETWORKING"] = self.options.get_safe("with_networking") if Version(self.version) >= "0.9": tc.variables["LIBCORO_FEATURE_THREADING"] = self.options.with_threading - tc.variables["LIBCORO_FEATURE_SSL"] = self.options.with_ssl + tc.variables["LIBCORO_FEATURE_SSL"] = self.options.get_safe("with_ssl", False) + if Version(self.version) >= "0.11": + tc.variables["LIBCORO_RUN_GITCONFIG"] = False + tc.variables["LIBCORO_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["LIBCORO_FEATURE_TLS"] = self.options.get_safe("with_ssl", False) tc.generate() deps = CMakeDeps(self) deps.generate() @@ -115,16 +133,16 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "libcoro") self.cpp_info.set_property("cmake_target_name", "libcoro::libcoro") if Version(self.version) >= "0.8": - self.cpp_info.libs = ["coro"] + self.cpp_info.libs = ["libcoro"] if is_msvc(self) else ["coro"] else: self.cpp_info.libs = ["libcoro"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread", "m"] if Version(self.version) >= "0.9": - if self.options.with_networking: + if self.options.get_safe("with_networking"): self.cpp_info.defines.append("LIBCORO_FEATURE_NETWORKING") - if self.options.with_ssl: - self.cpp_info.defines.append("LIBCORO_FEATURE_SSL") + if self.options.get_safe("with_ssl"): + self.cpp_info.defines.extend(["LIBCORO_FEATURE_SSL", "LIBCORO_FEATURE_TLS"]) if self.options.with_threading: self.cpp_info.defines.append("LIBCORO_FEATURE_THREADING") diff --git a/recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch deleted file mode 100644 index 8eb0ed04c1cfc..0000000000000 --- a/recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b749c11..7398569 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -123,7 +123,7 @@ if(DEFINED EMSCRIPTEN) - add_link_options(-sEXIT_RUNTIME) - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC include) diff --git a/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch deleted file mode 100644 index 9c3ca8de19231..0000000000000 --- a/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -69,4 +69,4 @@ - ) - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) diff --git a/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch deleted file mode 100644 index 0481b258f7f9a..0000000000000 --- a/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f37206b..8221a5d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -91,7 +91,7 @@ if(LIBCORO_FEATURE_NETWORKING) - ) - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC inc) diff --git a/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch deleted file mode 100644 index 4838c6103aa0f..0000000000000 --- a/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ef0eea4..4c342e3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -110,7 +110,7 @@ if(LIBCORO_FEATURE_NETWORKING) - endif() - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC inc) diff --git a/recipes/libcoro/config.yml b/recipes/libcoro/config.yml index 5808152f9189f..a682e35c6d452 100644 --- a/recipes/libcoro/config.yml +++ b/recipes/libcoro/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.1": + folder: all "0.10": folder: all "0.9": From 539b155fd18e99d37e49aef333804e99a431d21a Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 19 Feb 2024 15:48:46 +0100 Subject: [PATCH 081/108] (#22777) aws-c-mqtt: update dependencies Due to #21033, we'll have to raise the aws-c-io dependency here as well. --- recipes/aws-c-mqtt/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/aws-c-mqtt/all/conanfile.py b/recipes/aws-c-mqtt/all/conanfile.py index d97246f605d3f..4740c4414b3ba 100644 --- a/recipes/aws-c-mqtt/all/conanfile.py +++ b/recipes/aws-c-mqtt/all/conanfile.py @@ -49,7 +49,7 @@ def requirements(self): else: self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.32", transitive_headers=True) + self.requires("aws-c-io/0.13.35", transitive_headers=True) self.requires("aws-c-http/0.7.14") def source(self): From 5ae630347b31512a7863704d4ee6b09ccbff35d8 Mon Sep 17 00:00:00 2001 From: Raziel Alphadios <64050682+RazielXYZ@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:08:50 +0200 Subject: [PATCH 082/108] (#22810) safe: new recipe --- recipes/safe/all/conandata.yml | 4 ++ recipes/safe/all/conanfile.py | 48 +++++++++++++++++++ recipes/safe/all/test_package/CMakeLists.txt | 8 ++++ recipes/safe/all/test_package/conanfile.py | 26 ++++++++++ .../safe/all/test_package/test_package.cpp | 12 +++++ recipes/safe/config.yml | 3 ++ 6 files changed, 101 insertions(+) create mode 100644 recipes/safe/all/conandata.yml create mode 100644 recipes/safe/all/conanfile.py create mode 100644 recipes/safe/all/test_package/CMakeLists.txt create mode 100644 recipes/safe/all/test_package/conanfile.py create mode 100644 recipes/safe/all/test_package/test_package.cpp create mode 100644 recipes/safe/config.yml diff --git a/recipes/safe/all/conandata.yml b/recipes/safe/all/conandata.yml new file mode 100644 index 0000000000000..31c393ec6520f --- /dev/null +++ b/recipes/safe/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.1": + url: "https://github.com/LouisCharlesC/safe/archive/v1.1.1.tar.gz" + sha256: "A6E161EAFC32AA522CD2CE1A5F95A3DF963C51263053089FC8F7A9765D054F00" diff --git a/recipes/safe/all/conanfile.py b/recipes/safe/all/conanfile.py new file mode 100644 index 0000000000000..c7c9d401cf1af --- /dev/null +++ b/recipes/safe/all/conanfile.py @@ -0,0 +1,48 @@ +from conan import ConanFile +from conan.tools.files import get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.51.1" + +class SafeConan(ConanFile): + name = "safe" + description = "Header only read and write locks for mutexes" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/LouisCharlesC/safe" + topics = ("multi-threading ", "lock", "guard", "raii", "thread-safety", "mutexes", "lock-guard", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/safe/all/test_package/CMakeLists.txt b/recipes/safe/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..13fdc6eda90ab --- /dev/null +++ b/recipes/safe/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(safe REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE safe::safe) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/safe/all/test_package/conanfile.py b/recipes/safe/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/safe/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/safe/all/test_package/test_package.cpp b/recipes/safe/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9286960794fc7 --- /dev/null +++ b/recipes/safe/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include "safe/safe.h" + +int main(void) { + safe::Safe safeValue; + + { + safe::WriteAccess> value(safeValue); + *value = 5; + } + + return 0; +} diff --git a/recipes/safe/config.yml b/recipes/safe/config.yml new file mode 100644 index 0000000000000..60d31991f5141 --- /dev/null +++ b/recipes/safe/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.1": + folder: all From 59508120c81c4d9fed03dbd4a41d871000c1b0bf Mon Sep 17 00:00:00 2001 From: Toni Neubert Date: Mon, 19 Feb 2024 16:28:30 +0100 Subject: [PATCH 083/108] (#22813) emio: add version 0.7.0 * add version 0.7.0 * fix license renaming issue --- recipes/emio/all/conandata.yml | 3 +++ recipes/emio/all/conanfile.py | 2 +- recipes/emio/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/emio/all/conandata.yml b/recipes/emio/all/conandata.yml index 9c81336117348..a9c48f24eeb27 100644 --- a/recipes/emio/all/conandata.yml +++ b/recipes/emio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/viatorus/emio/archive/0.7.0.tar.gz" + sha256: "1ef5304964eee109c13477f2d84822ee474612475049a377b59e33a5fe05d7eb" "0.6.1": url: "https://github.com/viatorus/emio/archive/0.6.1.tar.gz" sha256: "118bb67581d68b33d9764e016700014ad63b68520b5786c0d12036f33bcef0dc" diff --git a/recipes/emio/all/conanfile.py b/recipes/emio/all/conanfile.py index 8eb00bd9ec66b..7785d5a02da74 100644 --- a/recipes/emio/all/conanfile.py +++ b/recipes/emio/all/conanfile.py @@ -57,6 +57,6 @@ def source(self): destination=self.source_folder, strip_root=True) def package(self): - copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/emio/config.yml b/recipes/emio/config.yml index 01ed4761ab018..b957140535721 100644 --- a/recipes/emio/config.yml +++ b/recipes/emio/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.1": folder: all "0.6.0": From 135dc5908869bf3b521bdd86bd1f66062e435e8f Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:41:39 +0000 Subject: [PATCH 084/108] (#22819) [bot] Update authorized users list (2024-02-19) * Add/remove users to Access Request * Update .c3i/authorized_users.yml --------- Co-authored-by: conan-center-bot Co-authored-by: Uilian Ries --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 37b43973ce278..995fbb6e339b3 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1288,3 +1288,5 @@ authorized_users: - AlexanderBabansky - matthiasbuhl - cnicolaescu +- mmomtchev +- ChristianHeinigk From 25e0860a35cc17e929936431ba8e256008b9159b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 19 Feb 2024 18:05:15 +0200 Subject: [PATCH 085/108] (#21153) isl: migrate to Conan v2 * isl: migrate to Conan v2 Based on changes by @System-Arch in #14916. * isl: remove unnecessary comments * isl: add v0.26, use .xz * isl: cross-building on macOS is broken * isl: fix_apple_shared_install_name() --- recipes/isl/all/conandata.yml | 21 ++- recipes/isl/all/conanfile.py | 153 +++++++++--------- .../0.24-0001-fix-ac_test_cflags.patch | 11 ++ recipes/isl/all/test_package/CMakeLists.txt | 5 +- recipes/isl/all/test_package/conanfile.py | 19 ++- .../isl/all/test_v1_package/CMakeLists.txt | 8 + recipes/isl/all/test_v1_package/conanfile.py | 17 ++ recipes/isl/config.yml | 6 +- 8 files changed, 142 insertions(+), 98 deletions(-) create mode 100644 recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch create mode 100644 recipes/isl/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/isl/all/test_v1_package/conanfile.py diff --git a/recipes/isl/all/conandata.yml b/recipes/isl/all/conandata.yml index cf2c5f3fb54ee..525debaa9344b 100644 --- a/recipes/isl/all/conandata.yml +++ b/recipes/isl/all/conandata.yml @@ -1,10 +1,15 @@ sources: + "0.26": + url: "https://libisl.sourceforge.io/isl-0.26.tar.xz" + sha256: "a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504" + "0.25": + url: "https://libisl.sourceforge.io/isl-0.25.tar.xz" + sha256: "be7b210647ccadf90a2f0b000fca11a4d40546374a850db67adb32fad4b230d9" "0.24": - url: "https://libisl.sourceforge.io/isl-0.24.tar.gz" - sha256: "26e6e4d60ad59b3fff9948eb36743f0c874e124e410ef5bab930d0f546bc580d" - "0.23": - url: "https://libisl.sourceforge.io/isl-0.23.tar.gz" - sha256: "19e77cb562ab3da5a37f263208d6f902ae3a9d52c756bf6eb1a6b2f8a74b883c" - "0.22": - url: "https://libisl.sourceforge.io/isl-0.22.tar.gz" - sha256: "d0c6714e4427d3eb964388afe526a8e0f69687da7e944f1ad66ffa639923be46" + url: "https://libisl.sourceforge.io/isl-0.24.tar.xz" + sha256: "043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad" +patches: + "0.24": + - patch_file: "patches/0.24-0001-fix-ac_test_cflags.patch" + patch_description: "Fix ac_test_CFLAGS logic error" + patch_type: "portability" diff --git a/recipes/isl/all/conanfile.py b/recipes/isl/all/conanfile.py index 139d5fc0036f3..bd3795141c531 100644 --- a/recipes/isl/all/conanfile.py +++ b/recipes/isl/all/conanfile.py @@ -1,9 +1,14 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.files import copy, get, rm, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, check_min_vs, unix_path, is_msvc_static_runtime import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.58.0" class IslConan(ConanFile): @@ -13,23 +18,24 @@ class IslConan(ConanFile): license = "MIT" homepage = "https://libisl.sourceforge.io" url = "https://github.com/conan-io/conan-center-index" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "with_int": ["gmp", "imath", "imath-32"], + "autogen": [True, False], } default_options = { "shared": False, "fPIC": True, "with_int": "gmp", + "autogen": False, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -37,97 +43,86 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") def validate(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Cannot build shared isl library on Windows (due to libtool refusing to link to static/import libraries)") - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration("Apple M1 is not yet supported. Contributions are welcome") - if self.options.with_int != "gmp": - # FIXME: missing imath recipe - raise ConanInvalidConfiguration("imath is not (yet) available on cci") - if self.settings.compiler == "Visual Studio" and tools.Version(self.settings.compiler.version) < 16 and self.settings.compiler.runtime == "MDd": + if is_apple_os(self) and cross_building(self): + raise ConanInvalidConfiguration("Cross-building with Apple Clang is not supported yet") + if msvc_runtime_flag(self) == "MDd" and not check_min_vs(self, 192, raise_invalid=False): + # isl fails to link with this version of visual studio and MDd runtime: # gmp.lib(bdiv_dbm1c.obj) : fatal error LNK1318: Unexpected PDB error; OK (0) - raise ConanInvalidConfiguration("isl fails to link with this version of visual studio and MDd runtime") + raise ConanInvalidConfiguration("isl cannot be built with MDd runtime with MSVC < 192") def requirements(self): if self.options.with_int == "gmp": - self.requires("gmp/6.2.1") + self.requires("gmp/6.3.0") + elif self.options.with_int == "imath": + self.requires("imath/3.1.9") @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("automake/1.16.4") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if self.options.autogen: + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") + self.tool_requires("libtool/2.4.7") + + def package_id(self): + del self.info.options.autogen + + def layout(self): + basic_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - env = { - "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), - "CC": "{} cl -nologo -{}".format(tools.unix_path(self.deps_user_info["automake"].compile), self.settings.compiler.runtime), - "CXX": "{} cl -nologo -{}".format(tools.unix_path(self.deps_user_info["automake"].compile), self.settings.compiler.runtime), - "NM": "dumpbin -symbols", - "OBJDUMP": ":", - "RANLIB": ":", - "STRIP": ":", - } - with tools.environment_append(env): - yield - else: - yield - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.libs = [] - yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--with-int={}".format(self.options.with_int), - "--enable-portable-binary", - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - ] + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.configure_args.append(f'--with-int={self.options.with_int}') + tc.configure_args.append("--enable-portable-binary") if self.options.with_int == "gmp": - conf_args.extend([ - "--with-gmp=system", - "--with-gmp-prefix={}".format(self.deps_cpp_info["gmp"].rootpath.replace("\\", "/")), - ]) - if self.settings.compiler == "Visual Studio": - if tools.Version(self.settings.compiler.version) >= 15: - self._autotools.flags.append("-Zf") - if tools.Version(self.settings.compiler.version) >= 12: - self._autotools.flags.append("-FS") - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools + tc.configure_args.append("--with-gmp=system") + tc.configure_args.append(f'--with-gmp-prefix={unix_path(self, self.dependencies["gmp"].package_folder)}') + if is_msvc(self): + if check_min_vs(self, 191, raise_invalid=False): + tc.extra_cflags = ["-Zf"] + if check_min_vs(self, 180, raise_invalid=False): + tc.extra_cflags = ["-FS"] + if is_msvc(self) and self.version == "0.24" and not is_msvc_static_runtime(self): + # Pass BUILD flags to avoid confusion with GCC and mixing of runtime variants + tc.configure_args += ['CC_FOR_BUILD=cl -nologo', f'CFLAGS_FOR_BUILD=-{msvc_runtime_flag(self)}'] + env = tc.environment() + if is_msvc(self): + env.define("CC", "cl -nologo") + env.define("CXX", "cl -nologo") + tc.generate(env) def build(self): - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + if self.options.autogen: + apply_conandata_patches(self) # Currently, the only patch is for the autogen use case + self.run("./autogen.sh", cwd=self.source_folder) + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() - - os.unlink(os.path.join(os.path.join(self.package_folder, "lib", "libisl.la"))) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(os.path.join(self.package_folder, "lib"))) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "isl" + self.cpp_info.set_property("pkg_config_name", "isl") self.cpp_info.libs = ["isl"] diff --git a/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch b/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch new file mode 100644 index 0000000000000..ac347c50759b3 --- /dev/null +++ b/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch @@ -0,0 +1,11 @@ +--- m4/ax_cc_maxopt.m4 ++++ m4/ax_cc_maxopt.m4 +@@ -65,7 +65,7 @@ + acx_maxopt_portable=$withval, acx_maxopt_portable=no) + + # Try to determine "good" native compiler flags if none specified via CFLAGS +-if test "$ac_test_CFLAGS" != "set"; then ++if test "x$ac_test_CFLAGS" = "x"; then + CFLAGS="" + case $ax_cv_c_compiler_vendor in + dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host" diff --git a/recipes/isl/all/test_package/CMakeLists.txt b/recipes/isl/all/test_package/CMakeLists.txt index 3a403dc404b41..c40193c08604f 100644 --- a/recipes/isl/all/test_package/CMakeLists.txt +++ b/recipes/isl/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ cmake_minimum_required(VERSION 3.1) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(isl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE isl::isl) diff --git a/recipes/isl/all/test_package/conanfile.py b/recipes/isl/all/test_package/conanfile.py index bd7165a553cf4..7b760066c7165 100644 --- a/recipes/isl/all/test_package/conanfile.py +++ b/recipes/isl/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import cross_building import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not cross_building(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/isl/all/test_v1_package/CMakeLists.txt b/recipes/isl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..33e5f24630032 --- /dev/null +++ b/recipes/isl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(${PROJECT_NAME} ../test_package/test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/isl/all/test_v1_package/conanfile.py b/recipes/isl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/isl/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/isl/config.yml b/recipes/isl/config.yml index e0fa5e44a1f96..ae426ef703a32 100644 --- a/recipes/isl/config.yml +++ b/recipes/isl/config.yml @@ -1,7 +1,7 @@ versions: - "0.24": + "0.26": folder: "all" - "0.23": + "0.25": folder: "all" - "0.22": + "0.24": folder: "all" From b7618e9570ef6410d13e3b67843074ac6c727895 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 01:28:54 +0900 Subject: [PATCH 086/108] (#22799) sfl: add version 1.2.4 --- recipes/sfl/all/conandata.yml | 3 +++ recipes/sfl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml index 78138456b199b..cc5806fe1937d 100644 --- a/recipes/sfl/all/conandata.yml +++ b/recipes/sfl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.4": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.4.tar.gz" + sha256: "e24d4adb1aff638e17ef49841881992a1020dc951e4e9721b81b76d44ef89f5b" "1.2.3": url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.3.tar.gz" sha256: "6111a81b5dcad091c5c8a420d127c1bbfb06f8fbb7d915e6a30b4b7d2d67db71" diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml index 81ff4bc37c872..aec9153a51c8d 100644 --- a/recipes/sfl/config.yml +++ b/recipes/sfl/config.yml @@ -1,3 +1,5 @@ versions: + "1.2.4": + folder: "all" "1.2.3": folder: "all" From c723e367a32bdafd5b2dac5173578c0994365a3f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:49:29 +0100 Subject: [PATCH 087/108] (#22804) tinyply: do not remove fPIC option if static * do not remove fPIC option if static * add libm to system libs --- recipes/tinyply/all/conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/tinyply/all/conanfile.py b/recipes/tinyply/all/conanfile.py index cd8d6bcce424f..97b1320f978d5 100644 --- a/recipes/tinyply/all/conanfile.py +++ b/recipes/tinyply/all/conanfile.py @@ -31,7 +31,8 @@ def config_options(self): del self.options.fPIC def configure(self): - self.options.rm_safe("fPIC") + if self.options.shared: + self.options.rm_safe("fPIC") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -73,3 +74,5 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tinyply::tinyply") self.cpp_info.set_property("pkg_config_name", "tinyply") self.cpp_info.libs = collect_libs(self) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") From 8f3188b13b7c9f110c31975355fe4793cf737cb7 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 17:27:44 +0900 Subject: [PATCH 088/108] (#22825) daw_header_libraries: add version 2.101.0 --- recipes/daw_header_libraries/all/conandata.yml | 3 +++ recipes/daw_header_libraries/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml index e2ae0afea2244..da4d268e47a7d 100644 --- a/recipes/daw_header_libraries/all/conandata.yml +++ b/recipes/daw_header_libraries/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.101.0": + url: "https://github.com/beached/header_libraries/archive/v2.101.0.tar.gz" + sha256: "468b3a40b90295f1da8eb79ae5723909269c020e7e8bf3d93d3f4fac7c35195b" "2.98.5": url: "https://github.com/beached/header_libraries/archive/v2.98.5.tar.gz" sha256: "2d548a6f7a860917e2f743ee75e82733cbf0d3720b7296da023c5a17a9010c9a" diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml index a97facd0bf9ff..209a906c305c7 100644 --- a/recipes/daw_header_libraries/config.yml +++ b/recipes/daw_header_libraries/config.yml @@ -1,4 +1,6 @@ versions: + "2.101.0": + folder: all "2.98.5": folder: all "2.97.0": From 106c11a55444e15822572a0f0c351087ade48b2d Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Tue, 20 Feb 2024 02:47:59 -0600 Subject: [PATCH 089/108] (#22655) cpptrace: Add v0.4.0 * Prepare for 0.4.0 * Set CPPTRACE_USE_EXTERNAL_ZSTD * Attempt to fix build issue * Try a printbug... * Ok I think actually fixed this time * Fix endline issue * rc2 * Fix test package * oops * Now ready to go I think * Use libdwarf 0.9.1 * Use exact versions * Patch zstd handling --- recipes/cpptrace/all/conandata.yml | 13 ++++ recipes/cpptrace/all/conanfile.py | 8 ++- .../patches/0.4.0/0001-libdwarf_path.patch | 12 ++++ .../all/patches/0.4.0/0002-zstd.patch | 72 +++++++++++++++++++ .../cpptrace/all/test_package/CMakeLists.txt | 4 ++ .../all/test_package/test_package.cpp | 8 +++ recipes/cpptrace/config.yml | 2 + 7 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch create mode 100644 recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index d032d0a5a873d..b9844d75c4190 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "0.4.0": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.0.tar.gz" + sha256: "eef368f5bed2d85c976ea90b325e4c9bfc1b9618cbbfa15bf088adc8fa98ff89" "0.3.1": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.1.tar.gz" @@ -13,6 +17,15 @@ sources: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" sha256: "3184f404c61b6b8ba6fe7c64fc40d1c3d6d87df59bcacf1845d846101bc22f9a" patches: + "0.4.0": + - patch_file: "patches/0.4.0/0001-libdwarf_path.patch" + patch_type: "conan" + patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/a1624238000c794243e20801dc2b35b2f847d492" + patch_description: "Use new libdwarf header placement" + - patch_file: "patches/0.4.0/0002-zstd.patch" + patch_type: "conan" + patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/b7d14bc952111df973268c76133bb8ad99afdeb0" + patch_description: "Zstd is handled by libdwarf" "0.3.0": - patch_file: "patches/0.3.0/0001-cpptrace_export.patch" patch_type: "bugfix" diff --git a/recipes/cpptrace/all/conanfile.py b/recipes/cpptrace/all/conanfile.py index f96b276006f6d..f0aee2a68a632 100644 --- a/recipes/cpptrace/all/conanfile.py +++ b/recipes/cpptrace/all/conanfile.py @@ -43,7 +43,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libdwarf/0.8.0") + if Version(self.version) >= Version("0.4.0"): + self.requires("libdwarf/0.9.1") + else: + self.requires("libdwarf/0.8.0") def validate(self): if self.settings.compiler.cppstd: @@ -105,6 +108,9 @@ def package_info(self): if self.settings.os == "Windows": self.cpp_info.system_libs.append("dbghelp") + if not self.options.shared: + self.cpp_info.defines.append("CPPTRACE_STATIC_DEFINE") + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "CPPTRACE" self.cpp_info.filenames["cmake_find_package_multi"] = "cpptrace" diff --git a/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch b/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch new file mode 100644 index 0000000000000..4561234caabeb --- /dev/null +++ b/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e077cf8..2f848dd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -404,7 +404,6 @@ if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) + endif() + if(CPPTRACE_CONAN) + target_link_libraries(${target_name} PRIVATE libdwarf::libdwarf) +- target_compile_definitions(${target_name} PRIVATE CPPTRACE_USE_NESTED_LIBDWARF_HEADER_PATH) + elseif(CPPTRACE_VCPKG) + target_link_libraries(${target_name} PRIVATE libdwarf::dwarf) + elseif(CPPTRACE_USE_EXTERNAL_LIBDWARF) diff --git a/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch b/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch new file mode 100644 index 0000000000000..97ccd388d4128 --- /dev/null +++ b/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch @@ -0,0 +1,72 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2f848dd..8f3ec74 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -338,40 +338,39 @@ endif() + + if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) + target_compile_definitions(${target_name} PUBLIC CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) +- # First, dependencies: Zstd and zlib (currently relying on system zlib) +- if(CPPTRACE_USE_EXTERNAL_ZSTD) +- find_package(zstd) +- else() +- include(FetchContent) +- cmake_policy(SET CMP0074 NEW) +- FetchContent_Declare( +- zstd +- GIT_REPOSITORY https://github.com/facebook/zstd.git +- GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 +- GIT_SHALLOW 1 +- SOURCE_SUBDIR build/cmake +- ) +- # FetchContent_MakeAvailable(zstd) +- FetchContent_GetProperties(zstd) +- if(NOT zstd_POPULATED) +- FetchContent_Populate(zstd) +- set(ZSTD_BUILD_PROGRAMS OFF) +- set(ZSTD_BUILD_CONTRIB OFF) +- set(ZSTD_BUILD_TESTS OFF) +- set(ZSTD_BUILD_STATIC ON) +- set(ZSTD_BUILD_SHARED OFF) +- set(ZSTD_LEGACY_SUPPORT OFF) +- add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") +- endif() +- endif() +- # Libdwarf itself + if(CPPTRACE_USE_EXTERNAL_LIBDWARF) + find_package(libdwarf REQUIRED) + else() ++ include(FetchContent) ++ # First, dependencies: Zstd and zlib (currently relying on system zlib) ++ if(CPPTRACE_USE_EXTERNAL_ZSTD) ++ find_package(zstd) ++ else() ++ cmake_policy(SET CMP0074 NEW) ++ FetchContent_Declare( ++ zstd ++ GIT_REPOSITORY https://github.com/facebook/zstd.git ++ GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 ++ GIT_SHALLOW 1 ++ SOURCE_SUBDIR build/cmake ++ ) ++ # FetchContent_MakeAvailable(zstd) ++ FetchContent_GetProperties(zstd) ++ if(NOT zstd_POPULATED) ++ FetchContent_Populate(zstd) ++ set(ZSTD_BUILD_PROGRAMS OFF) ++ set(ZSTD_BUILD_CONTRIB OFF) ++ set(ZSTD_BUILD_TESTS OFF) ++ set(ZSTD_BUILD_STATIC ON) ++ set(ZSTD_BUILD_SHARED OFF) ++ set(ZSTD_LEGACY_SUPPORT OFF) ++ add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") ++ endif() ++ endif() ++ # Libdwarf itself + set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + # set(PIC_ALWAYS TRUE) + # set(BUILD_DWARFDUMP FALSE) +- include(FetchContent) + FetchContent_Declare( + libdwarf + # GIT_REPOSITORY https://github.com/davea42/libdwarf-code.git diff --git a/recipes/cpptrace/all/test_package/CMakeLists.txt b/recipes/cpptrace/all/test_package/CMakeLists.txt index 413751877cee8..b0651acbdbd44 100644 --- a/recipes/cpptrace/all/test_package/CMakeLists.txt +++ b/recipes/cpptrace/all/test_package/CMakeLists.txt @@ -8,3 +8,7 @@ add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE cpptrace::cpptrace) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(${cpptrace_VERSION} VERSION_GREATER_EQUAL "0.4.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE CTRACE) +endif() diff --git a/recipes/cpptrace/all/test_package/test_package.cpp b/recipes/cpptrace/all/test_package/test_package.cpp index bc640e59ffc24..e663d6aea698f 100644 --- a/recipes/cpptrace/all/test_package/test_package.cpp +++ b/recipes/cpptrace/all/test_package/test_package.cpp @@ -1,9 +1,17 @@ #include #include +#include #include +#ifdef CTRACE +#include +#endif int main() { cpptrace::generate_trace().print(); + + #ifdef CTRACE + ctrace_stacktrace c_trace = ctrace_generate_trace(0, SIZE_MAX); + #endif return EXIT_SUCCESS; } diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml index c4a25b816da1e..c04879bd49824 100644 --- a/recipes/cpptrace/config.yml +++ b/recipes/cpptrace/config.yml @@ -1,5 +1,7 @@ versions: # Newer versions at the top + "0.4.0": + folder: all "0.3.1": folder: all "0.3.0": From 86e9a819a672f9ed7490c111e9f7b1e83e626c29 Mon Sep 17 00:00:00 2001 From: tt4g <45120617+tt4g@users.noreply.github.com> Date: Tue, 20 Feb 2024 18:07:50 +0900 Subject: [PATCH 090/108] (#22814) libpqxx: add version 7.9.0 --- recipes/libpqxx/all/conandata.yml | 7 +++++++ recipes/libpqxx/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index dcbdf0b15a551..4d1617ceb885b 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.9.0": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.0.tar.gz" + sha256: "a1fafd5f6455f6c66241fca1f35f5cb603251580b99f9a0cf1b5d0a586006f16" "7.8.1": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.8.1.tar.gz" sha256: "0f4c0762de45a415c9fd7357ce508666fa88b9a4a463f5fb76c235bc80dd6a84" @@ -24,6 +27,10 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.9.0": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.8.1": - patch_file: "patches/0001-cmake-fix-module.patch" patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index 9d72f7f742ccb..4c8b35797bd1a 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.9.0": + folder: all "7.8.1": folder: all "7.8.0": From bcf400f4d7c42b564cec10cbd92aa37741ec154f Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 18:27:45 +0900 Subject: [PATCH 091/108] (#22815) highway: add version 1.1.0 --- recipes/highway/all/conandata.yml | 3 +++ recipes/highway/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/highway/all/conandata.yml b/recipes/highway/all/conandata.yml index 710781f517c65..959f287f753da 100644 --- a/recipes/highway/all/conandata.yml +++ b/recipes/highway/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/google/highway/archive/1.1.0.tar.gz" + sha256: "354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9" "1.0.7": url: "https://github.com/google/highway/archive/1.0.7.tar.gz" sha256: "5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5" diff --git a/recipes/highway/config.yml b/recipes/highway/config.yml index 51114d87501db..1af21a7852ddb 100644 --- a/recipes/highway/config.yml +++ b/recipes/highway/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.7": folder: all "1.0.6": From 516fc44ea0120b66c6ec50ea54888c3af70a6983 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 18:47:53 +0900 Subject: [PATCH 092/108] (#22826) scnlib: add version 2.0.2 --- recipes/scnlib/all/conandata.yml | 7 +++++++ recipes/scnlib/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/scnlib/all/conandata.yml b/recipes/scnlib/all/conandata.yml index 959e4c6aa3f22..6655f8d077d01 100644 --- a/recipes/scnlib/all/conandata.yml +++ b/recipes/scnlib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.2": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.2.tar.gz" + sha256: "a485076b8710576cf05fbc086d39499d16804575c0660b0dfaeeaf7823660a17" "2.0.1": url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.1.tar.gz" sha256: "f399d1b1f36f5d53a2d63fd2974797ab8f3f7e69c424d9661253830cb793b72e" @@ -15,6 +18,10 @@ sources: url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.0.tar.gz" sha256: "5b8333e522206c2a74e57a9c9544c4fe4e7858cfe93e216905b463eaf91af5fe" patches: + "2.0.2": + - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" + patch_description: "remove re2 version on find_package" + patch_type: "portability" "2.0.1": - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" patch_description: "remove re2 version on find_package" diff --git a/recipes/scnlib/config.yml b/recipes/scnlib/config.yml index 8c5c4f8a7d9ec..9f31088bdf1c3 100644 --- a/recipes/scnlib/config.yml +++ b/recipes/scnlib/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.2": + folder: all "2.0.1": folder: all "2.0.0": From 99ebdafc60a6811e5ed63b7c5b4ac9ece9b37fec Mon Sep 17 00:00:00 2001 From: ViktarHasiul231862 <36881808+ViktarHasiul231862@users.noreply.github.com> Date: Tue, 20 Feb 2024 12:02:56 +0100 Subject: [PATCH 093/108] (#18009) Allow to set ENABLE_HARU and WT_RASTERIMAGE_IMPLEMENTATION * Allow to set ENABLE_HARU and WT_RASTERIMAGE_IMPLEMENTATION * add libharu to requirements * set HARU_PREFIX and haru package_info --- recipes/wt/all/conanfile.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index fc0eb757303bd..f52c69a8dfbb5 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -32,6 +32,8 @@ class WtConan(ConanFile): "with_dbo": [True, False], "with_opengl": [True, False], "with_unwind": [True, False], + "with_haru": [True, False], + "raster_image": ["none", "Direct2D", "GraphicsMagick"], "no_std_locale": [True, False], "no_std_wstring": [True, False], "multi_threaded": [True, False], @@ -51,6 +53,8 @@ class WtConan(ConanFile): "with_dbo": True, "with_opengl": False, "with_unwind": True, + "with_haru": False, + "raster_image": "none", "no_std_locale": False, "no_std_wstring": False, "multi_threaded": True, @@ -112,7 +116,9 @@ def requirements(self): self.requires("odbc/2.3.11") if self.options.get_safe("with_unwind"): self.requires("libunwind/1.7.2") - + if self.options.with_haru: + self.requires("libharu/2.4.3") + def validate(self): miss_boost_required_comp = any(self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) for boost_comp in self._required_boost_components) @@ -121,6 +127,8 @@ def validate(self): f"{self.ref} requires non header-only boost with these components: " f"{', '.join(self._required_boost_components)}" ) + if self.options.get_safe("raster_image", "none") == "Direct2D" and self.settings.os != "Windows": + raise ConanInvalidConfiguration("Direct2D is supported only on Windows.") # FIXME: https://redmine.emweb.be/issues/12073w if conan_version.major == 2 and Version(self.version) == "4.10.1" and is_msvc(self): @@ -178,7 +186,7 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTS"] = False tc.variables["ENABLE_SSL"] = self.options.with_ssl - tc.variables["ENABLE_HARU"] = False + tc.variables["ENABLE_HARU"] = self.options.with_haru tc.variables["ENABLE_PANGO"] = False tc.variables["ENABLE_SQLITE"] = self.options.get_safe("with_sqlite", False) tc.variables["ENABLE_POSTGRES"] = self.options.get_safe("with_postgres", False) @@ -191,6 +199,7 @@ def generate(self): tc.variables["ENABLE_LIBWTDBO"] = self.options.with_dbo tc.variables["ENABLE_OPENGL"] = self.options.with_opengl tc.variables["ENABLE_UNWIND"] = self.options.get_safe("with_unwind", False) + tc.variables["WT_WRASTERIMAGE_IMPLEMENTATION"] = self.options.get_safe("raster_image", "none") tc.variables["WT_NO_STD_LOCALE"] = self.options.no_std_locale tc.variables["WT_NO_STD_WSTRING"] = self.options.no_std_wstring tc.variables["MULTI_THREADED"] = self.options.multi_threaded @@ -227,6 +236,8 @@ def generate(self): tc.variables["ODBC_LIBRARIES"] = self._cmakify_path_list(self._find_libraries("odbc")) tc.variables["ODBC_INCLUDE"] = self._cmakify_path_list(self.dependencies["odbc"].cpp_info.aggregated_components().includedirs) tc.variables["ODBC_FOUND"] = True + if self.options.with_haru: + tc.variables["HARU_PREFIX"] = self._cmakify_path_list(self.dependencies["libharu"].package_folder) if self.options.get_safe("with_unwind"): tc.variables["UNWIND_PREFIX"] = self._cmakify_path_list([self.dependencies["libunwind"].package_folder]) if self.settings.os == "Windows": @@ -306,6 +317,8 @@ def package_info(self): self.cpp_info.components["wtmain"].requires.append("openssl::openssl") if self.options.get_safe("with_unwind"): self.cpp_info.components["wtmain"].requires.append("libunwind::libunwind") + if self.options.with_haru: + self.cpp_info.components["wtmain"].requires.append("libharu::libharu") # wttest if self.options.with_test: From 3fd13921873e57fb64a6d17c5f607f7e76f444d2 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 20:27:58 +0900 Subject: [PATCH 094/108] (#22729) uwebsockets: add version 20.60.0, remove older versions * uwebsockets: add version 20.59.0, remove older versions * add LANGUAGES in CMakeLists.txt * update 20.60.0 --- recipes/uwebsockets/all/conandata.yml | 18 +++--------------- recipes/uwebsockets/all/conanfile.py | 4 +--- .../all/test_package/CMakeLists.txt | 2 +- recipes/uwebsockets/config.yml | 12 ++---------- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index 45a3d889c4355..cb3f534499ced 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.60.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.60.0.tar.gz" + sha256: "eb72223768f93d40038181653ee5b59a53736448a6ff4e8924fd56b2fcdc00db" "20.58.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.58.0.tar.gz" sha256: "f71ca310cc5c39b12f56db1cf85727ee4d0f03fdf019a9e14ef4ba08addc6077" @@ -14,21 +17,6 @@ sources: "20.53.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.53.0.tar.gz" sha256: "324b857e787a472bd258aaa66f5ceeac6b01ebc41bbb423fff71559d72872783" - "20.51.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.51.0.tar.gz" - sha256: "6794e7895eb8cc182024a0ae482a581eaa82f55f7cca53ae88b30738449f3cb9" - "20.49.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.49.0.tar.gz" - sha256: "c596d6f63554a42397a86233aaa47883db1cad2a231ad8608dbaea165c0910b5" - "20.48.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.48.0.tar.gz" - sha256: "d7455bbbf9829b3960d0478dd36ed0eba82847c4fc801416aaf89ccb7f4dfb85" - "20.47.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.47.0.tar.gz" - sha256: "00641b7cd2ffadd2c505e2a83a2e32bf342f01c2538bf7470f655e707adde31a" - "20.45.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.45.0.tar.gz" - sha256: "db7599e9eac0c18b76740e7c391663652e0d7188b992a1a5a8dc28f347f483ec" "19.3.0": url: "https://github.com/uNetworking/uWebSockets/archive/v19.3.0.tar.gz" sha256: "6f709b4e5fe053a94a952da93c07c919b36bcb8c838c69067560ae85f97c5621" diff --git a/recipes/uwebsockets/all/conanfile.py b/recipes/uwebsockets/all/conanfile.py index 374ab9a0e5e74..27af62e1db549 100644 --- a/recipes/uwebsockets/all/conanfile.py +++ b/recipes/uwebsockets/all/conanfile.py @@ -56,9 +56,7 @@ def requirements(self): self.requires("libdeflate/1.19") if Version(self.version) > "20.17.0": - self.requires("usockets/0.8.6") - elif Version(self.version) >= "20.15.0": - self.requires("usockets/0.8.2") + self.requires("usockets/0.8.8") elif Version(self.version) >= "19.0.0": self.requires("usockets/0.8.1") else: diff --git a/recipes/uwebsockets/all/test_package/CMakeLists.txt b/recipes/uwebsockets/all/test_package/CMakeLists.txt index 38145240aeafa..4d46e640ceb5a 100644 --- a/recipes/uwebsockets/all/test_package/CMakeLists.txt +++ b/recipes/uwebsockets/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(test_package) +project(test_package LANGUAGES CXX) find_package(uwebsockets REQUIRED CONFIG) diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index a0a20412a5302..fd6362a846ec1 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,4 +1,6 @@ versions: + "20.60.0": + folder: all "20.58.0": folder: all "20.57.0": @@ -9,16 +11,6 @@ versions: folder: all "20.53.0": folder: all - "20.51.0": - folder: all - "20.49.0": - folder: all - "20.48.0": - folder: all - "20.47.0": - folder: all - "20.45.0": - folder: all "19.3.0": folder: all "18.3.0": From a1c6c89490c59f5d1b7a7dec0ebf8fa125128283 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 20 Feb 2024 15:23:46 +0200 Subject: [PATCH 095/108] (#19298) gdal: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gdal: migrate to Conan v2 * gdal/post_3.5.0: bump deps * gdal/post_3.5.0: propagate libjpeg dependency option in graph * gdal/post_3.5.0: migrate to Conan v2, WIP * gdal/post_3.5.0: tidy * gdal/post_3.5.0: adapt ConanFindPackage.cmake to make use of deps.set_properties() for renames * gdal/post_3.5.0: drop v3.5.1 * gdal/post_3.5.0: fix external json-c not being used * gdal/post_3.5.0: update v3.7.0, replace gdal_target_link_libraries everywhere * gdal/post_3.5.0: always use zlib * gdal/post_3.5.0: fix OpenEXR, HDF4, Arrow support * gdal/post_3.5.0: more deps fixes * gdal/post_3.5.0: add libarchive support * gdal/post_3.5.0: add libjxl support * gdal/post_3.5.0: add lerc support * gdal/post_3.5.0: add basisu support * gdal/post_3.5.0: add LZMA support * gdal/post_3.5.0: add pdfium support * gdal/post_3.5.0: add rasterlite2 support * gdal/post_3.5.0: add missing GDAL_USE_*_INTERNAL vars * gdal/post_3.5.0: did not mean to enable rasterlite2 by default * gdal/post_3.5.0: fix rasterlite2 issue * gdal/post_3.5.0: add spatialite support * gdal/post_3.5.0: add external shapelib support * gdal/post_3.5.0: fix typo * gdal/post_3.5.0: make libtiff a required dependency GDAL always requires either an external or internal version of it, so might as well always use the non-vendored one. * gdal/post_3.5.0: make internal-only deps configurable, don't use external shapelib * gdal/post_3.5.0: ignore deprecated options in package_id * gdal/post_3.5.0: bump deps * gdal/post_3.5.0: merge and sort external/internal cmake settings * gdal/post_3.5.0: set GDAL_SET_INSTALL_RELATIVE_RPATH=True * gdal/post_3.5.0: add with_publicdecompwt option * gdal/post_3.5.0: set all recommended and required options to True * gdal/post_3.5.0: proj is not really an optional dependency * gdal/post_3.5.0: separate commercial libs in pkg list * gdal/post_3.5.0: add v3.7.1, simplify patches * gdal/post_3.5.0: downgrade libpq * gdal/post_3.5.0: configure all available GDAL_USE_* variables * gdal/post_3.5.0: prevent any accidental use of system libs * gdal/post_3.5.0: add QUIET to find_package2() * gdal/post_3.5.0: fix libjpeg-turbo support * gdal/post_3.5.0: fix jxl_threads support * gdal: bump deps * gdal: fix shared builds Reverted back to using gdal_target_link_libraries() and fixed a number of issues caused by recursive CMakeDeps targets. * gdal: use version ranges for libcurl and zlib * gdal: fix v5.3.2 patch * gdal: fix includes not being propagated correctly * gdal: Conan v1 issue * gdal: fix linter warnings * gdal: fix patch issue * gdal: bump to 3.7.2 * gdal/post_3.5.0: bump deps * gdal/post_3.5.0: add missing system libs * gdal: add v3.8.0, v3.7.3, v3.5.3, drop old versions * gdal: bump deps * gdal: disable pdfium * gdal: update config.yml * gdal: fix failing compilation checks on MSVC * gdal: downgrade sqlite3 for proj * gdal: fix hdf5 check * gdal: add brunsli support * gdal: add opencl support * gdal: add tiledb * gdal: add ecw support * gdal: bump sqlite3 dependency * gdal: fix brunsli option * gdal: fix gdal data not being packaged Fixes #15660. * gdal: bump deps * gdal: bump to v3.8.1 * gdal: improve patching * gdal: disable libiconv on macOS * gdal: drop ineffective libjpeg-turbo propagation * gdal: bump deps * gdal: add parquet support * gdal: avoid the use of cache_variables * gdal: configure ArrowDataset correctly * gdal: fix ArrowDataset support by version * gdal: fix arrow target name on 3.5 * gdal: disable arrow for v3.5 * gdal: bump to v3.8.2 * gdal: bump arrow * gdal: further mark proprietary deps as such * gdal: add libaec support * gdal: bump proj Co-authored-by: Matthieu Darbois * gdal: add a workaround for iconv() incompatibilities * gdal: fix v3.5.3 URL and related patch * gdal: re-enable libiconv for apple-clang * gdal: add short comments for deprecated options * gdal: libiconv patches can be avoided * gdal: revert 3.5.3 to v3.5.2 due to patching issues * gdal: split two unrelated patches * gdal: fix mistake in patch splitting * gdal: prevent the use of system libs better * gdal: simplify 2-allow-cycles-in-cmake-targets.patch * gdal: bump v3.5.2 -> v3.5.3 * gdal: drop unused import * gdal: bump 3.8.2 -> 3.8.3 * gdal: bump deps * gdal: enable Armadillo * gdal: bump deps * gdal: fix a v3.5.3 CMake bug * gdal: add CMAKE_TRY_COMPILE_CONFIGURATION for try_compile() * Add deprecation warning message * Do not set json-c include folder * fix missing if condition --------- Co-authored-by: Matthieu Darbois Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/gdal/config.yml | 6 +- recipes/gdal/post_3.5.0/CMakeLists.txt | 105 +- .../post_3.5.0/cmake/ConanFindPackage.cmake | 48 + recipes/gdal/post_3.5.0/conandata.yml | 57 +- recipes/gdal/post_3.5.0/conanfile.py | 1207 ++++++++--------- .../3.5.1/0-replace-find-package.patch | 266 ---- .../3.5.2/0-replace-find-package.patch | 266 ---- .../3.5.3/0-replace-find-package.patch | 74 + .../1-do-not-force-private-linking.patch | 20 + .../2-allow-cycles-in-cmake-targets.patch | 22 + .../3.7.0/0-replace-find-package.patch | 282 ---- .../3.7.3/0-replace-find-package.patch | 64 + .../1-do-not-force-private-linking.patch | 20 + .../3.8.1/0-replace-find-package.patch | 52 + .../post_3.5.0/test_package/CMakeLists.txt | 7 +- .../gdal/post_3.5.0/test_package/conanfile.py | 33 +- .../post_3.5.0/test_v1_package/CMakeLists.txt | 8 + .../post_3.5.0/test_v1_package/conanfile.py | 23 + 18 files changed, 960 insertions(+), 1600 deletions(-) create mode 100644 recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake delete mode 100644 recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch delete mode 100644 recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch delete mode 100644 recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt create mode 100644 recipes/gdal/post_3.5.0/test_v1_package/conanfile.py diff --git a/recipes/gdal/config.yml b/recipes/gdal/config.yml index a2ce278d92965..a7240af75cc2e 100644 --- a/recipes/gdal/config.yml +++ b/recipes/gdal/config.yml @@ -1,9 +1,9 @@ versions: - "3.7.0": + "3.8.3": folder: "post_3.5.0" - "3.5.2": + "3.7.3": folder: "post_3.5.0" - "3.5.1": + "3.5.3": folder: "post_3.5.0" "3.4.3": folder: "pre_3.5.0" diff --git a/recipes/gdal/post_3.5.0/CMakeLists.txt b/recipes/gdal/post_3.5.0/CMakeLists.txt index 7c7f67a48db89..1a526ad3ffa0e 100644 --- a/recipes/gdal/post_3.5.0/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/CMakeLists.txt @@ -1,50 +1,7 @@ cmake_minimum_required(VERSION 3.15) project(gdal_cmake_wrapper) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -include(CMakePushCheckState) - - -if (${GDAL_USE_POPPLER}) - find_package(poppler) - set(Poppler_VERSION_STRING ${poppler_VERSION}) - add_library(Poppler::Poppler ALIAS poppler::libpoppler) -endif() - -file(GLOB CONAN_GENERATED_CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Find*.cmake") -foreach(CMAKE_FILE ${CONAN_GENERATED_CMAKE_FILES}) - include(${CMAKE_FILE}) -endforeach() - -if (${GDAL_USE_ARROW}) - find_package(Arrow REQUIRED) - add_library(arrow_shared ALIAS arrow::arrow) -endif() - -if (${GDAL_USE_CRYPTOPP}) - find_package(cryptopp REQUIRED) - add_library(CRYPTOPP::CRYPTOPP ALIAS ${TARGET_FOR_CRYPTOPP}) -endif() - -if (${GDAL_USE_DEFLATE}) - find_package(libdeflate REQUIRED) - add_library(Deflate::Deflate ALIAS ${TARGET_FOR_DEFLATE}) -endif() - -if (${GDAL_USE_LZ4}) - find_package(lz4 REQUIRED) - add_library(LZ4::LZ4 ALIAS lz4::lz4) -endif() - -if (${GDAL_USE_BLOSC}) - find_package(c-blosc REQUIRED) - add_library(Blosc::Blosc ALIAS c-blosc::c-blosc) -endif() - -if (${GDAL_USE_OPENEXR}) +if (GDAL_USE_OPENEXR) find_package(Imath REQUIRED) find_package(OpenEXR REQUIRED) add_library(OpenEXR::IlmImf ALIAS OpenEXR::IlmThread) @@ -56,62 +13,4 @@ if (${GDAL_USE_OPENEXR}) target_include_directories(OpenEXR::OpenEXR INTERFACE ${OpenEXR_INCLUDE_DIR}) endif() -if (${GDAL_USE_FREEXL}) - find_package(freexl REQUIRED) - add_library(FREEXL::freexl ALIAS freexl::freexl) -endif() - -if (${GDAL_USE_OPENJPEG}) - add_library(OPENJPEG::OpenJPEG ALIAS OpenJPEG::OpenJPEG) -endif() - -if (${GDAL_USE_GIF}) - find_package(GIF REQUIRED) -endif() - -if (${GDAL_USE_CFITSIO}) - find_package(cfitsio) - add_library(CFITSIO::CFITSIO ALIAS cfitsio::cfitsio) -endif() - -if (${GDAL_USE_SQLITE3}) - find_package(SQLite3) -endif() - -if (${GDAL_USE_LIBXML2}) - find_package(LibXml2) -endif() - -if (${GDAL_USE_POSTGRESQL}) - find_package(PostgreSQL) - add_library(PostgreSQL::PostgreSQL ALIAS PostgreSQL::pq) -endif() - -if (${GDAL_USE_HDF5}) - find_package(HDF5) - set(HDF5_C_LIBRARIES HDF5::C) -endif() - -if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "libmysqlclient") - find_package(mysql REQUIRED) -endif() -if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "mariadb-connector-c") - find_package(mariadb-connector-c REQUIRED) -endif() - -if (${GDAL_USE_ZLIB}) - find_package(ZLIB) -endif() - -if ("${GDAL_CONAN_PACKAGE_FOR_JPEG}" STREQUAL "libjpeg-turbo") - find_package(libjpeg-turbo REQUIRED) - add_library(JPEG::JPEG ALIAS ${TARGET_FOR_JPEG}) -endif() - -if (${GDAL_USE_PCRE2}) - find_package(PCRE2 REQUIRED) - add_library(PCRE2::PCRE2-8 ALIAS PCRE2::8BIT) -endif() - - -add_subdirectory("source_subfolder") +add_subdirectory(src) diff --git a/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake b/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake new file mode 100644 index 0000000000000..cc5455d748073 --- /dev/null +++ b/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake @@ -0,0 +1,48 @@ +function(define_find_package2 pkgname include_file library_name) +endfunction() +function(find_package2 pkgname) + # Remove args unsupported by find_package() + list(REMOVE_ITEM ARGN OUT_DEPENDENCY _find_dependency) + # Force CONFIG mode + list(REMOVE_ITEM ARGN MODULE NO_CONFIG NO_MODULE) + string(TOUPPER ${pkgname} key) + if(DEFINED GDAL_USE_${key} AND NOT GDAL_USE_${key}) + set(${pkgname}_FOUND) + set(${key}_FOUND) + return() + endif() + find_package(${pkgname} ${ARGN} + QUIET + CONFIG + GLOBAL + # Forbid the use of system libs entirely + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + # Add variables with upper-case package name in addition to the default ones + set(targets "") + foreach(lib ${${pkgname}_LIBRARIES}) + if(TARGET ${lib}) + list(APPEND targets ${lib}) + endif() + endforeach() + # Add upper-case variables + set(${key}_DEFINITIONS "${${pkgname}_DEFINITIONS}" CACHE STRING "") + set(${key}_FOUND ${${pkgname}_FOUND} CACHE BOOL "") + set(${key}_INCLUDE_DIR "${${pkgname}_INCLUDE_DIR}" CACHE STRING "") + set(${key}_INCLUDE_DIRS "${${pkgname}_INCLUDE_DIRS}" CACHE STRING "") + set(${key}_LIBRARIES "${${pkgname}_LIBRARIES}" CACHE STRING "") + set(${key}_LIBRARY "${${pkgname}_LIBRARIES}" CACHE STRING "") + set(${key}_TARGET "${targets}" CACHE STRING "") + set(${key}_VERSION ${${pkgname}_VERSION} CACHE BOOL "") + + # Add as cache vars for global visibility + set(${pkgname}_FOUND ${${pkgname}_FOUND} CACHE BOOL "") + set(${pkgname}_TARGET "${targets}" CACHE STRING "") + set(${pkgname}_VERSION ${${pkgname}_VERSION_STRING} CACHE BOOL "") + + message(STATUS "Found ${pkgname}: ${${pkgname}_FOUND}") + message(STATUS " ${key}_TARGET: ${${key}_TARGET}") + message(STATUS " ${key}_LIBRARIES: ${${key}_LIBRARIES}") + message(STATUS " ${key}_INCLUDE_DIRS: ${${key}_INCLUDE_DIRS}") +endfunction() diff --git a/recipes/gdal/post_3.5.0/conandata.yml b/recipes/gdal/post_3.5.0/conandata.yml index 6ac086393ccfd..159958b913d13 100644 --- a/recipes/gdal/post_3.5.0/conandata.yml +++ b/recipes/gdal/post_3.5.0/conandata.yml @@ -1,20 +1,41 @@ sources: - "3.7.0": - url: "https://github.com/OSGeo/gdal/releases/download/v3.7.0/gdal-3.7.0.tar.gz" - sha256: "5a806d759f403a15bbbf8a14ecc6947071afc5ab91e5abaef0d11d1d2d16bf94" - "3.5.2": - url: "https://github.com/OSGeo/gdal/releases/download/v3.5.2/gdal-3.5.2.tar.gz" - sha256: "fbd696e1b2a858fbd2eb3718db16b14ed9ba82521d3578770d480c74fe1146d2" - "3.5.1": - url: "https://github.com/OSGeo/gdal/releases/download/v3.5.1/gdal-3.5.1.tar.gz" - sha256: "7c4406ca010dc8632703a0a326f39e9db25d9f1f6ebaaeca64a963e3fac123d1" + "3.8.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.8.3/gdal-3.8.3.tar.gz" + sha256: "f7a30387a8239e9da26200f787a02136df2ee6473e86b36d05ad682761a049ea" + "3.7.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.7.3/gdal-3.7.3.tar.gz" + sha256: "f66161e10b8b89a8a541cd760cd36d490114ed3f020a26db1489a6154db5d2be" + "3.5.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.5.3/gdal-3.5.3.tar.gz" + sha256: "a9ea0300d17e35bab71df4f16e62bb2fb8081caf994ab3ee0502ce4cf0d4e593" patches: - "3.7.0": - - patch_file: "patches/3.7.0/0-replace-find-package.patch" - base_path: "source_subfolder" - "3.5.2": - - patch_file: "patches/3.5.2/0-replace-find-package.patch" - base_path: "source_subfolder" - "3.5.1": - - patch_file: "patches/3.5.1/0-replace-find-package.patch" - base_path: "source_subfolder" + "3.8.3": + - patch_file: "patches/3.8.1/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" + "3.7.3": + - patch_file: "patches/3.7.3/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" + "3.5.3": + - patch_file: "patches/3.5.3/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.5.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" diff --git a/recipes/gdal/post_3.5.0/conanfile.py b/recipes/gdal/post_3.5.0/conanfile.py index 3e0847981c026..49c2e7d3e5d6e 100644 --- a/recipes/gdal/post_3.5.0/conanfile.py +++ b/recipes/gdal/post_3.5.0/conanfile.py @@ -1,43 +1,42 @@ +import os + from conan import ConanFile -from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.files import apply_conandata_patches, get, files from conan.errors import ConanInvalidConfiguration -from conans import CMake -import functools -import os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class GdalConan(ConanFile): name = "gdal" description = "GDAL is an open source X/MIT licensed translator library " \ "for raster and vector geospatial data formats." license = "MIT" - topics = ("osgeo", "geospatial", "raster", "vector") - homepage = "https://github.com/OSGeo/gdal" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/OSGeo/gdal" + topics = ("osgeo", "geospatial", "raster", "vector") + package_type = "library" settings = "os", "arch", "compiler", "build_type" - - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - - # A list of gdal dependencies can be taken from cmake/helpers/CheckDependentLibraries.cmake - # within gdal sources with the command: - # grep -E '^[ \t]*gdal_check_package\(' cmake/helpers/CheckDependentLibraries.cmake \ - # | sed 's/[ \t]*gdal_check_package(\([a-zA-Z_0-9]\+\) "\(.*\)"\(.*\)/{ 'dep': \'\1\', 'descr': \'\2\' },/' \ - # | sort | uniq - options = { "shared": [True, False], "fPIC": [True, False], "tools": [True, False], "with_armadillo": [True, False], "with_arrow": [True, False], + "with_basisu": [True, False], "with_blosc": [True, False], + "with_brunsli": [True, False], "with_cfitsio": [True, False], # with_cypto option has been renamed with_openssl in version 3.5.1 - "with_crypto": [True, False, "deprecated"], + "with_crypto": ["deprecated", True, False], "with_cryptopp": [True, False], "with_curl": [True, False], "with_dds": [True, False], + "with_ecw": [True, False], "with_expat": [True, False], "with_exr": [True, False], "with_freexl": [True, False], @@ -47,48 +46,64 @@ class GdalConan(ConanFile): "with_hdf4": [True, False], "with_hdf5": [True, False], "with_heif": [True, False], + "with_jpeg": [False, "libjpeg", "libjpeg-turbo"], + "with_jxl": [True, False], "with_kea": [True, False], + "with_lerc": [True, False], + "with_libaec": [True, False], + "with_libarchive": [True, False], + "with_libcsf": [True, False], "with_libdeflate": [True, False], "with_libiconv": [True, False], - "with_jpeg": [None, "libjpeg", "libjpeg-turbo"], "with_libkml": [True, False], - "with_libtiff": [True, False], + "with_libtiff": ["deprecated", True, False], # always enabled + "with_lzma": [True, False], "with_lz4": [True, False], "with_mongocxx": [True, False], - "with_mysql": [None, "libmysqlclient", "mariadb-connector-c"], + "with_mysql": [False, "libmysqlclient", "mariadb-connector-c"], "with_netcdf": [True, False], "with_odbc": [True, False], + "with_opencad": [True, False], + "with_opencl": [True, False], "with_openjpeg": [True, False], "with_openssl": [True, False], "with_pcre": [True, False], "with_pcre2": [True, False], + # "with_pdfium": [True, False], "with_pg": [True, False], "with_png": [True, False], "with_podofo": [True, False], "with_poppler": [True, False], - "with_proj": [True, False], + "with_proj": ["deprecated", True, False], # always enabled + "with_publicdecompwt": [True, False], "with_qhull": [True, False], + "with_rasterlite2": [True, False], + "with_shapelib": [True, False], + "with_spatialite": [True, False], "with_sqlite3": [True, False], + "with_tiledb": [True, False], "with_webp": [True, False], "with_xerces": [True, False], "with_xml2": [True, False], - "with_zlib": [True, False], + "with_zlib": ["deprecated", True, False], # always enabled "with_zstd": [True, False], } - default_options = { "shared": False, "fPIC": True, "tools": False, "with_armadillo": False, - "with_arrow": False, + "with_arrow": True, + "with_basisu": False, "with_blosc": False, + "with_brunsli": False, "with_cfitsio": False, "with_crypto": "deprecated", "with_cryptopp": False, - "with_curl": False, + "with_curl": True, "with_dds": False, - "with_expat": False, + "with_ecw": False, + "with_expat": True, "with_exr": False, "with_freexl": False, "with_geos": True, @@ -97,215 +112,220 @@ class GdalConan(ConanFile): "with_hdf4": False, "with_hdf5": False, "with_heif": False, + "with_jpeg": "libjpeg", + "with_jxl": False, "with_kea": False, + "with_lerc": True, + "with_libaec": False, + "with_libarchive": False, + "with_libcsf": True, "with_libdeflate": True, "with_libiconv": True, - "with_jpeg": "libjpeg", "with_libkml": False, - "with_libtiff": True, + "with_libtiff": "deprecated", + "with_lzma": False, "with_lz4": False, "with_mongocxx": False, - "with_mysql": None, + "with_mysql": False, "with_netcdf": False, "with_odbc": False, + "with_opencad": False, + "with_opencl": True, "with_openjpeg": False, "with_openssl": False, "with_pcre": False, "with_pcre2": False, + # "with_pdfium": False, "with_pg": False, "with_png": True, "with_podofo": False, "with_poppler": False, - "with_proj": True, + "with_proj": "deprecated", + "with_publicdecompwt": False, "with_qhull": True, + "with_rasterlite2": False, + "with_shapelib": True, + "with_spatialite": False, "with_sqlite3": True, + "with_tiledb": False, "with_webp": False, "with_xerces": False, "with_xml2": False, - "with_zlib": True, + "with_zlib": "deprecated", "with_zstd": False, } - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) + copy(self, "*.cmake", + src=os.path.join(self.recipe_folder, "cmake"), + dst=os.path.join(self.export_sources_folder, "src", "cmake", "helpers")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "3.7": + # Latest versions of Arrow are no longer compatible with GDAL 3.5 + self.options.with_arrow = False + if Version(self.version) < "3.8": + del self.options.with_libaec def configure(self): - if self.options.with_crypto != "deprecated": - self.output.error("with_crypto option is deprecated, use with_openssl instead.") - if self.options.shared: - try: - del self.options.fPIC - except: - pass + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("json-c/0.16") + self.requires("json-c/0.17") self.requires("libgeotiff/1.7.1") - + self.requires("libtiff/4.6.0") + self.requires("proj/9.3.1") + # Used in a public header here: + # https://github.com/OSGeo/gdal/blob/v3.7.1/port/cpl_minizip_ioapi.h#L26 + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True, transitive_libs=True) if self.options.with_armadillo: - self.requires("armadillo/10.7.3") - + self.requires("armadillo/12.6.4") if self.options.with_arrow: - self.requires("arrow/8.0.1") - + self.requires("arrow/14.0.2") + if self.options.with_basisu: + self.requires("libbasisu/1.15.0") if self.options.with_blosc: - self.requires("c-blosc/1.21.1") - + self.requires("c-blosc/1.21.5") + if self.options.with_brunsli: + self.requires("brunsli/cci.20231024") if self.options.with_cfitsio: - self.requires("cfitsio/4.1.0") - + self.requires("cfitsio/4.3.1") if self.options.with_cryptopp: - self.requires("cryptopp/8.7.0") - + self.requires("cryptopp/8.9.0") if self.options.with_curl: - self.requires("libcurl/8.2.0") - + self.requires("libcurl/[>=7.78 <9]") if self.options.with_dds: self.requires("crunch/cci.20190615") - + if self.options.with_ecw: + self.requires("libecwj2/3.3") if self.options.with_expat: self.requires("expat/2.5.0") - if self.options.with_exr: - self.requires("openexr/3.1.9") + self.requires("openexr/3.2.1") self.requires("imath/3.1.9") - if self.options.with_freexl: - self.requires("freexl/1.0.6") - + self.requires("freexl/2.0.0") if self.options.with_geos: - self.requires("geos/3.11.1") - + self.requires("geos/3.12.0") if self.options.with_gif: self.requires("giflib/5.2.1") - if self.options.with_gta: self.requires("libgta/1.2.1") - if self.options.with_hdf4: - self.requires("hdf4/4.2.15") - + self.requires("hdf4/4.2.16-2") if self.options.with_hdf5: - self.requires("hdf5/1.13.1") - + self.requires("hdf5/1.14.3") if self.options.with_heif: - self.requires("libheif/1.13.0") - + self.requires("libheif/1.16.2") if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") - + self.requires("libjpeg-turbo/3.0.1") + if self.options.with_jxl: + self.requires("libjxl/0.6.1") if self.options.with_kea: self.requires("kealib/1.4.14") - + if self.options.with_lerc: + self.requires("lerc/4.0.1") + if self.options.get_safe("with_libaec"): + self.requires("libaec/1.0.6") + if self.options.with_libarchive: + self.requires("libarchive/3.7.2") if self.options.with_libdeflate: - self.requires("libdeflate/1.18") - + self.requires("libdeflate/1.19") if self.options.with_libiconv: self.requires("libiconv/1.17") - if self.options.with_libkml: self.requires("libkml/1.3.0") - - if self.options.with_libtiff: - self.requires("libtiff/4.5.1") - + if self.options.with_lzma: + self.requires("xz_utils/5.4.5") if self.options.with_lz4: self.requires("lz4/1.9.4") - if self.options.with_mongocxx: - self.requires("mongo-cxx-driver/3.6.7") - + self.requires("mongo-cxx-driver/3.8.1") if self.options.with_mysql == "libmysqlclient": - self.requires("libmysqlclient/8.0.30") + self.requires("libmysqlclient/8.1.0") elif self.options.with_mysql == "mariadb-connector-c": - self.requires("mariadb-connector-c/3.1.12") - + self.requires("mariadb-connector-c/3.3.3") if self.options.with_netcdf: self.requires("netcdf/4.8.1") - if self.options.with_odbc: self.requires("odbc/2.3.11") - + if self.options.with_opencl: + self.requires("opencl-icd-loader/2023.12.14") if self.options.with_openjpeg: self.requires("openjpeg/2.5.0") - if self.options.with_openssl: - self.requires("openssl/1.1.1u") - + self.requires("openssl/[>=1.1 <4]") if self.options.with_pcre: self.requires("pcre/8.45") - if self.options.with_pcre2: self.requires("pcre2/10.42") - + # TODO: pdfium recipe needs to be compatible with https://github.com/rouault/pdfium_build_gdal_3_8 + # if self.options.with_pdfium: + # self.requires("pdfium/95.0.4629") if self.options.with_pg: - self.requires("libpq/14.5") - + # libpq 15+ is not supported + self.requires("libpq/14.9") if self.options.with_png: self.requires("libpng/1.6.40") - if self.options.with_podofo: self.requires("podofo/0.9.7") - if self.options.with_poppler: self.requires("poppler/21.07.0") - - if self.options.with_proj: - self.requires("proj/9.1.1") - if self.options.with_qhull: self.requires("qhull/8.0.1") - + if self.options.with_rasterlite2: + self.requires("librasterlite2/1.1.0-beta1") + if self.options.with_spatialite: + self.requires("libspatialite/5.0.1") if self.options.with_sqlite3: - self.requires("sqlite3/3.42.0") - + self.requires("sqlite3/3.44.2") + if self.options.with_tiledb: + self.requires("tiledb/2.17.4") if self.options.with_webp: - self.requires("libwebp/1.3.1") - + self.requires("libwebp/1.3.2") if self.options.with_xerces: - self.requires("xerces-c/3.2.3") - + self.requires("xerces-c/3.2.5") if self.options.with_xml2: - self.requires("libxml2/2.10.3") - - if self.options.with_zlib: - self.requires("zlib/1.2.13") - + self.requires("libxml2/2.12.3") if self.options.with_zstd: self.requires("zstd/1.5.5") + # Use of external shapelib is not recommended and is currently broken. + # https://github.com/OSGeo/gdal/issues/5711 + # if self.options.with_shapelib: + # self.requires("shapelib/1.6.0") def build_requirements(self): # https://github.com/conan-io/conan/issues/3482#issuecomment-662284561 self.tool_requires("cmake/[>=3.18 <4]") def package_id(self): + # Ignore deprecated options del self.info.options.with_crypto + del self.info.options.with_libtiff + del self.info.options.with_proj + del self.info.options.with_zlib def validate(self): - if self.options.get_safe("with_pcre") and self.options.get_safe("with_pcre2"): + for option in ["crypto", "zlib", "proj", "libtiff"]: + if self.options.get_safe(f"with_{option}") != "deprecated": + self.output.warning(f"{self.ref}:with_{option} option is deprecated. The {option} dependecy is always enabled now.") + if self.options.with_pcre and self.options.with_pcre2: raise ConanInvalidConfiguration("Enable either pcre or pcre2, not both") - if self.options.get_safe("with_sqlite3") and not self.options["sqlite3"].enable_column_metadata: + if self.options.with_sqlite3 and not self.dependencies["sqlite3"].options.enable_column_metadata: raise ConanInvalidConfiguration("gdql requires sqlite3:enable_column_metadata=True") - if self.options.get_safe("with_libtiff") and self.options["libtiff"].jpeg != self.options.get_safe("with_jpeg"): + if self.dependencies["libtiff"].options.jpeg != self.options.with_jpeg: msg = "libtiff:jpeg and gdal:with_jpeg must be set to the same value, either libjpeg or libjpeg-turbo." # For some reason, the ConanInvalidConfiguration message is not shown, only # ERROR: At least two recipes provides the same functionality: @@ -314,591 +334,488 @@ def validate(self): self.output.error(msg) raise ConanInvalidConfiguration(msg) - if self.options.get_safe("with_poppler") and self.options["poppler"].with_libjpeg != self.options.get_safe("with_jpeg"): + if self.options.with_poppler and self.dependencies["poppler"].options.with_libjpeg != self.options.with_jpeg: msg = "poppler:with_libjpeg and gdal:with_jpeg must be set to the same value, either libjpeg or libjpeg-turbo." self.output.error(msg) raise ConanInvalidConfiguration(msg) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - - if self.options.get_safe("fPIC", True): - cmake.definitions[ - "GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE"] = True - - cmake.definitions["BUILD_JAVA_BINDINGS"] = False - cmake.definitions["BUILD_CSHARP_BINDINGS"] = False - cmake.definitions["BUILD_PYTHON_BINDINGS"] = False - - cmake.definitions["BUILD_TESTING"] = False - cmake.definitions["GDAL_USE_ZLIB_INTERNAL"] = False - cmake.definitions["GDAL_USE_JSONC_INTERNAL"] = False - cmake.definitions["GDAL_USE_JPEG_INTERNAL"] = False - cmake.definitions["GDAL_USE_JPEG12_INTERNAL"] = False - cmake.definitions["GDAL_USE_TIFF_INTERNAL"] = False - cmake.definitions["GDAL_USE_GEOTIFF_INTERNAL"] = False - cmake.definitions["GDAL_USE_GIF_INTERNAL"] = False - cmake.definitions["GDAL_USE_PNG_INTERNAL"] = False - - cmake.definitions["GDAL_USE_LERC_INTERNAL"] = True - cmake.definitions["GDAL_USE_SHAPELIB_INTERNAL"] = True - - cmake.definitions["BUILD_APPS"] = self.options.tools - - cmake.definitions["SQLite3_HAS_COLUMN_METADATA"] = \ - self.options["sqlite3"].enable_column_metadata - - cmake.definitions["SQLite3_HAS_RTREE"] = self.options[ - "sqlite3"].enable_rtree - - cmake.definitions["GDAL_USE_JSONC"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_JSONC"] = "json-c" - - cmake.definitions["GDAL_USE_GEOTIFF"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GEOTIFF"] = "libgeotiff" - cmake.definitions["TARGET_FOR_GEOTIFF"] = "GeoTIFF::GeoTIFF" - - cmake.definitions["GDAL_USE_ARMADILLO"] = self.options.with_armadillo - if self.options.with_armadillo: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ARMADILLO"] = "armadillo" - cmake.definitions["TARGET_FOR_ARMADILLO"] = \ - self.dependencies["armadillo"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Armadillo_FOUND"] = False - - cmake.definitions["GDAL_USE_ARROW"] = self.options.with_arrow - if self.options.with_arrow: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ARROW"] = "arrow" - cmake.definitions["TARGET_FOR_ARROW"] = \ - self.dependencies["arrow"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Arrow_FOUND"] = False - - cmake.definitions["GDAL_USE_BLOSC"] = self.options.with_blosc - if self.options.with_blosc: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_BLOSC"] = "c-blosc" - cmake.definitions["TARGET_FOR_BLOSC"] = \ - self.dependencies["c-blosc"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Blosc_FOUND"] = False - - cmake.definitions["GDAL_USE_CFITSIO"] = self.options.with_cfitsio - if self.options.with_cfitsio: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CFITSIO"] = "cfitsio" - cmake.definitions["TARGET_FOR_CFITSIO"] = \ - self.dependencies["cfitsio"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CFITSIO_FOUND"] = False - - cmake.definitions["GDAL_USE_CRYPTOPP"] = self.options.with_cryptopp - if self.options.with_cryptopp: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CRYPTOPP"] = "cryptopp" - cmake.definitions["TARGET_FOR_CRYPTOPP"] = \ - self.dependencies["cryptopp"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CryptoPP_FOUND"] = False - - cmake.definitions["GDAL_USE_CURL"] = self.options.with_curl - if self.options.with_curl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CURL"] = "libcurl" - cmake.definitions["TARGET_FOR_CURL"] = \ - self.dependencies["libcurl"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CURL_FOUND"] = False - - cmake.definitions["GDAL_USE_CRNLIB"] = self.options.with_dds - if self.options.with_dds: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CRNLIB"] = "crunch" - cmake.definitions["TARGET_FOR_CRNLIB"] = \ - self.dependencies["crunch"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Crnlib_FOUND"] = False - - cmake.definitions["GDAL_USE_EXPAT"] = self.options.with_expat - if self.options.with_expat: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_EXPAT"] = "expat" - cmake.definitions["TARGET_FOR_EXPAT"] = "EXPAT::EXPAT" - else: - cmake.definitions["EXPAT_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENEXR"] = self.options.with_exr - if self.options.with_exr: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENEXR"] = "openexr" - cmake.definitions["TARGET_FOR_OPENEXR"] = \ - self.dependencies["openexr"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OpenEXR_FOUND"] = False - - cmake.definitions["GDAL_USE_FREEXL"] = self.options.with_freexl - if self.options.with_freexl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_FREEXL"] = "freexl" - cmake.definitions["TARGET_FOR_FREEXL"] = "freexl::freexl" - else: - cmake.definitions["FreeXL_FOUND"] = False - - cmake.definitions["GDAL_USE_GEOS"] = self.options.with_geos - if self.options.with_geos: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GEOS"] = "geos" - cmake.definitions["TARGET_FOR_GEOS"] = \ - self.dependencies["geos"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GEOS_FOUND"] = False - - cmake.definitions["GDAL_USE_GIF"] = self.options.with_gif - if self.options.with_gif: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GIF"] = "giflib" - cmake.definitions["TARGET_FOR_GIF"] = \ - self.dependencies["giflib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GIF_FOUND"] = False - - cmake.definitions["GDAL_USE_GTA"] = self.options.with_gta - if self.options.with_gta: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GTA"] = "libgta" - cmake.definitions["TARGET_FOR_GTA"] = \ - self.dependencies["libgta"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GTA_FOUND"] = False - - cmake.definitions["GDAL_USE_HDF4"] = self.options.with_hdf4 - if self.options.with_hdf4: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HDF4"] = "hdf4" - cmake.definitions["TARGET_FOR_HDF4"] = \ - self.dependencies["hdf4"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HDF4_FOUND"] = False - - cmake.definitions["GDAL_USE_HDF5"] = self.options.with_hdf5 - if self.options.with_hdf5: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HDF5"] = "hdf5" - cmake.definitions["TARGET_FOR_HDF5"] = \ - self.dependencies["hdf5"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HDF5_FOUND"] = False - - cmake.definitions["GDAL_USE_HEIF"] = self.options.with_heif - if self.options.with_heif: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HEIF"] = "libheif" - cmake.definitions["TARGET_FOR_HEIF"] = \ - self.dependencies["libheif"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HEIF_FOUND"] = False - - cmake.definitions["GDAL_USE_KEA"] = self.options.with_kea - if self.options.with_kea: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_KEA"] = "kealib" - cmake.definitions["TARGET_FOR_KEA"] = \ - self.dependencies["kealib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["KEA_FOUND"] = False - - cmake.definitions["GDAL_USE_DEFLATE"] = self.options.with_libdeflate - if self.options.with_libdeflate: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_DEFLATE"] = "libdeflate" - cmake.definitions["TARGET_FOR_DEFLATE"] = \ - self.dependencies["libdeflate"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Deflate_FOUND"] = False - - cmake.definitions["GDAL_USE_ICONV"] = self.options.with_libiconv - if self.options.with_libiconv: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ICONV"] = "libiconv" - cmake.definitions["TARGET_FOR_ICONV"] = \ - self.dependencies["libiconv"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Iconv_FOUND"] = False - - if self.options.with_jpeg == "libjpeg" or self.options.with_jpeg == "libjpeg-turbo": - print(f'self.options.with_jpeg: {self.options.with_jpeg}') - cmake.definitions["GDAL_USE_JPEG"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_JPEG"] = self.options.with_jpeg - cmake.definitions["TARGET_FOR_JPEG"] = ( - "JPEG::JPEG" if self.options.with_jpeg == "libjpeg" else - self.dependencies["libjpeg-turbo"].cpp_info.components["turbojpeg"] \ - .get_property("cmake_target_name")) - else: - cmake.definitions["JPEG_FOUND"] = False - - cmake.definitions["GDAL_USE_LIBKML"] = self.options.with_libkml - if self.options.with_libkml: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LIBKML"] = "libkml" - cmake.definitions["TARGET_FOR_LIBKML"] = \ - self.dependencies["libkml"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LibKML_FOUND"] = False - - cmake.definitions["GDAL_USE_TIFF"] = self.options.with_libtiff - if self.options.with_libtiff: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_TIFF"] = "libtiff" - cmake.definitions["TARGET_FOR_TIFF"] = \ - self.dependencies["libtiff"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["TIFF_FOUND"] = False - - cmake.definitions["GDAL_USE_LZ4"] = self.options.with_lz4 - if self.options.with_lz4: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LZ4"] = "lz4" - cmake.definitions["TARGET_FOR_LZ4"] = \ - self.dependencies["lz4"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LZ4_FOUND"] = False - - cmake.definitions["GDAL_USE_MONGOCXX"] = self.options.with_mongocxx - if self.options.with_mongocxx: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_MONGOCXX"] = "mongo-cxx-driver" - cmake.definitions["TARGET_FOR_MONGOCXX"] = \ - self.dependencies["mongo-cxx-driver"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["MONGOCXX_FOUND"] = False - - if self.options.with_mysql == "libmysqlclient" or self.options.with_mysql == "mariadb-connector-c": - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_MYSQL"] = str(self.options.with_mysql) - cmake.definitions["TARGET_FOR_MYSQL"] = \ - "mariadb-connector-c::mariadb-connector-c" \ - if self.options.with_mysql == "mariadb-connector-c" \ - else "libmysqlclient::libmysqlclient" - else: - cmake.definitions["MYSQL_FOUND"] = False - - cmake.definitions["GDAL_USE_NETCDF"] = self.options.with_netcdf - if self.options.with_netcdf: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_NETCDF"] = "netcdf" - cmake.definitions["TARGET_FOR_NETCDF"] = \ - self.dependencies["netcdf"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["NetCDF_FOUND"] = False - - cmake.definitions["GDAL_USE_ODBC"] = self.options.with_odbc - if self.options.with_odbc: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ODBC"] = "odbc" - cmake.definitions["TARGET_FOR_ODBC"] = \ - self.dependencies["odbc"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ODBC_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENJPEG"] = self.options.with_openjpeg - if self.options.with_openjpeg: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENJPEG"] = "openjpeg" - cmake.definitions["TARGET_FOR_OPENJPEG"] = \ - self.dependencies["openjpeg"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OPENJPEG_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENSSL"] = self.options.with_openssl - if self.options.with_openssl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENSSL"] = "openssl" - cmake.definitions["TARGET_FOR_OPENSSL"] = \ - self.dependencies["openssl"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OpenSSL_FOUND"] = False - - cmake.definitions["GDAL_USE_PCRE"] = self.options.with_pcre - if self.options.with_pcre: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PCRE"] = "pcre" - cmake.definitions["TARGET_FOR_PCRE"] = \ - self.dependencies["pcre"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PCRE_FOUND"] = False - - cmake.definitions["GDAL_USE_PCRE2"] = self.options.with_pcre2 - if self.options.with_pcre2: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PCRE2"] = "pcre2" - cmake.definitions["TARGET_FOR_PCRE2"] = \ - self.dependencies["pcre2"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PCRE2_FOUND"] = False - - cmake.definitions["GDAL_USE_PDFIUM"] = False - cmake.definitions["PDFIUM_FOUND"] = False - - cmake.definitions["GDAL_USE_POSTGRESQL"] = self.options.with_pg - if self.options.with_pg: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_POSTGRESQL"] = "libpq" - cmake.definitions["TARGET_FOR_POSTGRESQL"] = \ - self.dependencies["libpq"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PostgreSQL_FOUND"] = False - - cmake.definitions["GDAL_USE_PNG"] = self.options.with_png - if self.options.with_png: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PNG"] = "libpng" - cmake.definitions["TARGET_FOR_PNG"] = \ - self.dependencies["libpng"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PNG_FOUND"] = False - - cmake.definitions["GDAL_USE_PODOFO"] = self.options.with_podofo - if self.options.with_podofo: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PODOFO"] = "podofo" - cmake.definitions["TARGET_FOR_PODOFO"] = \ - self.dependencies["podofo"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Podofo_FOUND"] = False - - cmake.definitions["GDAL_USE_POPPLER"] = self.options.with_poppler - if self.options.with_poppler: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_POPPLER"] = "poppler" - cmake.definitions["TARGET_FOR_POPPLER"] = \ - self.dependencies["poppler"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Poppler_FOUND"] = False - - cmake.definitions["GDAL_USE_PROJ"] = self.options.with_proj - if self.options.with_proj: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PROJ"] = "proj" - cmake.definitions["TARGET_FOR_PROJ"] = \ - self.dependencies["proj"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PROJ_FOUND"] = False - - cmake.definitions["GDAL_USE_QHULL"] = self.options.with_qhull - if self.options.with_qhull: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_QHULL"] = "qhull" - cmake.definitions["TARGET_FOR_QHULL"] = \ - self.dependencies["qhull"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["QHULL_FOUND"] = False - - cmake.definitions["GDAL_USE_SQLITE3"] = self.options.with_sqlite3 + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + tc.variables["GDAL_SET_INSTALL_RELATIVE_RPATH"] = True + + tc.variables["BUILD_JAVA_BINDINGS"] = False + tc.variables["BUILD_CSHARP_BINDINGS"] = False + tc.variables["BUILD_PYTHON_BINDINGS"] = False + tc.variables["BUILD_APPS"] = self.options.tools + tc.variables["BUILD_TESTING"] = False + + tc.variables["GDAL_USE_ARCHIVE"] = self.options.with_libarchive + tc.variables["GDAL_USE_ARMADILLO"] = self.options.with_armadillo + tc.variables["GDAL_USE_ARROW"] = self.options.with_arrow + tc.variables["GDAL_USE_ARROWDATASET"] = self.options.with_arrow and self.dependencies["arrow"].options.dataset_modules + tc.variables["GDAL_USE_BASISU"] = self.options.with_basisu + tc.variables["GDAL_USE_BLOSC"] = self.options.with_blosc + tc.variables["GDAL_USE_BRUNSLI"] = self.options.with_brunsli + tc.variables["GDAL_USE_CFITSIO"] = self.options.with_cfitsio + tc.variables["GDAL_USE_CRNLIB"] = self.options.with_dds + tc.variables["GDAL_USE_CRYPTOPP"] = self.options.with_cryptopp + tc.variables["GDAL_USE_CURL"] = self.options.with_curl + tc.variables["GDAL_USE_DEFLATE"] = self.options.with_libdeflate + tc.variables["GDAL_USE_ECW"] = self.options.with_ecw + tc.variables["GDAL_USE_EXPAT"] = self.options.with_expat + tc.variables["GDAL_USE_FILEGDB"] = False + tc.variables["GDAL_USE_FREEXL"] = self.options.with_freexl + tc.variables["GDAL_USE_FYBA"] = False + tc.variables["GDAL_USE_GEOS"] = self.options.with_geos + tc.variables["GDAL_USE_GEOTIFF"] = True + tc.variables["GDAL_USE_GEOTIFF_INTERNAL"] = False + tc.variables["GDAL_USE_GIF"] = self.options.with_gif + tc.variables["GDAL_USE_GIF_INTERNAL"] = False + tc.variables["GDAL_USE_GTA"] = self.options.with_gta + tc.variables["GDAL_USE_HDF4"] = self.options.with_hdf4 + tc.variables["GDAL_USE_HDF5"] = self.options.with_hdf5 + tc.variables["GDAL_USE_HDFS"] = False + tc.variables["GDAL_USE_HEIF"] = self.options.with_heif + tc.variables["GDAL_USE_ICONV"] = self.options.with_libiconv + tc.variables["GDAL_USE_IDB"] = False + tc.variables["GDAL_USE_JPEG"] = bool(self.options.with_jpeg) + tc.variables["GDAL_USE_JPEG_INTERNAL"] = False + tc.variables["GDAL_USE_JPEG12_INTERNAL"] = False + tc.variables["GDAL_USE_JSONC"] = True + tc.variables["GDAL_USE_JSONC_INTERNAL"] = False + tc.variables["GDAL_USE_JXL"] = self.options.with_jxl + tc.variables["GDAL_USE_JXL_THREADS"] = self.options.with_jxl + tc.variables["GDAL_USE_KDU"] = False + tc.variables["GDAL_USE_KEA"] = self.options.with_kea + tc.variables["GDAL_USE_LERC"] = self.options.with_lerc + tc.variables["GDAL_USE_LERC_INTERNAL"] = False + tc.variables["GDAL_USE_LIBAEC"] = self.options.get_safe("with_libaec", False) + tc.variables["GDAL_USE_LIBCSF"] = False + tc.variables["GDAL_USE_LIBCSF_INTERNAL"] = self.options.with_libcsf + tc.variables["GDAL_USE_LIBKML"] = self.options.with_libkml + tc.variables["GDAL_USE_LIBLZMA"] = self.options.with_lzma + tc.variables["GDAL_USE_LIBQB3"] = False + tc.variables["GDAL_USE_LIBXML2"] = self.options.with_xml2 + tc.variables["GDAL_USE_LURATECH"] = False + tc.variables["GDAL_USE_LZ4"] = self.options.with_lz4 + tc.variables["GDAL_USE_MONGOCXX"] = self.options.with_mongocxx + tc.variables["GDAL_USE_MRSID"] = False + tc.variables["GDAL_USE_MSSQL_NCLI"] = False + tc.variables["GDAL_USE_MSSQL_ODBC"] = False + tc.variables["GDAL_USE_MYSQL"] = bool(self.options.with_mysql) + tc.variables["GDAL_USE_NETCDF"] = self.options.with_netcdf + tc.variables["GDAL_USE_ODBC"] = self.options.with_odbc + tc.variables["GDAL_USE_ODBCCPP"] = False + tc.variables["GDAL_USE_OGDI"] = False + tc.variables["GDAL_USE_OPENCAD"] = False + tc.variables["GDAL_USE_OPENCAD_INTERNAL"] = self.options.with_opencad + tc.variables["GDAL_USE_OPENCL"] = self.options.with_opencl + tc.variables["GDAL_USE_OPENEXR"] = self.options.with_exr + tc.variables["GDAL_USE_OPENJPEG"] = self.options.with_openjpeg + tc.variables["GDAL_USE_OPENSSL"] = self.options.with_openssl + tc.variables["GDAL_USE_ORACLE"] = False + tc.variables["GDAL_USE_PARQUET"] = self.options.with_arrow and self.dependencies["arrow"].options.parquet + tc.variables["GDAL_USE_PCRE"] = self.options.with_pcre + tc.variables["GDAL_USE_PCRE2"] = self.options.with_pcre2 + tc.variables["GDAL_USE_PDFIUM"] = False # self.options.with_pdfium + tc.variables["GDAL_USE_PNG"] = self.options.with_png + tc.variables["GDAL_USE_PNG_INTERNAL"] = False + tc.variables["GDAL_USE_PODOFO"] = self.options.with_podofo + tc.variables["GDAL_USE_POPPLER"] = self.options.with_poppler + tc.variables["GDAL_USE_POSTGRESQL"] = self.options.with_pg + tc.variables["GDAL_USE_PUBLICDECOMPWT"] = self.options.with_publicdecompwt + tc.variables["GDAL_USE_QHULL"] = self.options.with_qhull + tc.variables["GDAL_USE_QHULL_INTERNAL"] = False + tc.variables["GDAL_USE_RASTERLITE2"] = self.options.with_rasterlite2 + tc.variables["GDAL_USE_SFCGAL"] = False + tc.variables["GDAL_USE_SHAPELIB"] = False + tc.variables["GDAL_USE_SHAPELIB_INTERNAL"] = self.options.with_shapelib + tc.variables["GDAL_USE_SPATIALITE"] = self.options.with_spatialite + tc.variables["GDAL_USE_SQLITE3"] = self.options.with_sqlite3 + tc.variables["GDAL_USE_TEIGHA"] = False + tc.variables["GDAL_USE_TIFF_INTERNAL"] = False + tc.variables["GDAL_USE_TILEDB"] = self.options.with_tiledb + tc.variables["GDAL_USE_WEBP"] = self.options.with_webp + tc.variables["GDAL_USE_XERCESC"] = self.options.with_xerces + tc.variables["GDAL_USE_ZLIB"] = True + tc.variables["GDAL_USE_ZLIB_INTERNAL"] = False + tc.variables["GDAL_USE_ZSTD"] = self.options.with_zstd + + tc.variables["Parquet_FOUND"] = self.options.with_arrow and self.dependencies["arrow"].options.parquet + tc.variables["ArrowDataset_FOUND"] = self.options.with_arrow and self.dependencies["arrow"].options.dataset_modules + + # General workaround for try_compile() tests in the project + # https://github.com/conan-io/conan/issues/12180 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = self.settings.build_type + # https://github.com/OSGeo/gdal/blob/v3.8.1/cmake/modules/packages/FindSQLite3.cmake if self.options.with_sqlite3: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_SQLITE3"] = "sqlite3" - cmake.definitions["TARGET_FOR_SQLITE3"] = \ - self.dependencies["sqlite3"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["SQLite3_FOUND"] = False - - cmake.definitions["GDAL_USE_WEBP"] = self.options.with_webp - if self.options.with_webp: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_WEBP"] = "libwebp" - cmake.definitions["TARGET_FOR_WEBP"] = \ - self.dependencies["libwebp"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["WebP_FOUND"] = False - - cmake.definitions["GDAL_USE_XERCESC"] = self.options.with_xerces - if self.options.with_xerces: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_XERCESC"] = "xerces-c" - cmake.definitions["TARGET_FOR_XERCESC"] = \ - self.dependencies["xerces-c"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["XercesC_FOUND"] = False - - cmake.definitions["GDAL_USE_LIBXML2"] = self.options.with_xml2 - if self.options.with_xml2: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LIBXML2"] = "libxml2" - cmake.definitions["TARGET_FOR_LIBXML2"] = \ - self.dependencies["libxml2"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LibXml2_FOUND"] = False - - cmake.definitions["GDAL_USE_ZLIB"] = self.options.with_zlib - if self.options.with_zlib: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ZLIB"] = "zlib" - cmake.definitions["TARGET_FOR_ZLIB"] = \ - self.dependencies["zlib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ZLIB_FOUND"] = False - - cmake.definitions["GDAL_USE_ZSTD"] = self.options.with_zstd - if self.options.with_zstd: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ZSTD"] = "zstd" - cmake.definitions["TARGET_FOR_ZSTD"] = \ - self.dependencies["zstd"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ZSTD_FOUND"] = False - - - for k, v in cmake.definitions.items(): - print(k, " = ", v) - - cmake.configure(build_folder=self._build_subfolder) - return cmake - - def build(self): + tc.variables["SQLite3_HAS_COLUMN_METADATA"] = self.dependencies["sqlite3"].options.enable_column_metadata + tc.variables["SQLite3_HAS_RTREE"] = self.dependencies["sqlite3"].options.enable_rtree + tc.variables["SQLite3_HAS_LOAD_EXTENSION"] = not self.dependencies["sqlite3"].options.omit_load_extension + tc.variables["SQLite3_HAS_PROGRESS_HANDLER"] = True + tc.variables["SQLite3_HAS_MUTEX_ALLOC"] = True + tc.preprocessor_definitions["SQLite3_HAS_COLUMN_METADATA"] = 1 if self.dependencies["sqlite3"].options.enable_column_metadata else 0 + tc.preprocessor_definitions["SQLite3_HAS_RTREE"] = 1 if self.dependencies["sqlite3"].options.enable_rtree else 0 + # https://github.com/OSGeo/gdal/blob/v3.8.0/cmake/helpers/CheckDependentLibraries.cmake#L419-L450 + tc.variables["HAVE_JPEGTURBO_DUAL_MODE_8_12"] = ( + self.options.with_jpeg == "libjpeg-turbo" and + bool(self.dependencies["libjpeg-turbo"].options.get_safe("enable12bit")) + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/port/CMakeLists.txt + tc.variables["BLOSC_HAS_BLOSC_CBUFFER_VALIDATE"] = ( + self.options.with_blosc and + Version(self.dependencies["c-blosc"].ref.version) >= "1.21.5" + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/frmts/hdf5/CMakeLists.txt#L61-L64 + tc.variables["GDAL_ENABLE_HDF5_GLOBAL_LOCK"] = ( + self.options.with_hdf5 and + bool(self.dependencies["hdf5"].options.get_safe("threadsafe")) + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/frmts/hdf4/CMakeLists.txt#L28-L46 + tc.variables["HDF4_HAS_MAXOPENFILES"] = ( + self.options.with_hdf4 and + Version(self.dependencies["hdf4"].ref.version) >= "4.2.5" + ) + # https://github.com/OSGeo/gdal/blob/4bb78aab3ae9ab5433042bc27239d1555cbe272e/cmake/helpers/CheckDependentLibraries.cmake#L301-L318 + # The detection fails for some reason + # Setting it to non-const is compatible with all platforms + tc.variables["_ICONV_SECOND_ARGUMENT_IS_NOT_CONST"] = True + tc.generate() + + + deps = CMakeDeps(self) + # https://gdal.org/development/building_from_source.html#cmake-package-dependent-options + # Based on `grep -hPIR '(gdal_check_package|find_package2)\(' ~/.conan2/p/b/gdal*/b/src/cmake | sort -u` + conan_to_cmake_pkg_name = { + "armadillo": "Armadillo", + "arrow": "Arrow", + "brunsli": "BRUNSLI", + "c-blosc": "Blosc", + "cfitsio": "CFITSIO", + "crunch": "Crnlib", + "cryptopp": "CryptoPP", + "expat": "EXPAT", + "freexl": "FreeXL", + # "fyba": "FYBA", + "geos": "GEOS", + "giflib": "GIF", + "hdf4": "HDF4", + "hdf5": "HDF5", + # "hdfs": "HDFS", + "json-c": "JSONC", + "kealib": "KEA", + "lerc": "LERC", + "libaec": "LIBAEC", + "libarchive": "ARCHIVE", + "libbasisu": "basisu", + # "libcsf": "LIBCSF", + "libcurl": "CURL", + "libdeflate": "Deflate", + "libecwj2": "ECW", + "libgeotiff": "GeoTIFF", + "libgta": "GTA", + "libheif": "HEIF", + "libiconv": "Iconv", + "libjpeg": "JPEG", + "libjpeg-turbo": "JPEG", + "libjxl": "JXL", + "libkml": "LibKML", + "libmysqlclient": "MySQL", + "libpng": "PNG", + "libpq": "PostgreSQL", + # "libqb3": "libQB3", + "librasterlite2": "RASTERLITE2", + "libspatialite": "SPATIALITE", + "libtiff": "TIFF", + "libwebp": "WebP", + "libxml2": "LibXml2", + "lz4": "LZ4", + "mariadb-connector-c": "MySQL", + "mongo-cxx-driver": "MONGOCXX", + "netcdf": "NetCDF", + "odbc": "ODBC", + # "odbccpp": "ODBCCPP", + # "ogdi": "OGDI", + # "opencad": "OpenCAD", + "opencl-icd-loader": "OpenCL", + "openexr": "OpenEXR", + "openjpeg": "OpenJPEG", + "openssl": "OpenSSL", + "pcre": "PCRE", + "pcre2": "PCRE2", + "pdfium": "PDFIUM", + "podofo": "Podofo", + "poppler": "Poppler", + "proj": "PROJ", + "qhull": "QHULL", + # "sfcgal": "SFCGAL", + "shapelib": "Shapelib", + "sqlite3": "SQLite3", + "tiledb": "TileDB", + "xerces-c": "XercesC", + "xz_utils": "LibLZMA", + "zlib": "ZLIB", + "zstd": "ZSTD", + # Closed-source/proprietary libraries + # "filegdb": "FileGDB", + # "idb": "IDB", + # "kdu": "KDU", + # "luratech": "LURATECH", + # "mrsid": "MRSID", + # "mssql_ncli": "MSSQL_NCLI", + # "mssql_odbc": "MSSQL_ODBC", + # "oracle": "Oracle", + # "rdb": "rdb", + # "teigha": "TEIGHA", + } + for conan_name, cmake_name in conan_to_cmake_pkg_name.items(): + deps.set_property(conan_name, "cmake_find_mode", "config") + deps.set_property(conan_name, "cmake_file_name", cmake_name) + + renamed_targets = { + "arrow::libarrow": "Arrow::arrow_shared" if Version(self.version) >= "3.7" else "arrow_shared", + "arrow::dataset": "ArrowDataset::arrow_dataset_shared", + "arrow::libparquet": "Parquet::parquet_shared", + "brunsli::brunslidec-c": "BRUNSLI::DECODE", + "brunsli::brunslienc-c": "BRUNSLI::ENCODE", + "c-blosc": "Blosc::Blosc", + "cfitsio": "CFITSIO::CFITSIO", + "crunch": "CRNLIB::Crnlib", + "cryptopp": "CRYPTOPP::CRYPTOPP", + "freexl": "FREEXL::freexl", + "geos": "GEOS::GEOS", + "hdf4": "HDF4::HDF4", + "hdfs": "HDFS::HDFS", + "kealib": "KEA::KEA", + "lerc": "LERC::LERC", + "libaec": "LIBAEC::LIBAEC", + "libarchive": "ARCHIVE::ARCHIVE", + "libbasisu": "basisu::basisu_lib", + "libdeflate": "Deflate::Deflate", + "libecwj2": "ECW::ECW_ALL", + "libgeotiff": "GEOTIFF::GEOTIFF", + "libheif": "HEIF::HEIF", + "libjxl::jxl": "JXL::JXL", + "libjxl::jxl_threads": "JXL_THREADS::JXL_THREADS", + "libjpeg": "JPEG::JPEG", + "libjpeg-turbo::jpeg": "JPEG::JPEG", + "libkml::kmldom": "LIBKML::DOM", + "libkml::kmlengine": "LIBKML::ENGINE", + "libkml": "LIBKML::LibKML", + "librasterlite2": "RASTERLITE2::RASTERLITE2", + "libspatialite": "SPATIALITE::SPATIALITE", + "libwebp": "WEBP::WebP", + "lz4": "LZ4::LZ4", + "mongo-cxx-driver::bsoncxx": "MONGOCXX::BSONCXX", + "mongo-cxx-driver::mongocxx": "MONGOCXX::MONGOCXX", + "netcds": "netCDF::netcdf", + "opencl-icd-loader": "OpenCL::OpenCL", + "openjpeg": "OPENJPEG::OpenJPEG", + "pcre": "PCRE::PCRE", + "pcre2::pcre2-8": "PCRE2::PCRE2-8", + "pdfium": "PDFIUM::PDFIUM", + "podofo": "PODOFO::Podofo", + "poppler": "Poppler::Poppler", + "shapelib": "SHAPELIB::shp", + "tiledb": "TileDB::tiledb_shared", + "xz_utils": "LibLZMA::LibLZMA", + "zstd": "ZSTD::zstd", + } + for component, new_target_name in renamed_targets.items(): + deps.set_property(component, "cmake_target_name", new_target_name) + + deps.generate() + + def _patch_sources(self): apply_conandata_patches(self) - cmake = self._configure_cmake() + # Fix Deflate::Deflate not being correctly propagated internally. + replace_in_file(self, os.path.join(self.source_folder, "port", "CMakeLists.txt"), + "PRIVATE Deflate::Deflate", + "PUBLIC Deflate::Deflate") + # Workaround for JXL_THREADS being provided by the JXL package on CCI. + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "JXL_THREADS", "JXL", strict=False) + # Workaround for Parquet and ArrowDataset being provided by Arrow on CCI. + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "gdal_check_package(Parquet", "# gdal_check_package(Parquet") + if Version(self.version) >= "3.6.0": + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "gdal_check_package(ArrowDataset", "# gdal_check_package(ArrowDataset") + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy("LICENSE.TXT", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.TXT", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "share")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + os.rename(os.path.join(self.package_folder, "share"), + os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "res", "bash-completion")) + rmdir(self, os.path.join(self.package_folder, "res", "man")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "GDAL") self.cpp_info.set_property("cmake_target_name", "GDAL::GDAL") self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("pkg_config_name", "gdal") - self.cpp_info.names["cmake_find_package"] = "GDAL" - self.cpp_info.names["cmake_find_package_multi"] = "GDAL" - self.cpp_info.filenames["cmake_find_package"] = "GDAL" - self.cpp_info.filenames["cmake_find_package_multi"] = "GDAL" - + # https://github.com/OSGeo/gdal/blob/v3.7.2/gdal.cmake#L384-L392 + # FIXME: set the correct postfix for MinGW shared builds libname = "gdal" - if self.settings.os == "Windows": + if is_msvc(self): if self.settings.build_type == "Debug": libname += "d" - self.cpp_info.libs = [ libname ] - - self.cpp_info.requires.extend(['json-c::json-c']) - self.cpp_info.requires.extend(['libgeotiff::libgeotiff']) - + self.cpp_info.libs = [libname] + self.cpp_info.resdirs = ["res"] + + self.cpp_info.requires.extend(["json-c::json-c"]) + self.cpp_info.requires.extend(["libgeotiff::libgeotiff"]) + self.cpp_info.requires.extend(["libtiff::libtiff"]) + self.cpp_info.requires.extend(["proj::projlib"]) + self.cpp_info.requires.extend(["zlib::zlib"]) if self.options.with_armadillo: - self.cpp_info.requires.extend(['armadillo::armadillo']) - + self.cpp_info.requires.extend(["armadillo::armadillo"]) if self.options.with_arrow: - self.cpp_info.requires.extend(['arrow::libarrow']) - + self.cpp_info.requires.extend(["arrow::libarrow"]) + if self.dependencies["arrow"].options.parquet: + self.cpp_info.requires.extend(["arrow::libparquet"]) + if self.dependencies["arrow"].options.dataset_modules: + self.cpp_info.requires.extend(["arrow::dataset"]) + if self.options.with_basisu: + self.cpp_info.requires.extend(["libbasisu::libbasisu"]) + if self.options.with_brunsli: + self.cpp_info.requires.extend(["brunsli::brunsli"]) if self.options.with_blosc: - self.cpp_info.requires.extend(['c-blosc::c-blosc']) - + self.cpp_info.requires.extend(["c-blosc::c-blosc"]) if self.options.with_cfitsio: - self.cpp_info.requires.extend(['cfitsio::cfitsio']) - + self.cpp_info.requires.extend(["cfitsio::cfitsio"]) if self.options.with_cryptopp: - self.cpp_info.requires.extend(['cryptopp::libcryptopp']) - + self.cpp_info.requires.extend(["cryptopp::libcryptopp"]) if self.options.with_curl: - self.cpp_info.requires.extend(['libcurl::curl']) - + self.cpp_info.requires.extend(["libcurl::curl"]) if self.options.with_dds: - self.cpp_info.requires.extend(['crunch::crunch']) - + self.cpp_info.requires.extend(["crunch::crunch"]) + if self.options.with_ecw: + self.cpp_info.requires.extend(["libecwj2::libecwj2"]) if self.options.with_expat: - self.cpp_info.requires.extend(['expat::expat']) - + self.cpp_info.requires.extend(["expat::expat"]) if self.options.with_exr: - self.cpp_info.requires.extend(['openexr::openexr', 'imath::imath']) - + self.cpp_info.requires.extend(["openexr::openexr", "imath::imath"]) if self.options.with_freexl: - self.cpp_info.requires.extend(['freexl::freexl']) - + self.cpp_info.requires.extend(["freexl::freexl"]) if self.options.with_geos: - self.cpp_info.requires.extend(['geos::geos_c']) - + self.cpp_info.requires.extend(["geos::geos_c"]) if self.options.with_gif: - self.cpp_info.requires.extend(['giflib::giflib']) - + self.cpp_info.requires.extend(["giflib::giflib"]) if self.options.with_gta: - self.cpp_info.requires.extend(['libgta::libgta']) - + self.cpp_info.requires.extend(["libgta::libgta"]) if self.options.with_hdf4: - self.cpp_info.requires.extend(['hdf4::hdf4']) - + self.cpp_info.requires.extend(["hdf4::hdf4"]) if self.options.with_hdf5: - self.cpp_info.requires.extend(['hdf5::hdf5_c']) - + self.cpp_info.requires.extend(["hdf5::hdf5_c"]) if self.options.with_heif: - self.cpp_info.requires.extend(['libheif::libheif']) - + self.cpp_info.requires.extend(["libheif::libheif"]) + if self.options.with_jxl: + self.cpp_info.requires.extend(["libjxl::libjxl"]) if self.options.with_kea: - self.cpp_info.requires.extend(['kealib::kealib']) - + self.cpp_info.requires.extend(["kealib::kealib"]) + if self.options.with_lerc: + self.cpp_info.requires.extend(["lerc::lerc"]) + if self.options.get_safe("with_libaec"): + self.cpp_info.requires.extend(["libaec::libaec"]) + if self.options.with_libarchive: + self.cpp_info.requires.extend(["libarchive::libarchive"]) if self.options.with_libdeflate: - self.cpp_info.requires.extend(['libdeflate::libdeflate']) - + self.cpp_info.requires.extend(["libdeflate::libdeflate"]) if self.options.with_libiconv: - self.cpp_info.requires.extend(['libiconv::libiconv']) - + self.cpp_info.requires.extend(["libiconv::libiconv"]) if self.options.with_jpeg == "libjpeg": - self.cpp_info.requires.extend(['libjpeg::libjpeg']) + self.cpp_info.requires.extend(["libjpeg::libjpeg"]) elif self.options.with_jpeg == "libjpeg-turbo": - self.cpp_info.requires.extend(['libjpeg-turbo::turbojpeg']) - + self.cpp_info.requires.extend(["libjpeg-turbo::turbojpeg"]) if self.options.with_libkml: - self.cpp_info.requires.extend(['libkml::kmldom', 'libkml::kmlengine']) - - if self.options.with_libtiff: - self.cpp_info.requires.extend(['libtiff::libtiff']) - + self.cpp_info.requires.extend(["libkml::kmldom", "libkml::kmlengine"]) + if self.options.with_lzma: + self.cpp_info.requires.extend(["xz_utils::xz_utils"]) if self.options.with_lz4: - self.cpp_info.requires.extend(['lz4::lz4']) - + self.cpp_info.requires.extend(["lz4::lz4"]) if self.options.with_mongocxx: - self.cpp_info.requires.extend(['mongo-cxx-driver::mongo-cxx-driver']) - + self.cpp_info.requires.extend(["mongo-cxx-driver::mongo-cxx-driver"]) if self.options.with_mysql == "libmysqlclient": - self.cpp_info.requires.extend(['libmysqlclient::libmysqlclient']) + self.cpp_info.requires.extend(["libmysqlclient::libmysqlclient"]) elif self.options.with_mysql == "mariadb-connector-c": - self.cpp_info.requires.extend(['mariadb-connector-c::mariadb-connector-c']) - + self.cpp_info.requires.extend(["mariadb-connector-c::mariadb-connector-c"]) if self.options.with_netcdf: - self.cpp_info.requires.extend(['netcdf::netcdf']) - + self.cpp_info.requires.extend(["netcdf::netcdf"]) if self.options.with_odbc: - self.cpp_info.requires.extend(['odbc::odbc']) - + self.cpp_info.requires.extend(["odbc::odbc"]) + if self.options.with_opencl: + self.cpp_info.requires.extend(["opencl-icd-loader::opencl-icd-loader"]) if self.options.with_openjpeg: - self.cpp_info.requires.extend(['openjpeg::openjpeg']) - + self.cpp_info.requires.extend(["openjpeg::openjpeg"]) if self.options.with_openssl: - self.cpp_info.requires.extend(['openssl::ssl']) - + self.cpp_info.requires.extend(["openssl::ssl"]) if self.options.with_pcre: - self.cpp_info.requires.extend(['pcre::pcre']) - + self.cpp_info.requires.extend(["pcre::pcre"]) if self.options.with_pcre2: - self.cpp_info.requires.extend(['pcre2::pcre2-8']) - + self.cpp_info.requires.extend(["pcre2::pcre2-8"]) + # if self.options.with_pdfium: + # self.cpp_info.requires.extend(["pdfium::pdfium"]) if self.options.with_pg: - self.cpp_info.requires.extend(['libpq::pq']) - + self.cpp_info.requires.extend(["libpq::pq"]) if self.options.with_png: - self.cpp_info.requires.extend(['libpng::libpng']) - + self.cpp_info.requires.extend(["libpng::libpng"]) if self.options.with_podofo: - self.cpp_info.requires.extend(['podofo::podofo']) - + self.cpp_info.requires.extend(["podofo::podofo"]) if self.options.with_poppler: - self.cpp_info.requires.extend(['poppler::libpoppler']) - - if self.options.with_proj: - self.cpp_info.requires.extend(['proj::projlib']) - + self.cpp_info.requires.extend(["poppler::libpoppler"]) + if self.options.with_rasterlite2: + self.cpp_info.requires.extend(["librasterlite2::librasterlite2"]) if self.options.with_qhull: - self.cpp_info.requires.extend(['qhull::libqhull']) - + self.cpp_info.requires.extend(["qhull::libqhull"]) + if self.options.with_spatialite: + self.cpp_info.requires.extend(["libspatialite::libspatialite"]) if self.options.with_sqlite3: - self.cpp_info.requires.extend(['sqlite3::sqlite']) - + self.cpp_info.requires.extend(["sqlite3::sqlite"]) + if self.options.with_tiledb: + self.cpp_info.requires.extend(["tiledb::tiledb"]) if self.options.with_webp: - self.cpp_info.requires.extend(['libwebp::libwebp']) - + self.cpp_info.requires.extend(["libwebp::libwebp"]) if self.options.with_xerces: - self.cpp_info.requires.extend(['xerces-c::xerces-c']) - + self.cpp_info.requires.extend(["xerces-c::xerces-c"]) if self.options.with_xml2: - self.cpp_info.requires.extend(['libxml2::libxml2']) - - if self.options.with_zlib: - self.cpp_info.requires.extend(['zlib::zlib']) - + self.cpp_info.requires.extend(["libxml2::libxml2"]) if self.options.with_zstd: - self.cpp_info.requires.extend(['zstd::zstdlib']) + self.cpp_info.requires.extend(["zstd::zstdlib"]) + + # Based on https://github.com/OSGeo/gdal/blob/v3.7.2/port/CMakeLists.txt + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs += ["pthread"] + elif self.settings.os == "Windows": + if is_msvc(self): + self.cpp_info.system_libs += ["wbemuuid"] + if self.options.with_openssl: + self.cpp_info.system_libs += ["crypt32"] gdal_data_path = os.path.join(self.package_folder, "res", "gdal") - self.output.info( - "Prepending to GDAL_DATA environment variable: {}".format( - gdal_data_path)) - self.runenv_info.prepend_path("GDAL_DATA", gdal_data_path) - # TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator - self.env_info.GDAL_DATA = gdal_data_path + self.runenv_info.define_path("GDAL_DATA", gdal_data_path) if self.options.tools: - self.buildenv_info.prepend_path("GDAL_DATA", gdal_data_path) - bin_path = os.path.join(self.package_folder, "bin") - self.output.info( - "Appending PATH environment variable: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) + self.buildenv_info.define_path("GDAL_DATA", gdal_data_path) + + # TODO: remove in conan v2 + self.cpp_info.names["cmake_find_package"] = "GDAL" + self.cpp_info.names["cmake_find_package_multi"] = "GDAL" + self.cpp_info.filenames["cmake_find_package"] = "GDAL" + self.cpp_info.filenames["cmake_find_package_multi"] = "GDAL" + self.env_info.GDAL_DATA = gdal_data_path diff --git a/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch deleted file mode 100644 index e790a586d8abd..0000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff --git a/alg/CMakeLists.txt b/alg/CMakeLists.txt -index edf75158c7..4200309ca8 100644 ---- a/alg/CMakeLists.txt -+++ b/alg/CMakeLists.txt -@@ -72,7 +72,7 @@ if (GDAL_USE_OPENCL) - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt -index a49165d14a..91d6170067 100644 ---- a/apps/CMakeLists.txt -+++ b/apps/CMakeLists.txt -@@ -25,7 +25,7 @@ target_include_directories( - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake -index 7fa3b565c7..77a610f223 100644 ---- a/cmake/helpers/CheckDependentLibraries.cmake -+++ b/cmake/helpers/CheckDependentLibraries.cmake -@@ -11,7 +11,10 @@ Detect GDAL dependencies and set variable HAVE_* - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+ -+# Conan recipes should rely on config files from generators so let's just disble GDAL's -+include(ConanFindPackage) -+ - include(CheckSymbolExists) - - option( -@@ -111,47 +114,7 @@ macro (gdal_check_package name purpose) - set(_find_dependency_args "") - find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (NOT DEFINED ${key}_FOUND) -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -+ message(FATAL_ERROR "Conan recipes should rely on config files from generators so let's just disble GDAL's") - endif () - if (${key}_FOUND OR ${name}_FOUND) - set(HAVE_${key} ON) -@@ -321,14 +284,15 @@ if (GDAL_USE_CRYPTOPP) - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) -+#if (NOT PROJ_FOUND) -+# find_package(proj 8 CONFIG QUIET) -+#endif() - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -379,15 +343,10 @@ gdal_check_package(JSONC "json-c library (external)" CAN_DISABLE - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -482,7 +441,7 @@ if (GDAL_USE_RASTERLITE2) - endif () - cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff --git a/cmake/helpers/ConanFindPackage.cmake b/cmake/helpers/ConanFindPackage.cmake -new file mode 100644 -index 0000000000..9dfa8193a3 ---- /dev/null -+++ b/cmake/helpers/ConanFindPackage.cmake -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff --git a/frmts/hfa/CMakeLists.txt b/frmts/hfa/CMakeLists.txt -index e5b7138e91..039cac7361 100644 ---- a/frmts/hfa/CMakeLists.txt -+++ b/frmts/hfa/CMakeLists.txt -@@ -15,7 +15,8 @@ add_gdal_driver( - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff --git a/gdal.cmake b/gdal.cmake -index ff1ca7e6f6..e98875f1b9 100644 ---- a/gdal.cmake -+++ b/gdal.cmake -@@ -795,25 +795,6 @@ if (NOT GDAL_ENABLE_MACOSX_FRAMEWORK) - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff --git a/ogr/CMakeLists.txt b/ogr/CMakeLists.txt -index 19ba4e12fe..87cd123c54 100644 ---- a/ogr/CMakeLists.txt -+++ b/ogr/CMakeLists.txt -@@ -88,12 +88,12 @@ endif () - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff --git a/ogr/ogr_proj_p.h b/ogr/ogr_proj_p.h -index 88928ad1ad..7cdd587db7 100644 ---- a/ogr/ogr_proj_p.h -+++ b/ogr/ogr_proj_p.h -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch deleted file mode 100644 index b01b5b271034c..0000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff --git a/alg/CMakeLists.txt b/alg/CMakeLists.txt -index edf75158c7..4200309ca8 100644 ---- a/alg/CMakeLists.txt -+++ b/alg/CMakeLists.txt -@@ -72,7 +72,7 @@ if (GDAL_USE_OPENCL) - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt -index 8b02cea456..ad4adbfc9e 100644 ---- a/apps/CMakeLists.txt -+++ b/apps/CMakeLists.txt -@@ -25,7 +25,7 @@ target_include_directories( - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake -index 0a66b44fec..152ff42ff7 100644 ---- a/cmake/helpers/CheckDependentLibraries.cmake -+++ b/cmake/helpers/CheckDependentLibraries.cmake -@@ -11,7 +11,10 @@ Detect GDAL dependencies and set variable HAVE_* - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+ -+# Conan recipes should rely on config files from generators so let's just disble GDAL's -+include(ConanFindPackage) -+ - include(CheckSymbolExists) - - option( -@@ -111,47 +114,7 @@ macro (gdal_check_package name purpose) - set(_find_dependency_args "") - find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (NOT DEFINED ${key}_FOUND) -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -+ message(FATAL_ERROR "Conan recipes should rely on config files from generators so let's just disble GDAL's") - endif () - if (${key}_FOUND OR ${name}_FOUND) - set(HAVE_${key} ON) -@@ -345,14 +308,15 @@ if (GDAL_USE_CRYPTOPP) - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) -+#if (NOT PROJ_FOUND) -+# find_package(proj 8 CONFIG QUIET) -+#endif() - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -412,15 +376,10 @@ gdal_check_package(JSONC "json-c library (external)" CAN_DISABLE - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -517,7 +476,7 @@ if (GDAL_USE_RASTERLITE2) - endif () - cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff --git a/cmake/helpers/ConanFindPackage.cmake b/cmake/helpers/ConanFindPackage.cmake -new file mode 100644 -index 0000000000..9dfa8193a3 ---- /dev/null -+++ b/cmake/helpers/ConanFindPackage.cmake -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff --git a/frmts/hfa/CMakeLists.txt b/frmts/hfa/CMakeLists.txt -index e5b7138e91..039cac7361 100644 ---- a/frmts/hfa/CMakeLists.txt -+++ b/frmts/hfa/CMakeLists.txt -@@ -15,7 +15,8 @@ add_gdal_driver( - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff --git a/gdal.cmake b/gdal.cmake -index 4bae2e2760..7695df40c8 100644 ---- a/gdal.cmake -+++ b/gdal.cmake -@@ -787,25 +787,6 @@ if (NOT GDAL_ENABLE_MACOSX_FRAMEWORK) - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff --git a/ogr/CMakeLists.txt b/ogr/CMakeLists.txt -index 19ba4e12fe..87cd123c54 100644 ---- a/ogr/CMakeLists.txt -+++ b/ogr/CMakeLists.txt -@@ -88,12 +88,12 @@ endif () - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff --git a/ogr/ogr_proj_p.h b/ogr/ogr_proj_p.h -index 88928ad1ad..7cdd587db7 100644 ---- a/ogr/ogr_proj_p.h -+++ b/ogr/ogr_proj_p.h -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch new file mode 100644 index 0000000000000..a13e4429270d1 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch @@ -0,0 +1,74 @@ +diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake +--- a/cmake/helpers/CheckDependentLibraries.cmake ++++ b/cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,8 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- if (NOT DEFINED ${key}_FOUND) ++ find_package2(${name} QUIET) ++ if (FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -345,7 +345,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -411,8 +411,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -517,9 +517,9 @@ + endif () + cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) + +-find_package(LibKML COMPONENTS DOM ENGINE) ++find_package2(LibKML COMPONENTS DOM ENGINE) + if (GDAL_USE_LIBKML) + if (NOT LibKML_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") + endif () + endif () +@@ -540,8 +540,8 @@ + gdal_check_package(MRSID "MrSID raster SDK" CAN_DISABLE) + gdal_check_package(Armadillo "C++ library for linear algebra (used for TPS transformation)" CAN_DISABLE) + if (ARMADILLO_FOUND) +- # On Conda, the armadillo package has no dependency on lapack, but the later is required for successful linking. So +- # try to build & link a test program using Armadillo. ++ # On Conda, the armadillo package has no dependency on lapack, but the later is required for successful linking. So try to build & link a test program using Armadillo. ++ include(CMakePushCheckState) + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_INCLUDES "${ARMADILLO_INCLUDE_DIRS}") + set(CMAKE_REQUIRED_LIBRARIES "${ARMADILLO_LIBRARIES}") +@@ -646,7 +646,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch new file mode 100644 index 0000000000000..e45427d007600 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -280,7 +280,7 @@ + set(_oneValueArgs) + set(_multiValueArgs PRIVATE) + cmake_parse_arguments(_DRIVER "" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) +- if (NOT _DRIVER_PRIVATE) ++ if (FALSE AND NOT _DRIVER_PRIVATE) + message(FATAL_ERROR "gdal_target_link_libraries(): PRIVATE is a mandatory argument.") + endif () + is_plugin(RES ${target}) +@@ -289,6 +289,7 @@ + else () + gdal_target_interfaces(${target} ${_DRIVER_PRIVATE}) + gdal_add_private_link_libraries(${_DRIVER_PRIVATE}) ++ target_link_libraries(${ARGV}) + endif () + endfunction() + diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch new file mode 100644 index 0000000000000..31bc2e5a8587d --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -249,6 +249,7 @@ + target_compile_options(${_TARGET} PRIVATE ${_res}) + endif () + get_property(_res TARGET ${_LIB} PROPERTY INTERFACE_LINK_LIBRARIES) ++ list(REMOVE_ITEM _res ${_LIB}) + if (_res) + gdal_target_interfaces(${_TARGET} ${_res}) + endif () +diff --git a/cmake/helpers/GdalGenerateConfig.cmake b/cmake/helpers/GdalGenerateConfig.cmake +--- a/cmake/helpers/GdalGenerateConfig.cmake ++++ b/cmake/helpers/GdalGenerateConfig.cmake +@@ -50,6 +50,7 @@ + if(TARGET "${_lib}") + get_target_property(_link_libraries ${_lib} INTERFACE_LINK_LIBRARIES) + get_target_property(_type ${_lib} TYPE) ++ list(REMOVE_ITEM _link_libraries ${_lib}) + if(_link_libraries AND NOT TYPE STREQUAL "SHARED_LIBRARY") + list(INSERT ARGN 0 ${_link_libraries}) + endif() diff --git a/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch deleted file mode 100644 index 34401a53eae6d..0000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch +++ /dev/null @@ -1,282 +0,0 @@ -diff -urN ./a/alg/CMakeLists.txt ./b/alg/CMakeLists.txt ---- ./a/alg/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/alg/CMakeLists.txt 2023-06-06 16:47:02.784509800 -0500 -@@ -73,7 +73,7 @@ - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff -urN ./a/apps/CMakeLists.txt ./b/apps/CMakeLists.txt ---- ./a/apps/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/apps/CMakeLists.txt 2023-06-06 16:46:55.380690700 -0500 -@@ -26,7 +26,7 @@ - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff -urN ./a/cmake/helpers/CheckDependentLibraries.cmake ./b/cmake/helpers/CheckDependentLibraries.cmake ---- ./a/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 09:33:06.599777700 -0500 -+++ ./b/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 13:38:51.722872200 -0500 -@@ -11,7 +11,8 @@ - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+#include(DefineFindPackage2) -+include(ConanFindPackage) - include(CheckSymbolExists) - - option( -@@ -109,51 +110,8 @@ - string(TOUPPER ${name} key) - set(_find_dependency "") - set(_find_dependency_args "") -- if(FIND_PACKAGE2_${name}_ENABLED) -- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) -- else() -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -- endif () -+ -+ find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (${key}_FOUND OR ${name}_FOUND) - if(_GCP_MINIMUM_VERSION) - -@@ -368,14 +326,12 @@ - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -458,15 +414,10 @@ - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -527,6 +478,24 @@ - gdal_check_package(SQLite3 "Enable SQLite3 support (used by SQLite/Spatialite, GPKG, Rasterlite, MBTiles, etc.)" - CAN_DISABLE RECOMMENDED) - if (SQLite3_FOUND) -+ set(CMAKE_REQUIRED_INCLUDES ${SQLite3_INCLUDE_DIRS}) -+ check_symbol_exists(sqlite3_mutex_alloc sqlite3ext.h SQLite3_HAS_MUTEX_ALLOC) -+ check_symbol_exists(sqlite3_column_table_name sqlite3ext.h SQLite3_HAS_COLUMN_METADATA) -+ check_symbol_exists(sqlite3_rtree_query_callback sqlite3.h SQLite3_HAS_RTREE) -+ check_symbol_exists(sqlite3_load_extension sqlite3ext.h SQLite3_HAS_LOAD_EXTENSION) -+ # https://www.sqlite.org/compile.html recommends to build with -DSQLITE_OMIT_PROGRESS_CALLBACK -+ # "for applications that are able to use them"... This is sometimes wrongly -+ # understood as recommended in all situations. -+ check_symbol_exists(sqlite3_progress_handler sqlite3.h SQLite3_HAS_PROGRESS_HANDLER) -+ -+ #if(NOT TARGET SQLite::SQLite3) -+ # add_library(SQLite::SQLite3 UNKNOWN IMPORTED) -+ # set_target_properties(SQLite::SQLite3 PROPERTIES -+ # INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS}" -+ # IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ # IMPORTED_LOCATION "${SQLite3_LIBRARY}") -+ #endif() -+ - if (NOT DEFINED SQLite3_HAS_COLUMN_METADATA) - message(FATAL_ERROR "missing SQLite3_HAS_COLUMN_METADATA") - endif () -@@ -566,7 +535,7 @@ - gdal_check_package(SPATIALITE "Enable spatialite support for sqlite3" VERSION 4.1.2 CAN_DISABLE) - gdal_check_package(RASTERLITE2 "Enable RasterLite2 support for sqlite3" VERSION 1.1.0 CAN_DISABLE) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff -urN ./a/cmake/helpers/ConanFindPackage.cmake ./b/cmake/helpers/ConanFindPackage.cmake ---- ./a/cmake/helpers/ConanFindPackage.cmake 1969-12-31 18:00:00.000000000 -0600 -+++ ./b/cmake/helpers/ConanFindPackage.cmake 2023-06-06 16:26:55.800008000 -0500 -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff -urN ./a/frmts/hfa/CMakeLists.txt ./b/frmts/hfa/CMakeLists.txt ---- ./a/frmts/hfa/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/frmts/hfa/CMakeLists.txt 2023-06-06 16:54:31.162043900 -0500 -@@ -15,7 +15,8 @@ - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff -urN ./a/gdal.cmake ./b/gdal.cmake ---- ./a/gdal.cmake 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/gdal.cmake 2023-06-06 16:55:34.252830900 -0500 -@@ -859,25 +859,6 @@ - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff -urN ./a/ogr/CMakeLists.txt ./b/ogr/CMakeLists.txt ---- ./a/ogr/CMakeLists.txt 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/ogr/CMakeLists.txt 2023-06-06 16:56:18.682151700 -0500 -@@ -89,12 +89,12 @@ - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff -urN ./a/ogr/ogr_proj_p.h ./b/ogr/ogr_proj_p.h ---- ./a/ogr/ogr_proj_p.h 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/ogr/ogr_proj_p.h 2023-06-06 16:56:30.772908800 -0500 -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch new file mode 100644 index 0000000000000..e25f0d63223d9 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch @@ -0,0 +1,64 @@ +diff -urN ./a/cmake/helpers/CheckDependentLibraries.cmake ./b/cmake/helpers/CheckDependentLibraries.cmake +--- ./a/cmake/helpers/CheckDependentLibraries.cmake ++++ ./b/cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,9 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- if(FIND_PACKAGE2_${name}_ENABLED) +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- else() ++ find_package2(${name} QUIET) ++ if (FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -368,7 +367,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -457,8 +456,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -566,9 +565,9 @@ + gdal_check_package(SPATIALITE "Enable spatialite support for sqlite3" VERSION 4.1.2 CAN_DISABLE) + gdal_check_package(RASTERLITE2 "Enable RasterLite2 support for sqlite3" VERSION 1.1.0 CAN_DISABLE) + +-find_package(LibKML COMPONENTS DOM ENGINE) ++find_package2(LibKML COMPONENTS DOM ENGINE) + if (GDAL_USE_LIBKML) + if (NOT LibKML_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") + endif () + endif () +@@ -733,7 +732,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch b/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch new file mode 100644 index 0000000000000..d5b761df32ded --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -280,7 +280,7 @@ + set(_oneValueArgs) + set(_multiValueArgs PRIVATE) + cmake_parse_arguments(_DRIVER "" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) +- if (NOT _DRIVER_PRIVATE) ++ if (FALSE AND NOT _DRIVER_PRIVATE) + message(FATAL_ERROR "gdal_target_link_libraries(): PRIVATE is a mandatory argument.") + endif () + is_plugin(RES ${target}) +@@ -297,6 +297,7 @@ + else () + gdal_target_interfaces(${target} ${_DRIVER_PRIVATE}) + gdal_add_private_link_libraries(${_DRIVER_PRIVATE}) ++ target_link_libraries(${ARGV}) + endif () + + # For debugging purposes diff --git a/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch new file mode 100644 index 0000000000000..c82d659742baf --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch @@ -0,0 +1,52 @@ +--- cmake/helpers/CheckDependentLibraries.cmake ++++ cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,9 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- if(FIND_PACKAGE2_${name}_ENABLED) +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- else() ++ find_package2(${name} QUIET) ++ if(FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -368,7 +367,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -457,8 +456,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -727,7 +726,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt b/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt index 861d8d69409b0..356b571fb9c63 100644 --- a/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(GDAL REQUIRED) +find_package(GDAL REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} GDAL::GDAL) diff --git a/recipes/gdal/post_3.5.0/test_package/conanfile.py b/recipes/gdal/post_3.5.0/test_package/conanfile.py index 9dced2ad9cf71..9ae9dd1c61f74 100644 --- a/recipes/gdal/post_3.5.0/test_package/conanfile.py +++ b/recipes/gdal/post_3.5.0/test_package/conanfile.py @@ -1,12 +1,20 @@ -from conan import ConanFile -from conan.tools.build import cross_building -from conans import CMake import os +from conan import ConanFile, conan_version +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -14,10 +22,11 @@ def build(self): cmake.build() def test(self): - if not cross_building(self): - if self.options["gdal"].tools: - self.run("gdal_translate --formats", run_environment=True) - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - bin_path_c = os.path.join("bin", "test_package_c") - self.run(bin_path_c, run_environment=True) + if can_run(self): + gdal_options = self.options["gdal"] if conan_version < "2" else self.dependencies["gdal"].options + if gdal_options.tools: + self.run("gdal_translate --formats", env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") + bin_path_c = os.path.join(self.cpp.build.bindir, "test_package_c") + self.run(bin_path_c, env="conanrun") diff --git a/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt b/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..b21cc49efde95 --- /dev/null +++ b/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py b/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e5d5a707ca0b3 --- /dev/null +++ b/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py @@ -0,0 +1,23 @@ +from conan import ConanFile +from conan.tools.build import cross_building +from conans import CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + if self.options["gdal"].tools: + self.run("gdal_translate --formats", run_environment=True) + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + bin_path_c = os.path.join("bin", "test_package_c") + self.run(bin_path_c, run_environment=True) From 540fe700422c9d5effb6a3e6b6f84e71fcac59b9 Mon Sep 17 00:00:00 2001 From: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:10:16 +0000 Subject: [PATCH 096/108] (#22812) [nmos-cpp] Bump dependencies to match upstream --- recipes/nmos-cpp/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/nmos-cpp/all/conanfile.py b/recipes/nmos-cpp/all/conanfile.py index 67cbae93e0a0b..d2bed5c1666e3 100644 --- a/recipes/nmos-cpp/all/conanfile.py +++ b/recipes/nmos-cpp/all/conanfile.py @@ -54,8 +54,8 @@ def requirements(self): self.requires("cpprestsdk/2.10.18", transitive_headers=True) self.requires("websocketpp/0.8.2") self.requires("openssl/[>=1.1 <4]") - self.requires("json-schema-validator/2.2.0") - self.requires("nlohmann_json/3.11.2") + self.requires("json-schema-validator/2.3.0") + self.requires("nlohmann_json/3.11.3") self.requires("zlib/[>=1.2.11 <2]") if self.options.get_safe("with_dnssd") == "mdnsresponder": From c2f3d1f999853d18cb9c4a1d134dc085f8377bb2 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 20 Feb 2024 19:41:47 +0100 Subject: [PATCH 097/108] (#22829) [config] Add Valgur as community reviewer Signed-off-by: Uilian Ries --- .c3i/reviewers.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/reviewers.yml b/.c3i/reviewers.yml index 3578b7dccdc68..a5e7a155eee13 100644 --- a/.c3i/reviewers.yml +++ b/.c3i/reviewers.yml @@ -87,3 +87,6 @@ reviewers: - user: "juansblanco" type: "team" request_reviews: false + - user: "valgur" + type: "community" + request_reviews: false From 579766920b3e3c8f9949895c8be18c8926c6774a Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 21 Feb 2024 06:29:22 +0900 Subject: [PATCH 098/108] (#22792) cctz: add version 2.4 * cctz: add version 2.4 * disable benchmark --- recipes/cctz/all/conandata.yml | 16 ++++++++++++++-- recipes/cctz/all/conanfile.py | 6 +++--- ...ion.patch => 2.3-0001-fix-installation.patch} | 0 ...patch => 2.3-0002-fix-frameworks-apple.patch} | 0 .../all/patches/2.4-0001-fix-installation.patch | 13 +++++++++++++ recipes/cctz/config.yml | 2 ++ 6 files changed, 32 insertions(+), 5 deletions(-) rename recipes/cctz/all/patches/{0001-fix-installation.patch => 2.3-0001-fix-installation.patch} (100%) rename recipes/cctz/all/patches/{0002-fix-frameworks-apple.patch => 2.3-0002-fix-frameworks-apple.patch} (100%) create mode 100644 recipes/cctz/all/patches/2.4-0001-fix-installation.patch diff --git a/recipes/cctz/all/conandata.yml b/recipes/cctz/all/conandata.yml index 112fd00e61958..79ee8c2ac2c09 100644 --- a/recipes/cctz/all/conandata.yml +++ b/recipes/cctz/all/conandata.yml @@ -1,8 +1,20 @@ sources: + "2.4": + url: "https://github.com/google/cctz/archive/v2.4.tar.gz" + sha256: "e1a00957d472044808a24a26f1ba020f36dc26949a69c214562d96b74093adb3" "2.3": url: "https://github.com/google/cctz/archive/v2.3.tar.gz" sha256: "8615b20d4e33e02a271c3b93a3b208e3d7d5d66880f5f6208b03426e448f32db" patches: + "2.4": + - patch_file: "patches/2.4-0001-fix-installation.patch" + patch_description: "fix install destination" + patch_type: "portability" "2.3": - - patch_file: "patches/0001-fix-installation.patch" - - patch_file: "patches/0002-fix-frameworks-apple.patch" + - patch_file: "patches/2.3-0001-fix-installation.patch" + patch_description: "fix install destination" + patch_type: "portability" + - patch_file: "patches/2.3-0002-fix-frameworks-apple.patch" + patch_description: "link CoreFoundation on macOS" + patch_type: "portability" + patch_source: "https://github.com/google/cctz/pull/97" diff --git a/recipes/cctz/all/conanfile.py b/recipes/cctz/all/conanfile.py index f4eb7ecd52b25..ebb60c3eb62b6 100644 --- a/recipes/cctz/all/conanfile.py +++ b/recipes/cctz/all/conanfile.py @@ -10,12 +10,11 @@ class CCTZConan(ConanFile): name = "cctz" + description = "C++ library for translating between absolute and civil times" + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/cctz" - description = "C++ library for translating between absolute and civil times" topics = ("time", "timezones") - license = "Apache-2.0" - package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -54,6 +53,7 @@ def generate(self): tc.variables["BUILD_TOOLS"] = self.options.build_tools tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_BENCHMARK"] = False # For shared msvc tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True # Relocatable shared lib on Macos diff --git a/recipes/cctz/all/patches/0001-fix-installation.patch b/recipes/cctz/all/patches/2.3-0001-fix-installation.patch similarity index 100% rename from recipes/cctz/all/patches/0001-fix-installation.patch rename to recipes/cctz/all/patches/2.3-0001-fix-installation.patch diff --git a/recipes/cctz/all/patches/0002-fix-frameworks-apple.patch b/recipes/cctz/all/patches/2.3-0002-fix-frameworks-apple.patch similarity index 100% rename from recipes/cctz/all/patches/0002-fix-frameworks-apple.patch rename to recipes/cctz/all/patches/2.3-0002-fix-frameworks-apple.patch diff --git a/recipes/cctz/all/patches/2.4-0001-fix-installation.patch b/recipes/cctz/all/patches/2.4-0001-fix-installation.patch new file mode 100644 index 0000000000000..14cc64c0dac26 --- /dev/null +++ b/recipes/cctz/all/patches/2.4-0001-fix-installation.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 472f26f..553876c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -170,7 +170,7 @@ include(GNUInstallDirs) + install(TARGETS cctz + EXPORT ${PROJECT_NAME}-targets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cctz +- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) diff --git a/recipes/cctz/config.yml b/recipes/cctz/config.yml index 3b05bfcc11215..fc444f7e23a6d 100644 --- a/recipes/cctz/config.yml +++ b/recipes/cctz/config.yml @@ -1,3 +1,5 @@ versions: + "2.4": + folder: all "2.3": folder: all From 7c7cb1c44423b3d4a723a14911aac1641f415658 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 21 Feb 2024 00:43:33 +0100 Subject: [PATCH 099/108] (#22817) [boost] Hotfix: Detect cxxstd flag correctly * Detect cxxstd flag Signed-off-by: Uilian Ries * fix has cppstd 11 method Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/boost/all/conanfile.py | 66 ++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 3b5363de53882..a8416e04190c4 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -161,6 +161,66 @@ def export(self): def export_sources(self): export_conandata_patches(self) + def _cppstd_flag(self, compiler_cppstd=None): + """Return the flag for the given C++ standard and compiler""" + # TODO: Replace it by Conan tool when available: https://github.com/conan-io/conan/issues/12603 + compiler = self.settings.get_safe("compiler") + compiler_version = self.settings.get_safe("compiler.version") + cppstd = self.settings.get_safe("compiler.cppstd") or compiler_cppstd + if not compiler or not compiler_version or not cppstd: + return "" + + def _cppstd_gcc(gcc_version, cppstd): + """Return the flag for the given C++ standard and GCC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if gcc_version >= "3.4" else None) + cppstd_flags.setdefault("11", "11" if gcc_version >= "4.7" else "0x" if gcc_version >= "4.3" else None) + cppstd_flags.setdefault("14", "14" if gcc_version >= "4.9" else "1y" if gcc_version >= "4.8" else None) + cppstd_flags.setdefault("17", "17" if gcc_version >= "5.2" else "1z" if gcc_version >= "5" else None) + cppstd_flags.setdefault("20", "2a" if gcc_version >= "8" else "20" if gcc_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if gcc_version >= "11" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "3.1" else "0x" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "3.5" else "1y" if clang_version >= "3.4" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "5" else "1z" if clang_version >= "3.5" else None) + cppstd_flags.setdefault("20", "2a" if clang_version >= "6" else "20" if clang_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13" else "23" if clang_version >= "17" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + + def _cppstd_apple_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Apple Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "6.1" else "1y" if clang_version >= "5.1" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "9.1" else "1z" if clang_version >= "6.1" else None) + cppstd_flags.setdefault("20", "20" if clang_version >= "13.0" else "2a" if clang_version >= "10.0" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13.0" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_msvc(visual_version, cppstd): + """Return the flag for the given C++ standard and MSVC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98") + cppstd_flags.setdefault("11", "11") + cppstd_flags.setdefault("14", "14" if visual_version >= "190" else None) + cppstd_flags.setdefault("17", "17" if visual_version >= "191" else "latest" if visual_version >= "190" else None) + cppstd_flags.setdefault("20", "20" if visual_version >= "192" else "latest" if visual_version >= "191" else None) + cppstd_flags.setdefault("23", "latest" if visual_version >= "193" else None) + return cppstd_flags.get(cppstd) + + func = {"gcc": _cppstd_gcc, "clang": _cppstd_clang, "apple-clang": _cppstd_apple_clang, "msvc": _cppstd_msvc}.get(compiler) + flag = cppstd + if func: + flag = func(Version(compiler_version), str(cppstd)) + return flag + @property def _min_compiler_version_default_cxx11(self): """ Minimum compiler version having c++ standard >= 11 @@ -183,6 +243,7 @@ def _min_compiler_version_default_cxx20(self): "msvc": 999, }.get(str(self.settings.compiler)) + @property def _has_cppstd_11_supported(self): cppstd = self.settings.compiler.get_safe("cppstd") if cppstd: @@ -1104,12 +1165,13 @@ def add_defines(library): safe_cppstd = self.settings.get_safe("compiler.cppstd") if safe_cppstd: - cppstd_version = safe_cppstd.replace("gnu", "") + cppstd_version = self._cppstd_flag(safe_cppstd) flags.append(f"cxxstd={cppstd_version}") if "gnu" in safe_cppstd: flags.append("cxxstd-dialect=gnu") elif self._has_cppstd_11_supported: - flags.append("cxxstd=11") + cppstd_version = self._cppstd_flag("11") + flags.append(f"cxxstd={cppstd_version}") # LDFLAGS link_flags = [] From bf4b77daebe9064a4bdb9781bf6d234979fd54ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Meusel?= Date: Wed, 21 Feb 2024 09:50:15 +0100 Subject: [PATCH 100/108] (#22836) botan: add version 2.19.4 --- recipes/botan/all/conandata.yml | 3 +++ recipes/botan/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index 8bc337e6d41ee..ee8935ff07aeb 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -14,6 +14,9 @@ sources: "2.19.3": url: "https://github.com/randombit/botan/archive/2.19.3.tar.gz" sha256: "8f568bf74c2e476d92ac8a1cfc2ba8407ec038fe9458bd0a11e7da827a9b8199" + "2.19.4": + url: "https://github.com/randombit/botan/archive/2.19.4.tar.gz" + sha256: "5754a6b5ddc3c74b0cb8671531feea69d03a4f3b5bdafa5f75e4c73a1242e5b1" "3.0.0": url: "https://github.com/randombit/botan/archive/3.0.0.tar.gz" sha256: "8bafe2e965fa9ccf92ef5741165d735c9fbbe6376c373bbf5702495ad2dfb814" diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index aada9ec401094..d8302fc602e57 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -9,6 +9,8 @@ versions: folder: all "2.19.3": folder: all + "2.19.4": + folder: all "3.0.0": folder: all "3.1.0": From 2a0bbad518104bbae4b4df65d1cf48c767c5286f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Thu, 22 Feb 2024 10:24:10 +0100 Subject: [PATCH 101/108] (#22830) openexr: Backport libdeflate handling, remove unused options & remove website compilation * Backport openexr libdeflate * Check for version when disabling website subdirectory --- recipes/openexr/2.x/conandata.yml | 32 -------- .../patches/2.5.4-0001-cstdint-include.patch | 37 --------- recipes/openexr/3.x/conandata.yml | 12 +-- recipes/openexr/3.x/conanfile.py | 22 ++++- .../3.x/patches/3.2.1-find-libdeflate.patch | 82 +++++++++++++++++++ recipes/openexr/config.yml | 10 --- 6 files changed, 106 insertions(+), 89 deletions(-) delete mode 100644 recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch create mode 100644 recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch diff --git a/recipes/openexr/2.x/conandata.yml b/recipes/openexr/2.x/conandata.yml index 6cbbea809703f..6ab19656a3a57 100644 --- a/recipes/openexr/2.x/conandata.yml +++ b/recipes/openexr/2.x/conandata.yml @@ -5,18 +5,6 @@ sources: "2.5.7": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.7.tar.gz" sha256: "36ecb2290cba6fc92b2ec9357f8dc0e364b4f9a90d727bf9a57c84760695272d" - "2.5.5": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.tar.gz" - sha256: "59e98361cb31456a9634378d0f653a2b9554b8900f233450f2396ff495ea76b3" - "2.5.4": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.4.tar.gz" - sha256: "dba19e9c6720c6f64fbc8b9d1867eaa75da6438109b941eefdc75ed141b6576d" - "2.5.3": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.3.tar.gz" - sha256: "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf" - "2.5.2": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.2.tar.gz" - sha256: "5da8dff448d0c4a529e52c97daf238a461d01cd233944f75095668d6d7528761" "2.4.0": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.4.0.tar.gz" sha256: "4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1" @@ -26,26 +14,6 @@ patches: patch_description: "Add #include as required by newer gcc versions" patch_type: "portability" patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.5": - - patch_file: "patches/2.5.7-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.4": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.3": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.2": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" "2.4.0": - patch_file: "patches/2.4.0-0001-cstdint-include.patch" patch_description: "Add #include as required by newer gcc versions" diff --git a/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch b/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch deleted file mode 100644 index a30277a2740a5..0000000000000 --- a/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git OpenEXR/IlmImf/ImfDwaCompressor.cpp OpenEXR/IlmImf/ImfDwaCompressor.cpp -index 59d1d5d..585a3e6 100644 ---- OpenEXR/IlmImf/ImfDwaCompressor.cpp -+++ OpenEXR/IlmImf/ImfDwaCompressor.cpp -@@ -158,6 +158,7 @@ - #include - - #include -+#include - - - // Windows specific addition to prevent the indirect import of the redefined min/max macros -diff --git OpenEXR/IlmImf/ImfHuf.cpp OpenEXR/IlmImf/ImfHuf.cpp -index 271849b..165fac5 100644 ---- OpenEXR/IlmImf/ImfHuf.cpp -+++ OpenEXR/IlmImf/ImfHuf.cpp -@@ -53,6 +53,7 @@ - #include - #include - #include -+#include - - - using namespace std; -diff --git OpenEXR/IlmImf/ImfMisc.cpp OpenEXR/IlmImf/ImfMisc.cpp -index d2c8478..0451a33 100644 ---- OpenEXR/IlmImf/ImfMisc.cpp -+++ OpenEXR/IlmImf/ImfMisc.cpp -@@ -54,6 +54,8 @@ - #include - #include "ImfNamespace.h" - -+#include -+ - OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - using IMATH_NAMESPACE::Box2i; diff --git a/recipes/openexr/3.x/conandata.yml b/recipes/openexr/3.x/conandata.yml index 2a41f1e247f6e..778602cf612b4 100644 --- a/recipes/openexr/3.x/conandata.yml +++ b/recipes/openexr/3.x/conandata.yml @@ -8,15 +8,16 @@ sources: "3.1.7": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.7.tar.gz" sha256: "78dbca39115a1c526e6728588753955ee75fa7f5bb1a6e238bed5b6d66f91fd7" - "3.1.5": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.5.tar.gz" - sha256: "93925805c1fc4f8162b35f0ae109c4a75344e6decae5a240afdfce25f8a433ec" patches: "3.2.1": - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" patch_type: "portability" patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + - patch_file: "patches/3.2.1-find-libdeflate.patch" + patch_description: "Use find_package for libdeflate" + patch_type: "backport" + patch_source: "https://github.com/AcademySoftwareFoundation/openexr/pull/1613" "3.1.9": - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" @@ -27,8 +28,3 @@ patches: patch_description: "Workaround for GCC 5 bug" patch_type: "portability" patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" - "3.1.5": - - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" - patch_description: "Workaround for GCC 5 bug" - patch_type: "portability" - patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" diff --git a/recipes/openexr/3.x/conanfile.py b/recipes/openexr/3.x/conanfile.py index 71838c85f0a04..0948ac5e19152 100644 --- a/recipes/openexr/3.x/conanfile.py +++ b/recipes/openexr/3.x/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, replace_in_file from conan.tools.scm import Version import os @@ -31,6 +31,10 @@ class OpenEXRConan(ConanFile): def _min_cppstd(self): return 11 + @property + def _with_libdeflate(self): + return Version(self.version) >= "3.2" + def export_sources(self): export_conandata_patches(self) @@ -49,6 +53,8 @@ def requirements(self): self.requires("zlib/[>=1.2.11 <2]") # Note: OpenEXR and Imath are versioned independently. self.requires("imath/3.1.9", transitive_headers=True) + if self._with_libdeflate: + self.requires("libdeflate/1.19") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -61,13 +67,23 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["OPENEXR_INSTALL_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_WEBSITE"] = False tc.variables["DOCS"] = False tc.generate() cd = CMakeDeps(self) cd.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + + if Version(self.version) >= "3.2": + # Even with BUILD_WEBSITE, Website target is compiled in 3.2 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(website/src)", + "# add_subdirectory(website/src)") + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -138,6 +154,8 @@ def package_info(self): OpenEXRCore = self._add_component("OpenEXRCore") OpenEXRCore.libs = [f"OpenEXRCore{lib_suffix}"] OpenEXRCore.requires = [self._conan_comp("OpenEXRConfig"), "zlib::zlib"] + if self._with_libdeflate: + OpenEXRCore.requires.append("libdeflate::libdeflate") if self.settings.os in ["Linux", "FreeBSD"]: OpenEXRCore.system_libs = ["m"] diff --git a/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch b/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch new file mode 100644 index 0000000000000..713d06bd8b4c9 --- /dev/null +++ b/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch @@ -0,0 +1,82 @@ +diff --git a/cmake/OpenEXR.pc.in b/cmake/OpenEXR.pc.in +index bce35c2..88ddc9a 100644 +--- a/cmake/OpenEXR.pc.in ++++ b/cmake/OpenEXR.pc.in +@@ -14,7 +14,7 @@ Name: OpenEXR + Description: OpenEXR image library + Version: @OPENEXR_VERSION@ + +-Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} @EXR_DEFLATE_LDFLAGS@ ++Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} + Cflags: -I${includedir} -I${OpenEXR_includedir} @exr_pthread_cflags@ + Requires: Imath +- ++Requires.private: @EXR_DEFLATE_PKGCONFIG_REQUIRES@ +diff --git a/cmake/OpenEXRSetup.cmake b/cmake/OpenEXRSetup.cmake +index ef5c6c0..0a7dabc 100644 +--- a/cmake/OpenEXRSetup.cmake ++++ b/cmake/OpenEXRSetup.cmake +@@ -160,15 +160,40 @@ set(OPENEXR_DEFLATE_TAG "v1.18" CACHE STRING "Tag to use for libdeflate source r + if(NOT OPENEXR_FORCE_INTERNAL_DEFLATE) + #TODO: ^^ Release should not clone from main, this is a place holder + set(CMAKE_IGNORE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-src/config;${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-build/config") +- include(FindPkgConfig) +- pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) +- set(CMAKE_IGNORE_PATH) +- if (deflate_FOUND) +- message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ # First try cmake config ++ find_package(libdeflate CONFIG QUIET) ++ if(libdeflate_FOUND) ++ if(TARGET libdeflate::libdeflate_shared) ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_shared) ++ else() ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_static) ++ endif() ++ set(EXR_DEFLATE_VERSION ${libdeflate_VERSION}) ++ message(STATUS "Using libdeflate from ${libdeflate_DIR}") ++ else() ++ # If not found, try pkgconfig ++ find_package(PkgConfig) ++ if(PKG_CONFIG_FOUND) ++ include(FindPkgConfig) ++ pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) ++ if(deflate_FOUND) ++ set(EXR_DEFLATE_LIB PkgConfig::deflate) ++ set(EXR_DEFLATE_VERSION ${deflate_VERSION}) ++ message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ endif() ++ endif() + endif() ++ set(CMAKE_IGNORE_PATH) + endif() + +-if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) ++if(EXR_DEFLATE_LIB) ++ # Using external library ++ set(EXR_DEFLATE_SOURCES) ++ set(EXR_DEFLATE_INCLUDE_DIR) ++ # For OpenEXR.pc.in for static build ++ set(EXR_DEFLATE_PKGCONFIG_REQUIRES "libdeflate >= ${EXR_DEFLATE_VERSION}") ++else() ++ # Using internal deflate + if(OPENEXR_FORCE_INTERNAL_DEFLATE) + message(STATUS "libdeflate forced internal, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})") + else() +@@ -213,16 +238,6 @@ if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) + list(TRANSFORM EXR_DEFLATE_SOURCES PREPEND ${deflate_SOURCE_DIR}/) + set(EXR_DEFLATE_INCLUDE_DIR ${deflate_SOURCE_DIR}) + set(EXR_DEFLATE_LIB) +-else() +- set(EXR_DEFLATE_INCLUDE_DIR) +- set(EXR_DEFLATE_LIB ${deflate_LIBRARIES}) +- # set EXR_DEFATE_LDFLAGS for OpenEXR.pc.in for static build +- if (BUILD_SHARED_LIBS) +- set(EXR_DEFLATE_LDFLAGS "") +- else() +- set(EXR_DEFLATE_LDFLAGS "-l${deflate_LIBRARIES}") +- endif() +- set(EXR_DEFLATE_SOURCES) + endif() + + ####################################### diff --git a/recipes/openexr/config.yml b/recipes/openexr/config.yml index c5e2b53e89f02..79091d0404e1f 100644 --- a/recipes/openexr/config.yml +++ b/recipes/openexr/config.yml @@ -5,19 +5,9 @@ versions: folder: "3.x" "3.1.7": folder: "3.x" - "3.1.5": - folder: "3.x" "2.5.9": folder: "2.x" "2.5.7": folder: "2.x" - "2.5.5": - folder: "2.x" - "2.5.4": - folder: "2.x" - "2.5.3": - folder: "2.x" - "2.5.2": - folder: "2.x" "2.4.0": folder: "2.x" From a63015048da9c53f6bc45867f156f4e5a5e6a1b3 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 18:49:28 +0900 Subject: [PATCH 102/108] (#22585) lua: add options with_tools, with_readline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- recipes/lua/all/CMakeLists.txt | 54 ++++++++++++++-------------------- recipes/lua/all/conanfile.py | 20 +++++++++++-- 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/recipes/lua/all/CMakeLists.txt b/recipes/lua/all/CMakeLists.txt index ed493a41f2982..e3f4b3962a3a1 100644 --- a/recipes/lua/all/CMakeLists.txt +++ b/recipes/lua/all/CMakeLists.txt @@ -63,46 +63,36 @@ IF (UNIX) ENDIF () ENDIF () +include(GNUInstallDirs) + INSTALL ( TARGETS lua - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -IF (NOT DEFINED SKIP_INSTALL_TOOLS) +IF (NOT SKIP_INSTALL_TOOLS) ADD_EXECUTABLE ( luac ${SRC_LUAC} ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly. ADD_EXECUTABLE ( luai ${SRC_LUAI} ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - IF (UNIX) - IF (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) - SET (_LIB_READLINE_NAME edit) - ELSE () - SET (_LIB_READLINE_NAME readline) - ENDIF () - FIND_LIBRARY (LIB_READLINE NAMES ${_LIB_READLINE_NAME}) - IF (LIB_READLINE) - TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE) - TARGET_LINK_LIBRARIES(luai ${LIB_READLINE}) - IF (_LIB_READLINE_NAME STREQUAL edit) - TARGET_INCLUDE_DIRECTORIES (luai PUBLIC /usr/include/edit) - ENDIF () - ENDIF () + IF (WITH_READLINE) + find_package(readline REQUIRED CONFIG) + TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE) + TARGET_LINK_LIBRARIES(luai readline::readline) ENDIF () - INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) ENDIF () -IF (NOT DEFINED SKIP_INSTALL_HEADERS) - INSTALL( - FILES - ${SOURCE_DIR}/src/lualib.h - ${SOURCE_DIR}/src/lua.h - ${SOURCE_DIR}/src/luaconf.h - ${SOURCE_DIR}/src/lauxlib.h - DESTINATION include - ) - # If using C++, don't install extern "C" wrapper. - IF (NOT COMPILE_AS_CPP) - INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION include) - ENDIF () +INSTALL( + FILES + ${SOURCE_DIR}/src/lualib.h + ${SOURCE_DIR}/src/lua.h + ${SOURCE_DIR}/src/luaconf.h + ${SOURCE_DIR}/src/lauxlib.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) +# If using C++, don't install extern "C" wrapper. +IF (NOT COMPILE_AS_CPP) + INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ENDIF () diff --git a/recipes/lua/all/conanfile.py b/recipes/lua/all/conanfile.py index 72ee3c59253a9..0214442bfcf23 100644 --- a/recipes/lua/all/conanfile.py +++ b/recipes/lua/all/conanfile.py @@ -1,7 +1,8 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, load, save, export_conandata_patches, apply_conandata_patches, collect_libs from conan.tools.apple import fix_apple_shared_install_name @@ -22,11 +23,15 @@ class LuaConan(ConanFile): "shared": [False, True], "fPIC": [True, False], "compile_as_cpp": [True, False], + "with_tools": [True, False], + "with_readline": [True, False], } default_options = { "shared": False, "fPIC": True, "compile_as_cpp": False, + "with_tools": False, + "with_readline": False, } def export_sources(self): @@ -47,15 +52,26 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + if self.options.with_tools and self.options.with_readline: + self.requires("readline/8.2") + + def validate(self): + if not self.options.with_tools and self.options.with_readline: + raise ConanInvalidConfiguration(f"{self.ref} requires readline only with with_tools=True") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["LUA_SRC_DIR"] = self.source_folder.replace("\\", "/") - tc.variables["SKIP_INSTALL_TOOLS"] = True tc.variables["COMPILE_AS_CPP"] = self.options.compile_as_cpp + tc.variables["SKIP_INSTALL_TOOLS"] = not self.options.with_tools + tc.variables["WITH_READLINE"] = self.options.with_readline tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): apply_conandata_patches(self) From 8caefc1795971b08f2b8067f306a6fb86ac315e1 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 19:29:36 +0900 Subject: [PATCH 103/108] (#22785) glaze: add version 2.1.4 * glaze: add version 2.1.3 * update 2.1.4 * revert 2.1.3 for gcc 11 * drop 2.1.3, relax gcc version for 2.1.4 --- recipes/glaze/all/conandata.yml | 21 +++------------------ recipes/glaze/all/conanfile.py | 15 ++++++++++++--- recipes/glaze/config.yml | 14 ++------------ 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 4e699ca475415..eac1dcf403a4d 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.4": + url: "https://github.com/stephenberry/glaze/archive/v2.1.4.tar.gz" + sha256: "cbaba4dfbaaf342c8be8e6834cb79933b080ac89f3aa1470bc7a83197d9ebc1a" "2.1.0": url: "https://github.com/stephenberry/glaze/archive/v2.1.0.tar.gz" sha256: "b3bb4d886f17d266f37a6eec2c42b2e57e287918b20511297c4eb6b9960f0f8f" @@ -11,27 +14,9 @@ sources: "2.0.6": url: "https://github.com/stephenberry/glaze/archive/v2.0.6.tar.gz" sha256: "aa5d4921382e9781998ebbf6d36964556daa3367a2aef5ca814122502b450abc" - "2.0.5": - url: "https://github.com/stephenberry/glaze/archive/v2.0.5.tar.gz" - sha256: "a826c823dd125e25ecd29881775df5db07ccacd5358a04efba2b290eb6c945eb" - "2.0.3": - url: "https://github.com/stephenberry/glaze/archive/v2.0.3.tar.gz" - sha256: "7e155d2970329ff4a13fe1d4c4e4b63509405a984b4f37ef9f92b8756bb3c8ce" - "2.0.2": - url: "https://github.com/stephenberry/glaze/archive/v2.0.2.tar.gz" - sha256: "af65752fb523c82313bfbe9c04ab47e332d881154f06c63967b973ee51e5923d" - "2.0.1": - url: "https://github.com/stephenberry/glaze/archive/v2.0.1.tar.gz" - sha256: "0f515588189796696a802c88b0308b5386376d202c7ff1875683f38316f09c90" - "2.0.0": - url: "https://github.com/stephenberry/glaze/archive/v2.0.0.tar.gz" - sha256: "8553ade81a20b1a7c8398f95490ab540f34a78f226f7fe5555dfcbbaf216e108" "1.9.9": url: "https://github.com/stephenberry/glaze/archive/v1.9.9.tar.gz" sha256: "7e2605046742a89ec455887a5a0d6b3188ed5c14ea309c5eb9814848c26bedca" - "1.9.5": - url: "https://github.com/stephenberry/glaze/archive/v1.9.5.tar.gz" - sha256: "3800fa7283a1d4e5bd2c746fe9e268d2f8af76d3a75be7318b2084f38f529c7f" "1.8.5": url: "https://github.com/stephenberry/glaze/archive/v1.8.5.tar.gz" sha256: "5d876eed5689f1947ea4eafd9f13a4e0b527611a6b1857c79a5d598a856287b4" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index f991920259f6a..4237860bf397f 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -25,13 +25,16 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): - return { + versions = { "Visual Studio": "17", "msvc": "193", - "gcc": "10" if Version(self.version) < "1.9.0" else "11", + "gcc": "10", "clang": "12", "apple-clang": "13.1", } + if Version(self.version) >= "1.9.0": + versions["gcc"] = "11" + return versions def layout(self): basic_layout(self, src_folder="src") @@ -40,7 +43,13 @@ def package_id(self): self.info.clear() def validate(self): - if self.settings.get_safe("compiler.cppstd"): + if Version(self.version) >= "2.1.4" and \ + self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "11.3": + raise ConanInvalidConfiguration( + f"{self.ref} doesn't support 11.0<=gcc<11.3 due to gcc bug. Please use gcc>=11.3 and set compiler.version.(ex. compiler.version=11.3)", + ) + + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 45dcbfc2283ba..b7b45251fb8a4 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.4": + folder: all "2.1.0": folder: all "2.0.9": @@ -7,19 +9,7 @@ versions: folder: all "2.0.6": folder: all - "2.0.5": - folder: all - "2.0.3": - folder: all - "2.0.2": - folder: all - "2.0.1": - folder: all - "2.0.0": - folder: all "1.9.9": folder: all - "1.9.5": - folder: all "1.8.5": folder: all From b03197b110c6f59260089eec788b50bfd8cd10cd Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 19:48:21 +0900 Subject: [PATCH 104/108] (#22797) pcre2: add version 10.43 * pcre2: add version 10.43 * pcre2: define PCRE2POSIX_SHARED --- recipes/pcre2/all/conandata.yml | 3 +++ recipes/pcre2/all/conanfile.py | 3 +++ recipes/pcre2/config.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/recipes/pcre2/all/conandata.yml b/recipes/pcre2/all/conandata.yml index 344830544b429..6dadb108df617 100644 --- a/recipes/pcre2/all/conandata.yml +++ b/recipes/pcre2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.43": + url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.tar.bz2" + sha256: "e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb" "10.42": url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2" sha256: "8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840" diff --git a/recipes/pcre2/all/conanfile.py b/recipes/pcre2/all/conanfile.py index 14600c9abe85c..5c51abac704ec 100644 --- a/recipes/pcre2/all/conanfile.py +++ b/recipes/pcre2/all/conanfile.py @@ -149,6 +149,9 @@ def package_info(self): self.cpp_info.components["pcre2-posix"].set_property("pkg_config_name", "libpcre2-posix") self.cpp_info.components["pcre2-posix"].libs = [self._lib_name("pcre2-posix")] self.cpp_info.components["pcre2-posix"].requires = ["pcre2-8"] + if Version(self.version) >= "10.43" and is_msvc(self) and self.options.shared: + self.cpp_info.components["pcre2-posix"].defines.append("PCRE2POSIX_SHARED=1") + # pcre2-16 if self.options.build_pcre2_16: self.cpp_info.components["pcre2-16"].set_property("cmake_target_name", "PCRE2::16BIT") diff --git a/recipes/pcre2/config.yml b/recipes/pcre2/config.yml index f488a0ecff8cb..946dbc4632734 100644 --- a/recipes/pcre2/config.yml +++ b/recipes/pcre2/config.yml @@ -1,4 +1,6 @@ versions: + "10.43": + folder: all "10.42": folder: all "10.40": From f3042a11387d34897a671c179ea333aa984551e5 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 20:28:04 +0900 Subject: [PATCH 105/108] (#22809) glog: add version 0.7.0 * glog: add version 0.7.0 * enable C++14 in test_package * update cmake build --- recipes/glog/all/conandata.yml | 15 +++++--- recipes/glog/all/conanfile.py | 40 +++++++++++++++++--- recipes/glog/all/test_package/CMakeLists.txt | 3 ++ recipes/glog/config.yml | 2 + 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/recipes/glog/all/conandata.yml b/recipes/glog/all/conandata.yml index 280f568cd746b..caa4c720569cf 100644 --- a/recipes/glog/all/conandata.yml +++ b/recipes/glog/all/conandata.yml @@ -1,13 +1,16 @@ sources: + "0.7.0": + url: "https://github.com/google/glog/archive/refs/tags/v0.7.0.tar.gz" + sha256: "375106b5976231b92e66879c1a92ce062923b9ae573c42b56ba28b112ee4cc11" "0.6.0": - sha256: 8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6 - url: https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz + url: "https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz" + sha256: "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6" "0.5.0": - sha256: eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5 - url: https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz + url: "https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz" + sha256: "eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5" "0.4.0": - sha256: f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c - url: https://github.com/google/glog/archive/v0.4.0.tar.gz + url: "https://github.com/google/glog/archive/v0.4.0.tar.gz" + sha256: "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c" patches: "0.5.0": - patch_file: "patches/0001-fix-msvc-snprintf.patch" diff --git a/recipes/glog/all/conanfile.py b/recipes/glog/all/conanfile.py index 7e06e74b5074e..3b6d58c7ef863 100644 --- a/recipes/glog/all/conanfile.py +++ b/recipes/glog/all/conanfile.py @@ -1,8 +1,10 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd import os required_conan_version = ">=1.54.0" @@ -10,12 +12,11 @@ class GlogConan(ConanFile): name = "glog" + description = "Google logging library" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/glog/" - description = "Google logging library" topics = ("logging",) - license = "BSD-3-Clause" - package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -33,6 +34,20 @@ class GlogConan(ConanFile): "with_unwind": True, } + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + def export_sources(self): export_conandata_patches(self) @@ -56,10 +71,23 @@ def requirements(self): self.requires("gflags/2.2.2", transitive_headers=True, transitive_libs=True) # 0.4.0 requires libunwind unconditionally if self.options.get_safe("with_unwind") or (Version(self.version) < "0.5.0" and self.settings.os in ["Linux", "FreeBSD"]): - self.requires("libunwind/1.7.2") + self.requires("libunwind/1.8.0", transitive_headers=True, transitive_libs=True) + + def validate(self): + if Version(self.version) < "0.7.0": + return + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def build_requirements(self): - if Version(self.version) >= "0.6.0": + if Version(self.version) >= "0.7.0": + self.tool_requires("cmake/[>=3.22 <4]") + elif Version(self.version) >= "0.6.0": self.tool_requires("cmake/[>=3.16 <4]") def source(self): @@ -129,3 +157,5 @@ def package_info(self): self.cpp_info.defines.append(f"GOOGLE_GLOG_DLL_DECL={decl}") if self.options.with_gflags and not self.options.shared: self.cpp_info.defines.extend(["GFLAGS_DLL_DECLARE_FLAG=", "GFLAGS_DLL_DEFINE_FLAG="]) + if Version(self.version) >= "0.7.0": + self.cpp_info.defines.extend(["GLOG_USE_GLOG_EXPORT="]) diff --git a/recipes/glog/all/test_package/CMakeLists.txt b/recipes/glog/all/test_package/CMakeLists.txt index 28603535e29e9..846b06b94b1ef 100644 --- a/recipes/glog/all/test_package/CMakeLists.txt +++ b/recipes/glog/all/test_package/CMakeLists.txt @@ -5,3 +5,6 @@ find_package(glog REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE glog::glog) +if (glog_VERSION VERSION_GREATER_EQUAL "0.7.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() diff --git a/recipes/glog/config.yml b/recipes/glog/config.yml index babcbfb79d964..a0804c43130f1 100644 --- a/recipes/glog/config.yml +++ b/recipes/glog/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.0": folder: all "0.5.0": From 07cd4a0157a18c382a968585d7d13521239b7ada Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 20:53:57 +0900 Subject: [PATCH 106/108] (#22845) perfetto: add version 42.0 --- recipes/perfetto/all/conandata.yml | 3 +++ recipes/perfetto/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index 7fcc5a39bf3d7..711d2732829d9 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "42.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v42.0.tar.gz" + sha256: "1c474a0f16cc2f9da826fd3f9e44ffd77785c433e997cdaf0ee390ae3d64b53e" "41.0": url: "https://github.com/google/perfetto/archive/refs/tags/v41.0.tar.gz" sha256: "4c8fe8a609fcc77ca653ec85f387ab6c3a048fcd8df9275a1aa8087984b89db8" diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index 441b287e9826f..f2898b0745aac 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,4 +1,6 @@ versions: + "42.0": + folder: all "41.0": folder: all "40.0": From d82765c89d5903d2d50f40a5702183708e654c20 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:04:02 +0000 Subject: [PATCH 107/108] (#22848) [bot] Update authorized users list (2024-02-22) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 995fbb6e339b3..e66b2974bcee6 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1290,3 +1290,5 @@ authorized_users: - cnicolaescu - mmomtchev - ChristianHeinigk +- metalMajor +- joergbrech From aa62958b41621487de635c57dccdb4978a4c63d4 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:49:53 +0100 Subject: [PATCH 108/108] (#22847) zlib: Bad alternative url for zlib 1.3.1 --- recipes/zlib/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/zlib/all/conandata.yml b/recipes/zlib/all/conandata.yml index 6af954549998d..e069fd42a135c 100644 --- a/recipes/zlib/all/conandata.yml +++ b/recipes/zlib/all/conandata.yml @@ -2,7 +2,7 @@ sources: "1.3.1": url: - "https://zlib.net/fossils/zlib-1.3.1.tar.gz" - - "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.1.tar.gz" + - "https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz" sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" "1.3": url: