From c9a8b7d8e429a0f40297477e6bc0687362e04a16 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 30 May 2024 08:14:24 +0200 Subject: [PATCH 01/39] (#24150) qt6: fix resources object files location * qt: test: link with qtwidgets * fix resources path --- recipes/qt/6.x.x/conanfile.py | 6 ++---- recipes/qt/6.x.x/test_package/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index f1f5551a4201c4..41e94abc756f84 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -1539,10 +1539,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): component = "qt" + m[:m.find("_")] if component not in self.cpp_info.components: continue - submodules_dir = os.path.join(object_dir, m) - for sub_dir in os.listdir(submodules_dir): - submodule_dir = os.path.join(submodules_dir, sub_dir) - obj_files = [os.path.join(submodule_dir, file) for file in os.listdir(submodule_dir)] + for root, _, files in os.walk(os.path.join(object_dir, m)): + obj_files = [os.path.join(root, file) for file in files] self.cpp_info.components[component].exelinkflags.extend(obj_files) self.cpp_info.components[component].sharedlinkflags.extend(obj_files) diff --git a/recipes/qt/6.x.x/test_package/CMakeLists.txt b/recipes/qt/6.x.x/test_package/CMakeLists.txt index 337604f1af6eeb..d12764c12f1eb4 100644 --- a/recipes/qt/6.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/6.x.x/test_package/CMakeLists.txt @@ -4,6 +4,6 @@ project(test_package LANGUAGES CXX) find_package(Qt6 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) add_executable(${PROJECT_NAME} WIN32 test_package.cpp greeter.h example.qrc) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml Qt6::Widgets) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) From 50d22f8bc04ddd52ace4e2b7ca2035b3b206ad23 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Thu, 30 May 2024 08:53:18 +0200 Subject: [PATCH 02/39] (#24155) openexr: refactor test package --- .../2.x/test_package/comp_short_decode_piz.exr | Bin 3147 -> 0 bytes recipes/openexr/2.x/test_package/conanfile.py | 3 +-- .../openexr/2.x/test_package/test_package.cpp | 13 +++---------- .../3.x/test_package/comp_short_decode_piz.exr | Bin 3147 -> 0 bytes recipes/openexr/3.x/test_package/conanfile.py | 3 +-- .../openexr/3.x/test_package/test_package.cpp | 13 +++---------- 6 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 recipes/openexr/2.x/test_package/comp_short_decode_piz.exr delete mode 100644 recipes/openexr/3.x/test_package/comp_short_decode_piz.exr diff --git a/recipes/openexr/2.x/test_package/comp_short_decode_piz.exr b/recipes/openexr/2.x/test_package/comp_short_decode_piz.exr deleted file mode 100644 index 3a16d594b3028f3d83831f7cba0e237d79bc397f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3147 zcmeHJJx{|h5WS#Cz*g}C5Ptw+x^{!15(^Sb=McN9C1XdiRbZkkf0BQ}#1Q-(KHR32 zij*M|ep2GQcQ1G6i}JC&xXccSs9Y3U3uV2bq;+(|7`yU3kvCZ8R~*xDj+wg-L#27B zYGJK3ddlbV}Hx;IZ_8PdP3ng*o+l;P4=s(9|`kRgVWTHMxL)bwj1PF1V| zF;}K=p%x;xtcB2R`fH(`Pp}-%f5MxRndEM+2?lt%v8$F!pl nk3)y;lfc_{A58WUB~6+@nn0RBnn0SsmI?I!HN!8YuhV=23gJXB diff --git a/recipes/openexr/2.x/test_package/conanfile.py b/recipes/openexr/2.x/test_package/conanfile.py index f3a059b562841d..3a8c6c5442b33b 100644 --- a/recipes/openexr/2.x/test_package/conanfile.py +++ b/recipes/openexr/2.x/test_package/conanfile.py @@ -22,5 +22,4 @@ def build(self): def test(self): if not cross_building(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") - self.run(f"{bin_path} {imgfile}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/openexr/2.x/test_package/test_package.cpp b/recipes/openexr/2.x/test_package/test_package.cpp index f5c9cab11b69e3..d0aa6adf400d6b 100644 --- a/recipes/openexr/2.x/test_package/test_package.cpp +++ b/recipes/openexr/2.x/test_package/test_package.cpp @@ -1,18 +1,11 @@ #include #include -#include -#include -#include +#include int main (int argc, char *argv[]) { - if (argc < 2) - return EXIT_FAILURE; - Imf::RgbaInputFile input_file(argv[1]); - const Imf::Header& header = input_file.header(); - size_t width = header.dataWindow().max.x - header.dataWindow().min.x + 1; - size_t height = header.dataWindow().max.y - header.dataWindow().min.y + 1; - std::cout << "OpenEXR images size is " << width << "x" << height << std::endl; + Imf::Header header; + std::cout << "Test: " << header.screenWindowWidth() << std::endl; return EXIT_SUCCESS; } diff --git a/recipes/openexr/3.x/test_package/comp_short_decode_piz.exr b/recipes/openexr/3.x/test_package/comp_short_decode_piz.exr deleted file mode 100644 index 3a16d594b3028f3d83831f7cba0e237d79bc397f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3147 zcmeHJJx{|h5WS#Cz*g}C5Ptw+x^{!15(^Sb=McN9C1XdiRbZkkf0BQ}#1Q-(KHR32 zij*M|ep2GQcQ1G6i}JC&xXccSs9Y3U3uV2bq;+(|7`yU3kvCZ8R~*xDj+wg-L#27B zYGJK3ddlbV}Hx;IZ_8PdP3ng*o+l;P4=s(9|`kRgVWTHMxL)bwj1PF1V| zF;}K=p%x;xtcB2R`fH(`Pp}-%f5MxRndEM+2?lt%v8$F!pl nk3)y;lfc_{A58WUB~6+@nn0RBnn0SsmI?I!HN!8YuhV=23gJXB diff --git a/recipes/openexr/3.x/test_package/conanfile.py b/recipes/openexr/3.x/test_package/conanfile.py index 96999743e2fb99..8a5bb47f50c4ce 100644 --- a/recipes/openexr/3.x/test_package/conanfile.py +++ b/recipes/openexr/3.x/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") - self.run(f"{bin_path} {imgfile}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/openexr/3.x/test_package/test_package.cpp b/recipes/openexr/3.x/test_package/test_package.cpp index f5c9cab11b69e3..d0aa6adf400d6b 100644 --- a/recipes/openexr/3.x/test_package/test_package.cpp +++ b/recipes/openexr/3.x/test_package/test_package.cpp @@ -1,18 +1,11 @@ #include #include -#include -#include -#include +#include int main (int argc, char *argv[]) { - if (argc < 2) - return EXIT_FAILURE; - Imf::RgbaInputFile input_file(argv[1]); - const Imf::Header& header = input_file.header(); - size_t width = header.dataWindow().max.x - header.dataWindow().min.x + 1; - size_t height = header.dataWindow().max.y - header.dataWindow().min.y + 1; - std::cout << "OpenEXR images size is " << width << "x" << height << std::endl; + Imf::Header header; + std::cout << "Test: " << header.screenWindowWidth() << std::endl; return EXIT_SUCCESS; } From f2abb6abe7fe9845e94d2e2c7576ef79c77f4e59 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Thu, 30 May 2024 08:03:54 +0100 Subject: [PATCH 03/39] (#24154) protobuf new versions * protobuf wip * windows * wip * wip * check_min_cppstd * fix * wip * Update recipes/protobuf/all/conanfile.py Co-authored-by: Uilian Ries * fixes * fix * fixes * fix * fix * fix test package on macos * fix * fix version --------- Co-authored-by: Uilian Ries --- recipes/protobuf/all/conandata.yml | 125 +++++++++----- recipes/protobuf/all/conanfile.py | 154 +++++++++++------- ...rotobuf-3.17.1-upstream-macos-macros.patch | 46 ------ ...rotobuf-3.18.1-upstream-macos-macros.patch | 46 ------ ...rotobuf-3.19.6-upstream-macos-macros.patch | 46 ------ ...rotobuf-3.21.9-upstream-macos-macros.patch | 25 --- .../upstream-pr-9437-msvc-runtime.patch | 17 -- .../all/protobuf-conan-protoc-target.cmake | 25 +++ .../protobuf/all/test_package/CMakeLists.txt | 13 +- .../protobuf/all/test_package/conanfile.py | 3 + .../all/test_package/test_package.cpp | 2 +- recipes/protobuf/config.yml | 14 +- 12 files changed, 219 insertions(+), 297 deletions(-) delete mode 100644 recipes/protobuf/all/patches/protobuf-3.17.1-upstream-macos-macros.patch delete mode 100644 recipes/protobuf/all/patches/protobuf-3.18.1-upstream-macos-macros.patch delete mode 100644 recipes/protobuf/all/patches/protobuf-3.19.6-upstream-macos-macros.patch delete mode 100644 recipes/protobuf/all/patches/protobuf-3.21.9-upstream-macos-macros.patch delete mode 100644 recipes/protobuf/all/patches/upstream-pr-9437-msvc-runtime.patch create mode 100644 recipes/protobuf/all/protobuf-conan-protoc-target.cmake diff --git a/recipes/protobuf/all/conandata.yml b/recipes/protobuf/all/conandata.yml index 0417c4d805f42f..c03c8334c3fffa 100644 --- a/recipes/protobuf/all/conandata.yml +++ b/recipes/protobuf/all/conandata.yml @@ -1,62 +1,99 @@ sources: + "5.27.0": + url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v5.27.0.tar.gz" + sha256: "1611a03e550c27c526bde1da544c94f7aa65c10687bbc8e570537dfa94069e1a" + "4.25.3": + url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v4.25.3.tar.gz" + sha256: "1d6b8d9114cb5b33ce8711729893097a107d4fefff5423528eb1decb5451856c" "3.21.12": url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz" sha256: "930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53" - "3.21.9": - url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.9.tar.gz" - sha256: "1add10f9bd92775b91f326da259f243881e904dd509367d5031d4c782ba82810" "3.20.3": url: "https://github.com/protocolbuffers/protobuf/archive/v3.20.3.tar.gz" sha256: "9c0fd39c7a08dff543c643f0f4baf081988129a411b977a07c46221793605638" - "3.20.0": - url: "https://github.com/protocolbuffers/protobuf/archive/v3.20.0.tar.gz" - sha256: "b07772d38ab07e55eca4d50f4b53da2d998bb221575c60a4f81100242d4b4889" - "3.19.6": - url: "https://github.com/protocolbuffers/protobuf/archive/v3.19.6.tar.gz" - sha256: "9a301cf94a8ddcb380b901e7aac852780b826595075577bb967004050c835056" - "3.18.3": - url: "https://github.com/protocolbuffers/protobuf/archive/v3.18.3.tar.gz" - sha256: "663b3a6d56605e6ab7888d32a1525c34f34639b25b8996337821591e60c37041" - "3.17.1": - url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.17.1.tar.gz" - sha256: "036d66d6eec216160dd898cfb162e9d82c1904627642667cc32b104d407bb411" patches: "3.21.12": - patch_file: "patches/protobuf-3.21.12-upstream-macos-macros.patch" patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" patch_type: "bugfix" patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.21.9": - - patch_file: "patches/protobuf-3.21.9-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" "3.20.3": - patch_file: "patches/protobuf-3.20.0-upstream-macos-macros.patch" patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" patch_type: "bugfix" patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.20.0": - - patch_file: "patches/protobuf-3.20.0-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.19.6": - - patch_file: "patches/upstream-pr-9437-msvc-runtime.patch" - patch_description: "Properly handle CMAKE_MSVC_RUNTIME_LIBRARY when using CMake >= 3.15" - patch_type: "portability" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/9437" - - patch_file: "patches/protobuf-3.19.6-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.18.3": - - patch_file: "patches/protobuf-3.18.1-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.17.1": - - patch_file: "patches/protobuf-3.17.1-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" +absl_deps: + "5.27.0": + - absl_absl_check + - absl_absl_log + - absl_algorithm + - absl_base + - absl_bind_front + - absl_bits + - absl_btree + - absl_cleanup + - absl_cord + - absl_core_headers + - absl_debugging + - absl_die_if_null + - absl_dynamic_annotations + - absl_flags + - absl_flat_hash_map + - absl_flat_hash_set + - absl_function_ref + - absl_hash + - absl_if_constexpr + - absl_layout + - absl_log_initialize + - absl_log_globals + - absl_log_severity + - absl_memory + - absl_node_hash_map + - absl_node_hash_set + - absl_optional + - absl_random_distributions + - absl_random_random + - absl_span + - absl_status + - absl_statusor + - absl_strings + - absl_synchronization + - absl_time + - absl_type_traits + - absl_utility + - absl_variant + "4.25.3": + - absl_absl_check + - absl_absl_log + - absl_algorithm + - absl_base + - absl_bind_front + - absl_bits + - absl_btree + - absl_cleanup + - absl_cord + - absl_core_headers + - absl_debugging + - absl_die_if_null + - absl_dynamic_annotations + - absl_flags + - absl_flat_hash_map + - absl_flat_hash_set + - absl_function_ref + - absl_hash + - absl_layout + - absl_log_initialize + - absl_log_severity + - absl_memory + - absl_node_hash_map + - absl_node_hash_set + - absl_optional + - absl_span + - absl_status + - absl_statusor + - absl_strings + - absl_synchronization + - absl_time + - absl_type_traits + - absl_utility + - absl_variant diff --git a/recipes/protobuf/all/conanfile.py b/recipes/protobuf/all/conanfile.py index f696a278806848..2b0003b1adc841 100644 --- a/recipes/protobuf/all/conanfile.py +++ b/recipes/protobuf/all/conanfile.py @@ -1,13 +1,13 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, rename, get, apply_conandata_patches, export_conandata_patches, replace_in_file, rmdir, rm from conan.tools.microsoft import check_min_vs, msvc_runtime_flag, is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os -import textwrap required_conan_version = ">=1.53" @@ -27,6 +27,7 @@ class ProtobufConan(ConanFile): "with_zlib": [True, False], "with_rtti": [True, False], "lite": [True, False], + "upb": [True, False], "debug_suffix": [True, False], } default_options = { @@ -35,6 +36,7 @@ class ProtobufConan(ConanFile): "with_zlib": True, "with_rtti": True, "lite": False, + "upb": False, "debug_suffix": True, } @@ -47,9 +49,15 @@ def _is_clang_cl(self): @property def _is_clang_x86(self): return self.settings.compiler == "clang" and self.settings.arch == "x86" + + @property + def _protobuf_release(self): + current_ver = Version(self.version) + return Version(f"{current_ver.minor}.{current_ver.patch}") def export_sources(self): export_conandata_patches(self) + copy(self, "protobuf-conan-protoc-target.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -59,6 +67,9 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if self._protobuf_release < "27.0": + self.options.rm_safe("upb") + def layout(self): cmake_layout(self, src_folder="src") @@ -66,10 +77,39 @@ def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") + if self._protobuf_release >= "22.0": + self.requires("abseil/20240116.2", transitive_headers=True) + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + def validate(self): if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Protobuf can't be built with shared + MT(d) runtimes") - + + if is_msvc(self) and self._protobuf_release >= "22" and self.options.shared and \ + not self.dependencies["abseil"].options.shared: + raise ConanInvalidConfiguration("When building protobuf as a shared library on Windows, " + "abseil needs to be a shared library too") + + if self._protobuf_release >= "22.0": + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 14) + else: + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), None) + compiler_version = Version(self.settings.compiler.version) + if minimum_version and compiler_version < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++14, which your compiler does not support.", + ) + check_min_vs(self, "190") if self.settings.compiler == "clang": @@ -93,6 +133,11 @@ def generate(self): tc.cache_variables["protobuf_DEBUG_POSTFIX"] = "" tc.cache_variables["protobuf_BUILD_LIBPROTOC"] = self.settings.os != "tvOS" tc.cache_variables["protobuf_DISABLE_RTTI"] = not self.options.with_rtti + tc.cache_variables["protobuf_BUILD_LIBUPB"] = self.options.get_safe("upb") + if self._protobuf_release >= "22.0": + tc.cache_variables["protobuf_ABSL_PROVIDER"] = "package" + if not self.settings.compiler.get_safe("cppstd") and self._protobuf_release >= "22.0": + tc.variables["CMAKE_CXX_STANDARD"] = 14 if is_msvc(self) or self._is_clang_cl: runtime = msvc_runtime_flag(self) if not runtime: @@ -109,53 +154,14 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - # Provide relocatable protobuf::protoc target and Protobuf_PROTOC_EXECUTABLE cache variable - # TODO: some of the following logic might be disabled when conan will - # allow to create executable imported targets in package_info() - protobuf_config_cmake = os.path.join(self.source_folder, "cmake", "protobuf-config.cmake.in") - - replace_in_file(self, - protobuf_config_cmake, - "@_protobuf_FIND_ZLIB@", - "# BEGIN CONAN PATCH\n#_protobuf_FIND_ZLIB@\n# END CONAN PATCH" - ) - - exe_ext = ".exe" if self.settings.os == "Windows" else "" - protoc_filename = "protoc" + exe_ext - module_folder_depth = len(os.path.normpath(self._cmake_install_base_path).split(os.path.sep)) - protoc_rel_path = "{}bin/{}".format("".join(["../"] * module_folder_depth), protoc_filename) - protoc_target = textwrap.dedent(f"""\ - if(NOT TARGET protobuf::protoc) - # Locate protoc executable - ## Workaround for legacy "cmake" generator in case of cross-build - if(CMAKE_CROSSCOMPILING) - find_program(PROTOC_PROGRAM NAMES protoc PATHS ENV PATH NO_DEFAULT_PATH) - endif() - ## And here this will work fine with "CMakeToolchain" (for native & cross-build) - ## and legacy "cmake" generator in case of native build - if(NOT PROTOC_PROGRAM) - find_program(PROTOC_PROGRAM NAMES protoc) - endif() - ## Last resort: we search in package folder directly - if(NOT PROTOC_PROGRAM) - set(PROTOC_PROGRAM \"${{CMAKE_CURRENT_LIST_DIR}}/{protoc_rel_path}\") - endif() - get_filename_component(PROTOC_PROGRAM \"${{PROTOC_PROGRAM}}\" ABSOLUTE) - - # Give opportunity to users to provide an external protoc executable - # (this is a feature of official FindProtobuf.cmake) - set(Protobuf_PROTOC_EXECUTABLE ${{PROTOC_PROGRAM}} CACHE FILEPATH \"The protoc compiler\") - - # Create executable imported target protobuf::protoc - add_executable(protobuf::protoc IMPORTED) - set_property(TARGET protobuf::protoc PROPERTY IMPORTED_LOCATION ${{Protobuf_PROTOC_EXECUTABLE}}) - endif() - """) - replace_in_file(self, - protobuf_config_cmake, - "include(\"${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake\")", - protoc_target - ) + if self._protobuf_release < "22.0": + # In older versions of protobuf, this file defines the `protobuf_generate` function + protobuf_config_cmake = os.path.join(self.source_folder, "cmake", "protobuf-config.cmake.in") + replace_in_file(self, protobuf_config_cmake, "@_protobuf_FIND_ZLIB@", "") + replace_in_file(self, protobuf_config_cmake, + "include(\"${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake\")", + "" + ) # Disable a potential warning in protobuf-module.cmake.in # TODO: remove this patch? Is it really useful? @@ -171,13 +177,6 @@ def _patch_sources(self): "endif()", ) - # https://github.com/protocolbuffers/protobuf/issues/9916 - # it will be solved in protobuf 3.21.0 - if Version(self.version) == "3.20.0": - replace_in_file(self, os.path.join(self.source_folder, "src", "google", "protobuf", "port_def.inc"), - "#elif PROTOBUF_GNUC_MIN(12, 0)", - "#elif PROTOBUF_GNUC_MIN(12, 2)") - def build(self): self._patch_sources() cmake = CMake(self) @@ -190,11 +189,15 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - os.unlink(os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-config-version.cmake")) - os.unlink(os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-targets.cmake")) - os.unlink(os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-targets-{}.cmake".format(str(self.settings.build_type).lower()))) - rename(self, os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-config.cmake"), - os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-generate.cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", "utf8_range")) + if self._protobuf_release < "22.0": + rename(self, os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-config.cmake"), + os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-generate.cmake")) + + cmake_config_folder = os.path.join(self.package_folder, self._cmake_install_base_path) + rm(self, "protobuf-config*.cmake", folder=cmake_config_folder) + rm(self, "protobuf-targets*.cmake", folder=cmake_config_folder) + copy(self, "protobuf-conan-protoc-target.cmake", src=self.source_folder, dst=cmake_config_folder) if not self.options.lite: rm(self, "libprotobuf-lite*", os.path.join(self.package_folder, "lib")) @@ -210,12 +213,32 @@ def package_info(self): os.path.join(self._cmake_install_base_path, "protobuf-generate.cmake"), os.path.join(self._cmake_install_base_path, "protobuf-module.cmake"), os.path.join(self._cmake_install_base_path, "protobuf-options.cmake"), + os.path.join(self._cmake_install_base_path, "protobuf-conan-protoc-target.cmake"), ] self.cpp_info.set_property("cmake_build_modules", build_modules) lib_prefix = "lib" if (is_msvc(self) or self._is_clang_cl) else "" lib_suffix = "d" if self.settings.build_type == "Debug" and self.options.debug_suffix else "" + if self._protobuf_release >= "22.0": + absl_deps = [f"abseil::{c}" for c in self.conan_data["absl_deps"][self.version]] + + if self._protobuf_release >= "22.0" and (not self.options.shared or self.options.get_safe("upb")): + # utf8 libraries + # it's a private dependency and unconditionally built as a static library, should only + # be exposed when protobuf itself is static (or if upb is being built) + self.cpp_info.components["utf8_range"].set_property("cmake_target_name", "utf8_range::utf8_range") + self.cpp_info.components["utf8_range"].libs = ["utf8_range"] + self.cpp_info.components["utf8_validity"].set_property("cmake_target_name", "utf8_range::utf8_validity") + self.cpp_info.components["utf8_validity"].libs = ["utf8_validity"] + self.cpp_info.components["utf8_validity"].requires = ["abseil::absl_strings"] + + if self.options.get_safe("upb"): + # upb libraries: note that these are unconditionally static + self.cpp_info.components["upb"].set_property("cmake_target_name", "protobuf::libupb") + self.cpp_info.components["upb"].libs = [lib_prefix + "upb" + lib_suffix] + self.cpp_info.components["upb"].requires = ["utf8_range"] + # libprotobuf self.cpp_info.components["libprotobuf"].set_property("cmake_target_name", "protobuf::libprotobuf") self.cpp_info.components["libprotobuf"].set_property("pkg_config_name", "protobuf") @@ -223,6 +246,11 @@ def package_info(self): self.cpp_info.components["libprotobuf"].libs = [lib_prefix + "protobuf" + lib_suffix] if self.options.with_zlib: self.cpp_info.components["libprotobuf"].requires = ["zlib::zlib"] + if self._protobuf_release >= "22.0": + self.cpp_info.components["libprotobuf"].requires.extend(absl_deps) + if not self.options.shared: + self.cpp_info.components["libprotobuf"].requires.extend(["utf8_validity"]) + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libprotobuf"].system_libs.extend(["m", "pthread"]) if self._is_clang_x86 or "arm" in str(self.settings.arch): @@ -238,6 +266,8 @@ def package_info(self): self.cpp_info.components["libprotoc"].set_property("cmake_target_name", "protobuf::libprotoc") self.cpp_info.components["libprotoc"].libs = [lib_prefix + "protoc" + lib_suffix] self.cpp_info.components["libprotoc"].requires = ["libprotobuf"] + if self._protobuf_release >= "22.0": + self.cpp_info.components["libprotoc"].requires.extend(absl_deps) # libprotobuf-lite if self.options.lite: @@ -254,6 +284,8 @@ def package_info(self): self.cpp_info.components["libprotobuf-lite"].defines = ["PROTOBUF_USE_DLLS"] if self.settings.os == "Android": self.cpp_info.components["libprotobuf-lite"].system_libs.append("log") + if self._protobuf_release >= "22.0": + self.cpp_info.components["libprotobuf-lite"].requires.extend(absl_deps) # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.filenames["cmake_find_package"] = "Protobuf" diff --git a/recipes/protobuf/all/patches/protobuf-3.17.1-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.17.1-upstream-macos-macros.patch deleted file mode 100644 index d8f8f14a253612..00000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.17.1-upstream-macos-macros.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 61f0859..d673519 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -616,6 +616,22 @@ - #undef timezone - #endif // _MSC_VER - -+#ifdef __APPLE__ -+// Inconvenient macro names from usr/include/math.h in some macOS SDKs. -+#pragma push_macro("DOMAIN") -+#undef DOMAIN -+// Inconvenient macro names from /usr/include/mach/boolean.h in some macOS SDKs. -+#pragma push_macro("TRUE") -+#undef TRUE -+#pragma push_macro("FALSE") -+#undef FALSE -+// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. -+#pragma push_macro("UID_MAX") -+#undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX -+#endif // __APPLE__ -+ - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) - // Don't let Objective-C Macros interfere with proto identifiers with the same - // name. -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index 82fe794..dfbbf5b 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -112,6 +112,14 @@ - #pragma pop_macro("timezone") - #endif - -+#ifdef __APPLE__ -+#pragma pop_macro("DOMAIN") -+#pragma pop_macro("TRUE") -+#pragma pop_macro("FALSE") -+#pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") -+#endif // __APPLE__ -+ - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) - #pragma pop_macro("DEBUG") - #endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/protobuf-3.18.1-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.18.1-upstream-macos-macros.patch deleted file mode 100644 index 4825966e01d9d6..00000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.18.1-upstream-macos-macros.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 01384c8..8f8a44d 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -736,6 +736,22 @@ - #undef timezone - #endif // _MSC_VER - -+#ifdef __APPLE__ -+// Inconvenient macro names from usr/include/math.h in some macOS SDKs. -+#pragma push_macro("DOMAIN") -+#undef DOMAIN -+// Inconvenient macro names from /usr/include/mach/boolean.h in some macOS SDKs. -+#pragma push_macro("TRUE") -+#undef TRUE -+#pragma push_macro("FALSE") -+#undef FALSE -+// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. -+#pragma push_macro("UID_MAX") -+#undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX -+#endif // __APPLE__ -+ - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) - // Don't let Objective-C Macros interfere with proto identifiers with the same - // name. -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index 5fef6e4..9efd5d6 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -128,6 +128,14 @@ - #pragma pop_macro("timezone") - #endif - -+#ifdef __APPLE__ -+#pragma pop_macro("DOMAIN") -+#pragma pop_macro("TRUE") -+#pragma pop_macro("FALSE") -+#pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") -+#endif // __APPLE__ -+ - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) - #pragma pop_macro("DEBUG") - #endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/protobuf-3.19.6-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.19.6-upstream-macos-macros.patch deleted file mode 100644 index 5aadd2a2570439..00000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.19.6-upstream-macos-macros.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 30af1cf..4ddf5dc 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -763,6 +763,22 @@ - #undef timezone - #endif // _MSC_VER - -+#ifdef __APPLE__ -+// Inconvenient macro names from usr/include/math.h in some macOS SDKs. -+#pragma push_macro("DOMAIN") -+#undef DOMAIN -+// Inconvenient macro names from /usr/include/mach/boolean.h in some macOS SDKs. -+#pragma push_macro("TRUE") -+#undef TRUE -+#pragma push_macro("FALSE") -+#undef FALSE -+// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. -+#pragma push_macro("UID_MAX") -+#undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX -+#endif // __APPLE__ -+ - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) - // Don't let Objective-C Macros interfere with proto identifiers with the same - // name. -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index 579eb41..7a179f9 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -129,6 +129,14 @@ - #pragma pop_macro("timezone") - #endif - -+#ifdef __APPLE__ -+#pragma pop_macro("DOMAIN") -+#pragma pop_macro("TRUE") -+#pragma pop_macro("FALSE") -+#pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") -+#endif // __APPLE__ -+ - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) - #pragma pop_macro("DEBUG") - #endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/protobuf-3.21.9-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.21.9-upstream-macos-macros.patch deleted file mode 100644 index 3a152f62bca696..00000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.21.9-upstream-macos-macros.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index f00daf7..d956db2 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -870,6 +870,8 @@ - // Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. - #pragma push_macro("UID_MAX") - #undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX - #endif // __APPLE__ - - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index e880fa5..f8968d9 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -144,6 +144,7 @@ - #pragma pop_macro("TRUE") - #pragma pop_macro("FALSE") - #pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") - #endif // __APPLE__ - - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/upstream-pr-9437-msvc-runtime.patch b/recipes/protobuf/all/patches/upstream-pr-9437-msvc-runtime.patch deleted file mode 100644 index 06cb0a97681d10..00000000000000 --- a/recipes/protobuf/all/patches/upstream-pr-9437-msvc-runtime.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fix from Protobuf PR: https://github.com/protocolbuffers/protobuf/pull/9437 - ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -182,7 +182,11 @@ else (protobuf_BUILD_SHARED_LIBS) - # making programmatic control difficult. Prefer the functionality in newer - # CMake versions when available. - if(CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15) -- set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$:Debug>) -+ if (protobuf_MSVC_STATIC_RUNTIME) -+ set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$:Debug>) -+ else() -+ set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$:Debug>DLL) -+ endif() - else() - # In case we are building static libraries, link also the runtime library statically - # so that MSVCR*.DLL is not required at runtime. diff --git a/recipes/protobuf/all/protobuf-conan-protoc-target.cmake b/recipes/protobuf/all/protobuf-conan-protoc-target.cmake new file mode 100644 index 00000000000000..6165d8f1b731b0 --- /dev/null +++ b/recipes/protobuf/all/protobuf-conan-protoc-target.cmake @@ -0,0 +1,25 @@ +if(NOT TARGET protobuf::protoc) + # Locate protoc executable + ## Workaround for legacy "cmake" generator in case of cross-build + if(CMAKE_CROSSCOMPILING) + find_program(PROTOC_PROGRAM NAMES protoc PATHS ENV PATH NO_DEFAULT_PATH) + endif() + ## And here this will work fine with "CMakeToolchain" (for native & cross-build) + ## and legacy "cmake" generator in case of native build + if(NOT PROTOC_PROGRAM) + find_program(PROTOC_PROGRAM NAMES protoc) + endif() + ## Last resort: we search in package folder directly + if(NOT PROTOC_PROGRAM) + set(PROTOC_PROGRAM "${CMAKE_CURRENT_LIST_DIR}/../../../bin/protoc${CMAKE_EXECUTABLE_SUFFIX}") + endif() + get_filename_component(PROTOC_PROGRAM "${PROTOC_PROGRAM}" ABSOLUTE) + + # Give opportunity to users to provide an external protoc executable + # (this is a feature of official FindProtobuf.cmake) + set(Protobuf_PROTOC_EXECUTABLE ${PROTOC_PROGRAM} CACHE FILEPATH "The protoc compiler") + + # Create executable imported target protobuf::protoc + add_executable(protobuf::protoc IMPORTED) + set_property(TARGET protobuf::protoc PROPERTY IMPORTED_LOCATION ${Protobuf_PROTOC_EXECUTABLE}) +endif() diff --git a/recipes/protobuf/all/test_package/CMakeLists.txt b/recipes/protobuf/all/test_package/CMakeLists.txt index e9b0cf64f692a9..b19277151deafe 100644 --- a/recipes/protobuf/all/test_package/CMakeLists.txt +++ b/recipes/protobuf/all/test_package/CMakeLists.txt @@ -5,7 +5,11 @@ project(test_package LANGUAGES CXX) find_package(protobuf CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +if(CONAN_TEST_USE_CXXSTD_14) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") if (protobuf_LITE) target_link_libraries(${PROJECT_NAME} PRIVATE protobuf::libprotobuf-lite) @@ -17,3 +21,10 @@ if(TARGET protobuf::libprotoc) target_link_libraries(${PROJECT_NAME} PRIVATE protobuf::libprotoc) endif() +if(NOT TARGET protobuf::protoc) + message(FATAL_ERROR "protoc executable should have been defined as part of find_package(protobuf)") +endif() + +if(NOT COMMAND protobuf_generate) + message(FATAL_ERROR "protobuf_generate should have been defined as part of find_package(protobuf)") +endif() diff --git a/recipes/protobuf/all/test_package/conanfile.py b/recipes/protobuf/all/test_package/conanfile.py index f31fbd67038e16..880d1f9d7d72eb 100644 --- a/recipes/protobuf/all/test_package/conanfile.py +++ b/recipes/protobuf/all/test_package/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.scm import Version import os @@ -19,6 +20,8 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) tc.cache_variables["protobuf_LITE"] = self.dependencies[self.tested_reference_str].options.lite + protobuf_version = Version(self.dependencies[self.tested_reference_str].ref.version) + tc.cache_variables["CONAN_TEST_USE_CXXSTD_14"] = protobuf_version >= "3.22" tc.generate() def build(self): diff --git a/recipes/protobuf/all/test_package/test_package.cpp b/recipes/protobuf/all/test_package/test_package.cpp index 3d3122ddd2587c..61cb2bc104cd74 100644 --- a/recipes/protobuf/all/test_package/test_package.cpp +++ b/recipes/protobuf/all/test_package/test_package.cpp @@ -10,6 +10,6 @@ int main() google::protobuf::util::TimeUtil::FromString("1972-01-01T10:00:20.021Z", &ts); const auto nanoseconds = ts.nanos(); - std::cout << nanoseconds << "\n"; + std::cout << "1972-01-01T10:00:20.021Z in nanoseconds: " << nanoseconds << "\n"; return EXIT_SUCCESS; } diff --git a/recipes/protobuf/config.yml b/recipes/protobuf/config.yml index 89750d93410cce..cb567195f025db 100644 --- a/recipes/protobuf/config.yml +++ b/recipes/protobuf/config.yml @@ -1,15 +1,9 @@ versions: - "3.21.12": - folder: all - "3.21.9": - folder: all - "3.20.3": + "5.27.0": folder: all - "3.20.0": + "4.25.3": folder: all - "3.19.6": - folder: all - "3.18.3": + "3.21.12": folder: all - "3.17.1": + "3.20.3": folder: all From 2048554253c4897c89dcbc234870f2fe917af2d2 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 30 May 2024 17:14:24 +0900 Subject: [PATCH 04/39] (#24153) crowcpp-crow: add version 1.2.0, add package_type --- recipes/crowcpp-crow/all/conandata.yml | 3 +++ recipes/crowcpp-crow/all/conanfile.py | 1 + recipes/crowcpp-crow/config.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/recipes/crowcpp-crow/all/conandata.yml b/recipes/crowcpp-crow/all/conandata.yml index 7b927ae7b39024..91575e2322dc25 100644 --- a/recipes/crowcpp-crow/all/conandata.yml +++ b/recipes/crowcpp-crow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.2.0.tar.gz" + sha256: "c80d0b23c6a20f8aa6fe776669dc8a9fb984046891d2f70bfc0539d16998164b" "1.1.0": url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.1.0.tar.gz" sha256: "f4281c3f25769dbc82437dd4199a8ba07b2a6e8a2f42e36a6fd805c493aae5ca" diff --git a/recipes/crowcpp-crow/all/conanfile.py b/recipes/crowcpp-crow/all/conanfile.py index d5a63018ad0dd8..f86149ab6d3500 100644 --- a/recipes/crowcpp-crow/all/conanfile.py +++ b/recipes/crowcpp-crow/all/conanfile.py @@ -14,6 +14,7 @@ class CrowConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "http://crowcpp.org/" topics = ("web", "microframework", "header-only") + package_type = "header-library" settings = "os", "compiler", "arch", "build_type" options = { "amalgamation": [True, False], diff --git a/recipes/crowcpp-crow/config.yml b/recipes/crowcpp-crow/config.yml index 271396eff4652b..f99accc1b08d50 100644 --- a/recipes/crowcpp-crow/config.yml +++ b/recipes/crowcpp-crow/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0+5": From a3a177a6ad5fe8c66836e719777830985c86c210 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 30 May 2024 11:43:26 +0200 Subject: [PATCH 05/39] (#24149) [boost] Check for C++20 compiler support when building Cobalt * Check for C++20 compiler support Signed-off-by: Uilian Ries * Update compiler comment Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/boost/all/conanfile.py | 53 ++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 3fc5d6dda7afca..3938fd9fa70898 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -282,6 +282,20 @@ def _has_cppstd_14_supported(self): # supported_cppstd: lists GCC 5 due partial support for C++14, but not enough for Boost return (compiler_version >= required_compiler_version) and supported_cxx14 + @property + def _has_cppstd_20_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 20) + required_compiler_version = self._min_compiler_version_default_cxx20 + if required_compiler_version: + msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193} + compiler_version = Version(self.settings.compiler.version) + is_visual_studio = str(self.settings.compiler) == "Visual Studio" + # supported_cppstd only supports msvc, but not Visual Studio as compiler + supported_cxx20 = "20" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "20" in supported_cppstd(self) + # We still dont have a compiler using C++20 by default + return (compiler_version >= required_compiler_version) or supported_cxx20 @property def _min_compiler_version_nowide(self): @@ -618,7 +632,7 @@ def _cxx11_boost_libraries(self): if Version(self.version) >= "1.85.0": libraries.append("system") libraries.sort() - return filter(lambda library: f"without_{library}" in self.options, libraries) + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) @property def _cxx14_boost_libraries(self): @@ -627,7 +641,16 @@ def _cxx14_boost_libraries(self): # https://github.com/boostorg/math/blob/develop/README.md#boost-math-library libraries.append("math") libraries.sort() - return filter(lambda library: f"without_{library}" in self.options, libraries) + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + @property + def _cxx20_boost_libraries(self): + libraries = [] + if Version(self.version) >= "1.84.0": + # https://github.com/boostorg/cobalt/blob/boost-1.84.0/build/Jamfile#L54 + libraries.append("cobalt") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) def validate(self): if not self.options.multithreading: @@ -669,24 +692,16 @@ def validate(self): if mincompiler_version and Version(self.settings.compiler.version) < mincompiler_version: raise ConanInvalidConfiguration("This compiler is too old to build Boost.nowide.") - if any([not self.options.get_safe(f"without_{library}", True) for library in self._cxx11_boost_libraries]): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) - else: - if not self._has_cppstd_11_supported: - raise ConanInvalidConfiguration( - f"Boost.{{{','.join(self._cxx11_boost_libraries)}}} requires a c++11 compiler " - "(please set compiler.cppstd or use a newer compiler)" - ) - - if any([not self.options.get_safe(f"without_{library}", True) for library in self._cxx14_boost_libraries]): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 14) - else: - if not self._has_cppstd_14_supported: + for cxx_standard, boost_libraries, has_cppstd_supported in [ + (11, self._cxx11_boost_libraries, self._has_cppstd_11_supported), + (14, self._cxx14_boost_libraries, self._has_cppstd_14_supported), + (20, self._cxx20_boost_libraries, self._has_cppstd_20_supported)]: + if any([not self.options.get_safe(f"without_{library}", True) for library in boost_libraries]): + if (self.settings.compiler.get_safe("cppstd") and not valid_min_cppstd(self, cxx_standard)) or \ + not has_cppstd_supported: raise ConanInvalidConfiguration( - f"Boost.{{{','.join(self._cxx14_boost_libraries)}}} requires a c++14 compiler " - "(please set compiler.cppstd or use a newer compiler)" + f"Boost libraries {', '.join(boost_libraries)} requires a C++{cxx_standard} compiler. " + "Please, set compiler.cppstd or use a newer compiler version or disable from building." ) def _with_dependency(self, dependency): From afa295b7d5a0bd296f226082ed61539a2de96e8c Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 30 May 2024 12:33:15 +0200 Subject: [PATCH 06/39] (#24097) [sentry-native] Add 0.7.4 and remove 0.7.0 * [sentry-native] Add 0.7.4 and remove 0.7.0 * Remove unexisting 0.7.3 version * Remove 0.7.0 from conandata.yml --- recipes/sentry-native/all/conandata.yml | 6 +++--- recipes/sentry-native/config.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index f41e33dbbde149..2017a7ca2d1db2 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "0.7.4": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.4/sentry-native.zip" + sha256: "9d17961d91c845ad8eb6f5106b2f5930f24a6e64077d7432013d4b379a8db7ac" "0.7.2": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.2/sentry-native.zip" sha256: "afb44d5cc4e0ec5f2e8068132c68256959188f6bf015e1837e7cc687014b9c70" "0.7.1": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.1/sentry-native.zip" sha256: "c450a064b0dbb1883a355455db2b6469abef59c04686a53719384bbc7ff507d3" - "0.7.0": - url: "https://github.com/getsentry/sentry-native/releases/download/0.7.0/sentry-native.zip" - sha256: "4dfccc879a81771b9da1c335947ffc9e5987ca3d16b3035efa2c66a06f727543" "0.6.6": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip" sha256: "7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c" diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index a18579e4a1c1e0..42dadeb789591d 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,10 +1,10 @@ versions: + "0.7.4": + folder: all "0.7.2": folder: all "0.7.1": folder: all - "0.7.0": - folder: all "0.6.6": folder: all "0.5.4": From 3a2fb54f7d8c17dfbdc289c26e91cc19e16ba555 Mon Sep 17 00:00:00 2001 From: Elvis Dukaj Date: Thu, 30 May 2024 12:52:52 +0200 Subject: [PATCH 07/39] (#24123) cpuinfo/cci.20231129: fix missing "log" dependency with Android --- recipes/cpuinfo/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/cpuinfo/all/conanfile.py b/recipes/cpuinfo/all/conanfile.py index 24edf5382c77cf..58abd3608a84f8 100644 --- a/recipes/cpuinfo/all/conanfile.py +++ b/recipes/cpuinfo/all/conanfile.py @@ -108,3 +108,6 @@ def package_info(self): self.cpp_info.components["cpuinfo"].requires = ["clog"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["cpuinfo"].system_libs.append("pthread") + + if self.settings.os == "Android": + self.cpp_info.components["cpuinfo"].system_libs.append("log") From fd2f2bbf5343f67abd1de529dc45297d26b72065 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 30 May 2024 14:08:56 +0300 Subject: [PATCH 08/39] (#23256) hwloc: add v2.10.0, drop vulnerable versions (< 2.9.3) * hwloc: add v2.10.0, drop vulnerable versions (< 2.9.3) Based on https://repology.org/project/hwloc/information * hwloc: revert libxml bump --- recipes/hwloc/all/conandata.yml | 22 +++++----------------- recipes/hwloc/config.yml | 12 ++---------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/recipes/hwloc/all/conandata.yml b/recipes/hwloc/all/conandata.yml index c3a77f045e4add..1f50c80dd4055d 100644 --- a/recipes/hwloc/all/conandata.yml +++ b/recipes/hwloc/all/conandata.yml @@ -1,19 +1,7 @@ sources: + "2.10.0": + url: "https://download.open-mpi.org/release/hwloc/v2.10/hwloc-2.10.0.tar.bz2" + sha256: "0305dd60c9de2fbe6519fe2a4e8fdc6d3db8de574a0ca7812b92e80c05ae1392" "2.9.3": - sha256: "5985db3a30bbe51234c2cd26ebe4ae9b4c3352ab788b1a464c40c0483bf4de59" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.3.tar.gz - "2.9.2": - sha256: "ffb554d5735e0e0a19d1fd4b2b86e771d3b58b2d97f257eedacae67ade5054b3" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.2.tar.gz - "2.9.1": - sha256: "a440e2299f7451dc10a57ddbfa3f116c2a6c4be1bb97c663edd3b9c7b3b3b4cf" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.1.tar.gz - "2.9.0": - sha256: "9d7d3450e0a5fea4cb80ca07dc8db939abb7ab62e2a7bb27f9376447658738ec" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.0.tar.gz - "2.8.0": - sha256: "20b2bd4df436827d8e50f7afeafb6f967259f2fb374ce7330244f8d0ed2dde6f" - url: https://download.open-mpi.org/release/hwloc/v2.8/hwloc-2.8.0.tar.gz - "2.7.2": - sha256: "407d2712b1c9026787461ddb62044fa9b5c6007755ca37652b360d837a75344f" - url: https://download.open-mpi.org/release/hwloc/v2.7/hwloc-2.7.2.tar.gz + url: "https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.3.tar.bz2" + sha256: "5c4062ce556f6d3451fc177ffb8673a2120f81df6835dea6a21a90fbdfff0dec" diff --git a/recipes/hwloc/config.yml b/recipes/hwloc/config.yml index d1ef77599f89a2..2da6ef856dca95 100644 --- a/recipes/hwloc/config.yml +++ b/recipes/hwloc/config.yml @@ -1,13 +1,5 @@ versions: - "2.9.3": - folder: all - "2.9.2": - folder: all - "2.9.1": + "2.10.0": folder: all - "2.9.0": - folder: all - "2.8.0": - folder: all - "2.7.2": + "2.9.3": folder: all From c49991dc41a4f1b63ee942ed00509f8081f41ea7 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 30 May 2024 13:54:23 +0200 Subject: [PATCH 09/39] (#24071) opencv 4.x: honor dynamic runtime from conan profile when compiler is clang-cl --- recipes/opencv/4.x/conanfile.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 27d637332f3ab4..668c1609928852 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -6,7 +6,7 @@ from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rename, replace_in_file, rmdir, save from conan.tools.gnu import PkgConfigDeps -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.microsoft import msvc_runtime_flag from conan.tools.scm import Version import os import re @@ -220,6 +220,14 @@ class OpenCVConan(ConanFile): short_paths = True + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _is_cl_like_static_runtime(self): + return self._is_cl_like and "MT" in msvc_runtime_flag(self) + @property def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler == "gcc" @@ -1190,8 +1198,8 @@ def validate(self): self._check_mandatory_options(self._opencv_modules) if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) - if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): - raise ConanInvalidConfiguration("Visual Studio with static runtime is not supported for shared library.") + if self.options.shared and self._is_cl_like and self._is_cl_like_static_runtime: + raise ConanInvalidConfiguration("MSVC or clang-cl with static runtime are not supported for shared library.") if self.settings.compiler == "clang" and Version(self.settings.compiler.version) < "4": raise ConanInvalidConfiguration("Clang 3.x can't build OpenCV 4.x due to an internal bug.") if self.options.get_safe("dnn_cuda") and \ @@ -1445,7 +1453,7 @@ def generate(self): tc.variables["WITH_GDAL"] = self.options.get_safe("with_gdal", False) tc.variables["WITH_GDCM"] = self.options.get_safe("with_gdcm", False) tc.variables["WITH_EIGEN"] = self.options.with_eigen - tc.variables["WITH_DSHOW"] = is_msvc(self) + tc.variables["WITH_DSHOW"] = self._is_cl_like tc.variables["WITH_MSMF"] = self.options.get_safe("with_msmf", False) tc.variables["WITH_MSMF_DXVA"] = self.options.get_safe("with_msmf_dxva", False) tc.variables["OPENCV_MODULES_PUBLIC"] = "opencv" @@ -1522,8 +1530,8 @@ def generate(self): tc.variables["ENABLE_PIC"] = self.options.get_safe("fPIC", True) tc.variables["ENABLE_CCACHE"] = False - if is_msvc(self): - tc.variables["BUILD_WITH_STATIC_CRT"] = is_msvc_static_runtime(self) + if self._is_cl_like: + tc.variables["BUILD_WITH_STATIC_CRT"] = self._is_cl_like_static_runtime if self.settings.os == "Android": tc.variables["BUILD_ANDROID_EXAMPLES"] = False From eb5b63cc16e8fcea2612314e5618a9f2e71d57e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Thu, 30 May 2024 14:21:51 +0200 Subject: [PATCH 10/39] (#24167) Add perseo as part of the review team --- .c3i/reviewers.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/reviewers.yml b/.c3i/reviewers.yml index a5e7a155eee135..1baa71f59b325e 100644 --- a/.c3i/reviewers.yml +++ b/.c3i/reviewers.yml @@ -90,3 +90,6 @@ reviewers: - user: "valgur" type: "community" request_reviews: false + - user: "perseoGI" + type: "team" + request_reviews: false From cf443f35d6c4082012dda4c694da62701ac477e1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 30 May 2024 15:52:22 +0300 Subject: [PATCH 11/39] (#24111) popl: new recipe --- recipes/popl/all/conandata.yml | 4 ++ recipes/popl/all/conanfile.py | 41 +++++++++++++++++++ recipes/popl/all/test_package/CMakeLists.txt | 8 ++++ recipes/popl/all/test_package/conanfile.py | 26 ++++++++++++ .../popl/all/test_package/test_package.cpp | 12 ++++++ recipes/popl/config.yml | 3 ++ 6 files changed, 94 insertions(+) create mode 100644 recipes/popl/all/conandata.yml create mode 100644 recipes/popl/all/conanfile.py create mode 100644 recipes/popl/all/test_package/CMakeLists.txt create mode 100644 recipes/popl/all/test_package/conanfile.py create mode 100644 recipes/popl/all/test_package/test_package.cpp create mode 100644 recipes/popl/config.yml diff --git a/recipes/popl/all/conandata.yml b/recipes/popl/all/conandata.yml new file mode 100644 index 00000000000000..ecb4877cc3587e --- /dev/null +++ b/recipes/popl/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.3.0": + url: "https://github.com/badaix/popl/archive/refs/tags/v1.3.0.tar.gz" + sha256: "7c59554371da3c6c093bd79c2f403f921c1938bd523f1a48682352e0d92883a6" diff --git a/recipes/popl/all/conanfile.py b/recipes/popl/all/conanfile.py new file mode 100644 index 00000000000000..2d3d23c30b405a --- /dev/null +++ b/recipes/popl/all/conanfile.py @@ -0,0 +1,41 @@ +import os + +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 + +required_conan_version = ">=1.52.0" + + +class PoplConan(ConanFile): + name = "popl" + description = "Header-only C++ command line arguments parser that supports the same set of options as GNU's getopt." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/badaix/popl" + topics = ("cli", "command-line-arguments", "getopt", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + 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, 11) + + 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, "popl.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/popl/all/test_package/CMakeLists.txt b/recipes/popl/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..7fec26ab44c8ed --- /dev/null +++ b/recipes/popl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(popl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE popl::popl) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/popl/all/test_package/conanfile.py b/recipes/popl/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/popl/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/popl/all/test_package/test_package.cpp b/recipes/popl/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..3e0ed006d49d2b --- /dev/null +++ b/recipes/popl/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include + +#include + +using namespace popl; + +int main(int argc, char **argv) { + OptionParser op("Allowed options"); + auto help_option = op.add("h", "help", "produce help message"); + op.parse(argc, argv); + std::cout << op << "\n"; +} diff --git a/recipes/popl/config.yml b/recipes/popl/config.yml new file mode 100644 index 00000000000000..426a0e4c79e9b1 --- /dev/null +++ b/recipes/popl/config.yml @@ -0,0 +1,3 @@ +versions: + "1.3.0": + folder: all From 1fc297ab8b27e792969c9a24deb9ccc4d37150e4 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 30 May 2024 22:08:14 +0900 Subject: [PATCH 12/39] (#22894) unleash-client-cpp: add version 1.3.0, support conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * unleash-client-cpp: add version 1.3.0, support conan v2 * drop support clang with libc++ * drop support apple-clang with libc++ * include sstream in 1.1.1 * fix msvc version Co-authored-by: Martin Valgur * Removed support for v1.1.1 and cleaned old conan 1 cruft * Update recipes/unleash-client-cpp/all/conandata.yml * Update recipes/unleash-client-cpp/config.yml --------- Co-authored-by: Martin Valgur Co-authored-by: PerseoGI Co-authored-by: Rubén Rincón Blanco --- recipes/unleash-client-cpp/all/CMakeLists.txt | 7 -- recipes/unleash-client-cpp/all/conandata.yml | 10 +- recipes/unleash-client-cpp/all/conanfile.py | 91 +++++++------------ .../all/patches/0001-no-conan-cmake.patch | 11 --- .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 19 +++- .../all/test_package/test_package.cpp | 7 +- recipes/unleash-client-cpp/config.yml | 2 +- 8 files changed, 59 insertions(+), 95 deletions(-) delete mode 100644 recipes/unleash-client-cpp/all/CMakeLists.txt delete mode 100644 recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch diff --git a/recipes/unleash-client-cpp/all/CMakeLists.txt b/recipes/unleash-client-cpp/all/CMakeLists.txt deleted file mode 100644 index b71c882d9d33fc..00000000000000 --- a/recipes/unleash-client-cpp/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/unleash-client-cpp/all/conandata.yml b/recipes/unleash-client-cpp/all/conandata.yml index 76a5bca8da7019..69cfd9795a61f8 100644 --- a/recipes/unleash-client-cpp/all/conandata.yml +++ b/recipes/unleash-client-cpp/all/conandata.yml @@ -1,8 +1,4 @@ sources: - "1.1.1": - url: "https://github.com/aruizs/unleash-client-cpp/archive/refs/tags/v1.1.1.tar.gz" - sha256: "2750dc231bf608910d4270ac39d83d46d25b88cc547a9d4d31f7ce4950effa7c" -patches: - "1.1.1": - - patch_file: "patches/0001-no-conan-cmake.patch" - base_path: "source_subfolder" + "1.3.0": + url: "https://github.com/aruizs/unleash-client-cpp/archive/refs/tags/v1.3.0.tar.gz" + sha256: "fa0b8d6101c6dbd08db23a3d353f386c17e9436a63d658f88c7d0b8619b8d501" diff --git a/recipes/unleash-client-cpp/all/conanfile.py b/recipes/unleash-client-cpp/all/conanfile.py index 08a60bfc378dee..5c84a2f78a2797 100644 --- a/recipes/unleash-client-cpp/all/conanfile.py +++ b/recipes/unleash-client-cpp/all/conanfile.py @@ -1,18 +1,22 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir import os -required_conan_version = ">=1.43.0" +from conan.tools.scm import Version +required_conan_version = ">=1.53.0" class UnleashConan(ConanFile): name = "unleash-client-cpp" - homepage = "https://github.com/aruizs/unleash-client-cpp/" + description = "Unleash Client SDK for C++ projects." license = "MIT" url = "https://github.com/conan-io/conan-center-index" - description = "Unleash Client SDK for C++ projects." + homepage = "https://github.com/aruizs/unleash-client-cpp/" topics = ("unleash", "feature", "flag", "toggle") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -23,17 +27,6 @@ class UnleashConan(ConanFile): "fPIC": True, } - generators = "cmake", "cmake_find_package" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - @property def _min_cppstd(self): return "17" @@ -42,75 +35,61 @@ def _min_cppstd(self): def _compilers_min_version(self): return { "Visual Studio": "15", # Should we check toolset? + "msvc": "191", "gcc": "7", "clang": "4.0", "apple-clang": "3.8", "intel": "17", } - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("cpr/1.7.2") - self.requires("nlohmann_json/3.10.5") + self.requires("cpr/1.10.5") + self.requires("nlohmann_json/3.11.3") def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._min_cppstd) - - def loose_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] + check_min_cppstd(self, self._min_cppstd) min_version = self._compilers_min_version.get(str(self.settings.compiler), False) - if min_version and loose_lt_semver(str(self.settings.compiler.version), min_version): + if min_version and Version(self.settings.compiler.version) < min_version: raise ConanInvalidConfiguration( - "{} requires C++{}, which your compiler does not support.".format(self.name, self._min_cppstd) + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["ENABLE_TESTING"] = False - self._cmake.definitions["ENABLE_TEST_COVERAGE"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ENABLE_TESTING"] = False + tc.variables["ENABLE_TESTING_COVERAGE"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.libs = ["unleash"] self.cpp_info.set_property("cmake_file_name", "unleash") self.cpp_info.set_property("cmake_target_name", "unleash::unleash") - self.cpp_info.libs = ["unleash"] - - self.cpp_info.names["cmake_find_package"] = "unleash" - self.cpp_info.names["cmake_find_package_multi"] = "unleash" - diff --git a/recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch b/recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch deleted file mode 100644 index f88f88c81dde78..00000000000000 --- a/recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -25,8 +25,6 @@ if(DEFINED unleash_SHARED_LIBS) - endif() - - # External dependencies using Conan.io --include(cmake/Conan.cmake) --run_conan() - - # Create the main unleash library target - add_subdirectory(src) diff --git a/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt b/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt index 5dfa06d3b7057f..bd4860f14d5666 100644 --- a/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt +++ b/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package LANGUAGES CXX) find_package(unleash CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} unleash::unleash) +target_link_libraries(${PROJECT_NAME} PRIVATE unleash::unleash) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/unleash-client-cpp/all/test_package/conanfile.py b/recipes/unleash-client-cpp/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/unleash-client-cpp/all/test_package/conanfile.py +++ b/recipes/unleash-client-cpp/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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 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 build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - 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.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/unleash-client-cpp/all/test_package/test_package.cpp b/recipes/unleash-client-cpp/all/test_package/test_package.cpp index 9af855c3e03d76..1eaf68256bc884 100644 --- a/recipes/unleash-client-cpp/all/test_package/test_package.cpp +++ b/recipes/unleash-client-cpp/all/test_package/test_package.cpp @@ -1,10 +1,11 @@ #include +#include +#include #include int main() { unleash::UnleashClient unleashClient = unleash::UnleashClient::create("production", "https://www.apple.com/%"); - unleashClient.initializeClient(); - return unleashClient.isEnabled("feature.toogle"); - + std::cout << "feature.toggle - is enabled: " << std::boolalpha << unleashClient.isEnabled("feature.toogle") << '\n'; + return 0; } diff --git a/recipes/unleash-client-cpp/config.yml b/recipes/unleash-client-cpp/config.yml index 60d31991f5141a..426a0e4c79e9b1 100644 --- a/recipes/unleash-client-cpp/config.yml +++ b/recipes/unleash-client-cpp/config.yml @@ -1,3 +1,3 @@ versions: - "1.1.1": + "1.3.0": folder: all From 3957ddb9b285e5fc57f697a4f74e044562f602e1 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 30 May 2024 17:21:05 +0200 Subject: [PATCH 13/39] (#24165) remove ericLemanissier from the authorized_users and reviewers --- .c3i/authorized_users.yml | 1 - .c3i/reviewers.yml | 3 --- docs/community_resources.md | 7 ------- 3 files changed, 11 deletions(-) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index b28163cd329936..7e3133f2e97a7b 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -7,7 +7,6 @@ authorized_users: - Croydon - Johnnyxy - solvingj -- ericLemanissier - tru - sztomi - theodelrieu diff --git a/.c3i/reviewers.yml b/.c3i/reviewers.yml index 1baa71f59b325e..53227574b66790 100644 --- a/.c3i/reviewers.yml +++ b/.c3i/reviewers.yml @@ -33,9 +33,6 @@ reviewers: - user: "theirix" type: "community" request_reviews: false - - user: "ericLemanissier" - type: "community" - request_reviews: false - user: "prince-chrismc" type: "community" request_reviews: false diff --git a/docs/community_resources.md b/docs/community_resources.md index 06aa0558a52f3c..4600ca89ac4515 100644 --- a/docs/community_resources.md +++ b/docs/community_resources.md @@ -19,19 +19,12 @@ If you are looking to stay up to date with the last Conan news, follow us on Twi - [Updatable Recipes](https://github.com/qchateau/conan-center-bot): Automatically scans available recipes and checked for new upstream releases and tests one configuration - The results can be found here: https://qchateau.github.io/conan-center-bot/#/updatable -- [Conflicting Pull Requests](https://github.com/ericLemanissier/conan-center-conflicting-prs): Checks all the open pull requests for those which edit the same -recipe files and posts a message. - - The results can be found here: https://ericlemanissier.github.io/conan-center-conflicting-prs/ - [Pending Review](https://github.com/prince-chrismc/conan-center-index-pending-review) - The results can be found here: https://prince-chrismc.github.io/conan-center-index-pending-review/ -- [Pull Request In Progress Status](https://ericlemanissier.github.io/conan-center-pr-status/in_progress_jobs) - [System Package Checks](https://github.com/bincrafters/system-packages-checks): Builds automatically all `system` versions of recipes merged on CCI and being pull requested on a selection of Linux distributions and FreeBSD - The results can be found here: https://bincrafters.github.io/system-packages-checks/ ## Tools -- [FreeBSD Testing](https://github.com/ericLemanissier/conan-center-index/tree/freebsd): Detects pull requests with `FreeBSD` in the description and runs a test for -one configuration on that platform - - The results can be found here: https://github.com/ericLemanissier/conan-center-index/actions?query=workflow%3ACI - [Bincrafters Conventions](https://github.com/bincrafters/bincrafters-conventions): Automatically updates Conan recipes to the latest conventions and rules From f1aa3dfb8cfc21decce47d604a492a4646ecd3af Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 30 May 2024 20:45:08 +0200 Subject: [PATCH 14/39] (#24163) [libprotobuf-mutator] Compatible with Conan 2.x * Protobug mutator compatible with Conan 2.x Signed-off-by: Uilian Ries * Add version 1.3 Signed-off-by: Uilian Ries * Enforce protobuf link Signed-off-by: Uilian Ries * update abseil usage Signed-off-by: Uilian Ries * consume all libs in tests Signed-off-by: Uilian Ries * define cxx language in cmakelists Signed-off-by: Uilian Ries * static-library on Windows Signed-off-by: Uilian Ries * Exclude examples from CMakeLists.txt The upstream uses EXCLUDE_FROM_ALL CMake feature to avoid building examples by default, however, CMake still parses the example cmake file and requires more external dependencies like expat. Signed-off-by: Uilian Ries * Do not build shared on Windows Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- .../libprotobuf-mutator/all/CMakeLists.txt | 16 +- recipes/libprotobuf-mutator/all/conandata.yml | 6 +- recipes/libprotobuf-mutator/all/conanfile.py | 159 ++++++++++++------ .../all/test_package/CMakeLists.txt | 21 +-- .../all/test_package/conanfile.py | 19 ++- .../all/test_package/msg.proto | 11 -- .../all/test_package/test_package.cpp | 24 +-- recipes/libprotobuf-mutator/config.yml | 2 +- 8 files changed, 138 insertions(+), 120 deletions(-) delete mode 100644 recipes/libprotobuf-mutator/all/test_package/msg.proto diff --git a/recipes/libprotobuf-mutator/all/CMakeLists.txt b/recipes/libprotobuf-mutator/all/CMakeLists.txt index 694038520f5568..54f184da6c63ab 100644 --- a/recipes/libprotobuf-mutator/all/CMakeLists.txt +++ b/recipes/libprotobuf-mutator/all/CMakeLists.txt @@ -1,13 +1,9 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper CXX) -include(conanbuildinfo.cmake) -conan_basic_setup() +find_package(Protobuf REQUIRED) +find_package(absl CONFIG REQUIRED) -add_subdirectory(source_subfolder) +add_subdirectory(src) -if(MSVC) - # Should be added because of - # https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initonceexecuteonce - add_definitions(-D_WIN32_WINNT=0x0600) -endif() +target_link_libraries(protobuf-mutator PUBLIC protobuf::libprotobuf absl::strings) diff --git a/recipes/libprotobuf-mutator/all/conandata.yml b/recipes/libprotobuf-mutator/all/conandata.yml index 813688d3f74a55..1152bb85795841 100644 --- a/recipes/libprotobuf-mutator/all/conandata.yml +++ b/recipes/libprotobuf-mutator/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20210831": - url: "https://github.com/google/libprotobuf-mutator/archive/ffd86a32874e5c08a143019aad1aaf0907294c9f.zip" - sha256: "14f595863452808483776ce1964209db00cdac79e649b31eb4d4b06ca72912d8" + "1.3": + url: "https://github.com/google/libprotobuf-mutator/archive/refs/tags/v1.3.tar.gz" + sha256: "1ee3473a6b0274494fce599539605bb19305c0efadc62b58d645812132c31baa" diff --git a/recipes/libprotobuf-mutator/all/conanfile.py b/recipes/libprotobuf-mutator/all/conanfile.py index f0419a2397845e..b03de6dbf5696d 100644 --- a/recipes/libprotobuf-mutator/all/conanfile.py +++ b/recipes/libprotobuf-mutator/all/conanfile.py @@ -1,8 +1,14 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +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 copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.env import VirtualBuildEnv +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.54.0" class LibProtobufMutatorConan(ConanFile): @@ -13,76 +19,117 @@ class LibProtobufMutatorConan(ConanFile): description = "A library to randomly mutate protobuffers." topics = ("test", "fuzzing", "protobuf") settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - exports_sources = ["CMakeLists.txt"] - - _cmake = None + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 14 @property - def _build_subfolder(self): - return "build_subfolder" + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "5", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + if is_msvc(self): + self.options.rm_safe("shared") + self.package_type = "static-library" + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("protobuf/3.17.1") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + # Protobuf headers are required by public src/binary_format.h and + self.requires("protobuf/4.25.3", transitive_headers=True) + # Abseil headers are required by public src/field_instance.h + self.requires("abseil/20240116.2") def validate(self): - if self.settings.compiler != "clang": - raise ConanInvalidConfiguration("Only clang allowed") - if self.settings.compiler.libcxx != "libstdc++11": - raise ConanInvalidConfiguration("Requires either compiler.libcxx=libstdc++11") if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) + 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): + self.tool_requires("cmake/[>=3.24 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _patch_sources(self): - tools.replace_in_file( - os.path.join(self._source_subfolder, 'CMakeLists.txt'), - """include_directories(${PROTOBUF_INCLUDE_DIRS})""", - """include_directories(${protobuf_INCLUDE_DIRS})""") - tools.replace_in_file( - os.path.join(self._source_subfolder, 'CMakeLists.txt'), - """set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/external)""", - """# (disabled by conan) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/external)""") - tools.replace_in_file( - os.path.join(self._source_subfolder, 'CMakeLists.txt'), - """add_subdirectory(examples EXCLUDE_FROM_ALL)""", - """# (disabled by conan) add_subdirectory(examples EXCLUDE_FROM_ALL)""") - - def _configure_cmake(self): - if self._cmake: - return self._cmake - - self._cmake = CMake(self) - self._cmake.definitions["LIB_PROTO_MUTATOR_TESTING"] = "OFF" - self._cmake.definitions["LIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF"] = "OFF" - self._cmake.definitions["LIB_PROTO_MUTATOR_WITH_ASAN"] = "OFF" - self._cmake.definitions["LIB_PROTO_MUTATOR_FUZZER_LIBRARIES"] = "" - # todo: check option(LIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + # Preserves Conan as dependency manager + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/external)", + "", + ) + # Fix libprotobuf-mutator.pc installation origin path + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "${CMAKE_BINARY_DIR}/libprotobuf-mutator.pc", + "${CMAKE_CURRENT_BINARY_DIR}/libprotobuf-mutator.pc", + ) + # Do not include examples when running CMake configure to avoid more dependencies + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(examples EXCLUDE_FROM_ALL)", + "", + ) + + def generate(self): + tc = VirtualBuildEnv(self) + tc.generate() + tc = CMakeToolchain(self) + tc.variables["LIB_PROTO_MUTATOR_TESTING"] = False + tc.variables["LIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF"] = False + tc.variables["LIB_PROTO_MUTATOR_WITH_ASAN"] = False + tc.variables["PKG_CONFIG_PATH"] = "share" + if is_msvc(self): + tc.variables["LIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME"] = is_msvc_static_runtime(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "OFF")) - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "libprotobuf-mutator" - self.cpp_info.names["cmake_find_package_multi"] = "libprotobuf-mutator" - - self.cpp_info.libs = ['protobuf-mutator-libfuzzer', 'protobuf-mutator'] - self.cpp_info.includedirs.append(os.path.join("include", "libprotobuf-mutator")) + self.cpp_info.components["mutator"].libs = ["protobuf-mutator"] + self.cpp_info.components["mutator"].set_property("cmake_target_name", "libprotobuf-mutator::protobuf-mutator") + self.cpp_info.components["mutator"].includedirs.append("include/libprotobuf-mutator") + self.cpp_info.components["mutator"].requires = ["protobuf::libprotobuf", "abseil::absl_strings"] + + self.cpp_info.components["fuzzer"].libs = ['protobuf-mutator-libfuzzer'] + self.cpp_info.components["fuzzer"].set_property("cmake_target_name", "libprotobuf-mutator::protobuf-mutator-libfuzzer") + self.cpp_info.components["fuzzer"].includedirs.append("include/libprotobuf-mutator") + self.cpp_info.components["fuzzer"].requires = ["mutator", "protobuf::libprotobuf"] diff --git a/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt b/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt index 00520b94898052..70a0e97ac972f4 100644 --- a/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt +++ b/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt @@ -1,19 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) find_package(libprotobuf-mutator REQUIRED CONFIG) - -protobuf_generate_cpp( - MSG_PROTO_SRCS - MSG_PROTO_HDRS - msg.proto -) - - -add_executable(${PROJECT_NAME} ${MSG_PROTO_SRCS} test_package.cpp) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(${PROJECT_NAME} libprotobuf-mutator::libprotobuf-mutator) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE libprotobuf-mutator::protobuf-mutator libprotobuf-mutator::protobuf-mutator-libfuzzer) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/libprotobuf-mutator/all/test_package/conanfile.py b/recipes/libprotobuf-mutator/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/libprotobuf-mutator/all/test_package/conanfile.py +++ b/recipes/libprotobuf-mutator/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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 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 build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - 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.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libprotobuf-mutator/all/test_package/msg.proto b/recipes/libprotobuf-mutator/all/test_package/msg.proto deleted file mode 100644 index cb25c9d0083526..00000000000000 --- a/recipes/libprotobuf-mutator/all/test_package/msg.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto2"; -package libfuzzer_example; - -import "google/protobuf/any.proto"; - -message Msg { - optional float optional_float = 1; - optional uint64 optional_uint64 = 2; - optional string optional_string = 3; - optional google.protobuf.Any any = 4; -} diff --git a/recipes/libprotobuf-mutator/all/test_package/test_package.cpp b/recipes/libprotobuf-mutator/all/test_package/test_package.cpp index c169f660311762..f7273ed21de606 100644 --- a/recipes/libprotobuf-mutator/all/test_package/test_package.cpp +++ b/recipes/libprotobuf-mutator/all/test_package/test_package.cpp @@ -1,23 +1,11 @@ -#include -#include +#include -#include "msg.pb.h" -#include +#include -DEFINE_PROTO_FUZZER(const libfuzzer_example::Msg& message) { - protobuf_mutator::protobuf::FileDescriptorProto file; - - // Emulate a bug. - if (message.optional_uint64() == std::hash{}(message.optional_string()) && - message.optional_string() == "abcdefghijklmnopqrstuvwxyz" && - !std::isnan(message.optional_float()) && - std::fabs(message.optional_float()) > 1000 && - message.any().UnpackTo(&file) && !file.name().empty()) - { - std::cerr << message.DebugString() << "\n"; - } -} int main() { - return 0; + protobuf_mutator::Mutator mutator{}; + const auto seed_value{42}; + mutator.Seed(seed_value); + return EXIT_SUCCESS; } diff --git a/recipes/libprotobuf-mutator/config.yml b/recipes/libprotobuf-mutator/config.yml index 9d5b0e4c50569a..d2eb4ed4a511f9 100644 --- a/recipes/libprotobuf-mutator/config.yml +++ b/recipes/libprotobuf-mutator/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20210831": + "1.3": folder: all From a5c52a107e77f3f7a860d72a8a41d768f8fcedb2 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Thu, 30 May 2024 14:53:09 -0500 Subject: [PATCH 15/39] (#24060) elfutils: Bump gettext to version 0.22.5 to support GCC 14 --- recipes/elfutils/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/elfutils/all/conanfile.py b/recipes/elfutils/all/conanfile.py index 759afadd553ee8..df45185883fb0c 100644 --- a/recipes/elfutils/all/conanfile.py +++ b/recipes/elfutils/all/conanfile.py @@ -82,7 +82,7 @@ def requirements(self): self.requires("libmicrohttpd/0.9.75") def build_requirements(self): - self.tool_requires("gettext/0.21") + self.tool_requires("gettext/0.22.5") self.tool_requires("automake/1.16.5") self.build_requires("m4/1.4.19") self.build_requires("flex/2.6.4") From 672da621ee3569c0d55b8f11843ebef5eb1a613d Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 31 May 2024 11:01:49 +0200 Subject: [PATCH 16/39] (#24176) [sioclient] Build static libraries in Windows Signed-off-by: Uilian Ries --- recipes/sioclient/all/conanfile.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/sioclient/all/conanfile.py b/recipes/sioclient/all/conanfile.py index 4af93cba3d64c2..28f6a1a4ad91a3 100644 --- a/recipes/sioclient/all/conanfile.py +++ b/recipes/sioclient/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv +from conan.tools.microsoft import is_msvc from conan.tools.files import copy, get, replace_in_file, rm, rmdir, save required_conan_version = ">=1.53.0" @@ -38,6 +39,9 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if is_msvc(self): + self.options.rm_safe("shared") + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") @@ -52,8 +56,6 @@ def requirements(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) - if self.settings.os == "Windows": - raise ConanInvalidConfiguration("Shared builds on Windows are not supported") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -61,17 +63,16 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["USE_SUBMODULES"] = False + tc.variables["BUILD_UNIT_TESTS"] = False + tc.variables["BUILD_TESTING"] = False tc.generate() deps = CMakeDeps(self) deps.generate() - VirtualBuildEnv(self).generate() - def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "asio asio::asio", "asio::asio") - save(self, os.path.join(self.source_folder, "test", "CMakeLists.txt"), "") def build(self): self._patch_sources() @@ -84,7 +85,6 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rm(self, "*.pdb", self.package_folder, recursive=True) def package_info(self): self.cpp_info.set_property("cmake_file_name", "sioclient") From 5fc5f4dd016d361c048ca2dfa361c3accdfdadf0 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 31 May 2024 18:32:29 +0900 Subject: [PATCH 17/39] (#24174) meson: add version 1.4.1 --- recipes/meson/all/conandata.yml | 3 +++ recipes/meson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index f567bf8d560876..57f4fedf15a32d 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.1": + url: "https://github.com/mesonbuild/meson/archive/1.4.1.tar.gz" + sha256: "a7efc72ecb873c5a62031ade1921a7177b67cfdcb2e9410a7ab023f9e8192f4b" "1.4.0": url: "https://github.com/mesonbuild/meson/archive/1.4.0.tar.gz" sha256: "61382f295378bddcd9bebb3a9a9065b1cbc671fa41b80964ab02726f9a5f3a88" diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 2b56413242adfe..7d388efa3e5aee 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.1": + folder: all "1.4.0": folder: all "1.3.2": From 0ee1843d808bc72b02717d37efa20874ed6ef42f Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 31 May 2024 18:52:27 +0900 Subject: [PATCH 18/39] (#24175) ada: add version 2.8.0 --- recipes/ada/all/conandata.yml | 3 +++ recipes/ada/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index 235136d4b7acf4..ce7f88f9c21c4a 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.8.0": + url: "https://github.com/ada-url/ada/archive/v2.8.0.tar.gz" + sha256: "83b77fb53d1a9eea22b1484472cea0215c50478c9ea2b4b44b0ba3b52e07c139" "2.7.8": url: "https://github.com/ada-url/ada/archive/v2.7.8.tar.gz" sha256: "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index 50d72ec6cb8b64..65b7e7769826f4 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,6 @@ versions: + "2.8.0": + folder: all "2.7.8": folder: all "2.7.7": From 9b921fa1e1e4c53b6ebb21741546ad034d2925ac Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Fri, 31 May 2024 18:11:51 +0800 Subject: [PATCH 19/39] (#24057) add extra-cmake-modules 6.2.0 --- recipes/extra-cmake-modules/all/conandata.yml | 3 +++ recipes/extra-cmake-modules/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/extra-cmake-modules/all/conandata.yml b/recipes/extra-cmake-modules/all/conandata.yml index 1879a975409f53..f556f71e55d069 100644 --- a/recipes/extra-cmake-modules/all/conandata.yml +++ b/recipes/extra-cmake-modules/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.2.0": + url: "https://download.kde.org/stable/frameworks/6.2/extra-cmake-modules-6.2.0.tar.xz" + sha256: "6374bfa0dded8be265c702acd5de11eecd2851c625b93e1c87d8d0f5f1a8ebe1" "5.113.0": url: "https://download.kde.org/stable/frameworks/5.113/extra-cmake-modules-5.113.0.tar.xz" sha256: "265e5440eebeca07351a469e617a4bf35748927bd907b00ace9c018392bb3bc4" diff --git a/recipes/extra-cmake-modules/config.yml b/recipes/extra-cmake-modules/config.yml index 789c28809f9aee..101fb016a65c8c 100644 --- a/recipes/extra-cmake-modules/config.yml +++ b/recipes/extra-cmake-modules/config.yml @@ -1,4 +1,6 @@ versions: + "6.2.0": + folder: "all" "5.113.0": folder: "all" "5.111.0": From 4966b140d2416290c7dfb1288fd5551120364d08 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 3 Jun 2024 19:14:23 +0900 Subject: [PATCH 20/39] (#24195) wiringpi: add version 3.6 --- recipes/wiringpi/all/conandata.yml | 3 +++ recipes/wiringpi/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/wiringpi/all/conandata.yml b/recipes/wiringpi/all/conandata.yml index b1eb5a77ac556d..9b3f6dc4c04db5 100644 --- a/recipes/wiringpi/all/conandata.yml +++ b/recipes/wiringpi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.6.tar.gz" + sha256: "bec180a14ccd2d6b4eb5248d6553593511e7881348f56f8c98515a6d5d5444ee" "3.4": url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.4.tar.gz" sha256: "a81219e9ea0ce08295d2fc0457c69c4df0c6d2e846cb5817ba3247f673480d55" diff --git a/recipes/wiringpi/config.yml b/recipes/wiringpi/config.yml index a414869788af1f..64b1ec70829aed 100644 --- a/recipes/wiringpi/config.yml +++ b/recipes/wiringpi/config.yml @@ -1,4 +1,6 @@ versions: + "3.6": + folder: "all" "3.4": folder: "all" "3.2": From b574c8342c371674c3b3b65d103bab83fca3d58e Mon Sep 17 00:00:00 2001 From: Vladimir Shaleev Date: Mon, 3 Jun 2024 13:32:51 +0300 Subject: [PATCH 21/39] (#24196) ipaddress: add version 1.1.0 --- recipes/ipaddress/all/conandata.yml | 3 +++ recipes/ipaddress/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ipaddress/all/conandata.yml b/recipes/ipaddress/all/conandata.yml index 05cfe6de06df95..a3ae373c62221f 100644 --- a/recipes/ipaddress/all/conandata.yml +++ b/recipes/ipaddress/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/VladimirShaleev/ipaddress/archive/v1.1.0.tar.gz" + sha256: "e5084d83ebd712210882eb6dac14ed1b9b71584dede523b35c6181e0a06375f1" "1.0.1": url: "https://github.com/VladimirShaleev/ipaddress/archive/v1.0.1.tar.gz" sha256: "49c16294f06fe95ffc66cae828dc08d116efb4a1ede3dddd21dcc182a2eceb03" diff --git a/recipes/ipaddress/config.yml b/recipes/ipaddress/config.yml index 715e55357a17be..20ec1c9e2bdeef 100644 --- a/recipes/ipaddress/config.yml +++ b/recipes/ipaddress/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.0": + folder: all "1.0.1": folder: all From c8d47a7476100c46ee5112e03fae41fead84c0b9 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 3 Jun 2024 13:21:26 +0100 Subject: [PATCH 22/39] (#24164) [bot] Update authorized users list (2024-05-30) * Add/remove users to Access Request * Update .c3i/authorized_users.yml * Add sunbubble --------- Co-authored-by: conan-center-bot Co-authored-by: Uilian Ries --- .c3i/authorized_users.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 7e3133f2e97a7b..02576e3b3de9d6 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1358,3 +1358,9 @@ authorized_users: - tttapa - zeeshancs07 - jll63 +- Jie-Cheng +- jjardina +- soonick +- Mercotui +- sunbubble +- praetorian20 From 677d75a345efd611634c88a262838b83ff42a789 Mon Sep 17 00:00:00 2001 From: Uno Wu Date: Mon, 3 Jun 2024 20:47:46 +0800 Subject: [PATCH 23/39] (#22427) aws-c-cal: fix dependency version conflict --- recipes/aws-c-cal/all/conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/aws-c-cal/all/conanfile.py b/recipes/aws-c-cal/all/conanfile.py index de7ce7d5e222d9..82f0949981b96d 100644 --- a/recipes/aws-c-cal/all/conanfile.py +++ b/recipes/aws-c-cal/all/conanfile.py @@ -50,8 +50,11 @@ def layout(self): def requirements(self): if Version(self.version) <= "0.5.20": self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: + elif Version(self.version) <= "0.6.1": self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + else: + # [>=0.9.7] + self.requires("aws-c-common/0.9.12", transitive_headers=True, transitive_libs=True) if self._needs_openssl: self.requires("openssl/[>=1.1 <4]") From 23b2a55ad1f9466d425a079bead1d98215deed80 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:22:33 +0100 Subject: [PATCH 24/39] (#24206) [bot] Update authorized users list (2024-06-03) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add/remove users to Access Request * Update .c3i/authorized_users.yml --------- Co-authored-by: conan-center-bot Co-authored-by: Rubén Rincón Blanco --- .c3i/authorized_users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 02576e3b3de9d6..390a20c30f019f 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1364,3 +1364,4 @@ authorized_users: - Mercotui - sunbubble - praetorian20 +- phbasler From a5698eaf9e8e7630bb08a0591f006f08cdbbd0ba Mon Sep 17 00:00:00 2001 From: Oliver Kuckertz Date: Mon, 3 Jun 2024 15:48:29 +0200 Subject: [PATCH 25/39] (#22951) xnnpack: fix cross-compiling for Android/armv7 --- recipes/xnnpack/all/conanfile.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/recipes/xnnpack/all/conanfile.py b/recipes/xnnpack/all/conanfile.py index 579c065b64636b..81bd0455ccc879 100644 --- a/recipes/xnnpack/all/conanfile.py +++ b/recipes/xnnpack/all/conanfile.py @@ -64,7 +64,7 @@ def requirements(self): def validate(self): check_min_vs(self, 192) - compiler = self.info.settings.compiler + compiler = self.settings.compiler compiler_version = Version(compiler.version) if self.version < "cci.20230715": if (compiler == "gcc" and compiler_version < "6") or \ @@ -75,6 +75,10 @@ def validate(self): if (compiler == "gcc" and compiler_version < "11") or \ (compiler == "clang" and compiler_version < "8"): raise ConanInvalidConfiguration(f"{self.ref} doesn't support {compiler} {compiler.version}") + if self.options.assembly and compiler == "clang" and self.settings.arch == "armv6": + # clang assembly validator fails on XNNPACK's math.h for armv6: + # https://github.com/google/XNNPACK/issues/4348#issuecomment-1445437613 + raise ConanInvalidConfiguration(f"{self.ref} assembly option is incompatible with clang+armv6") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -120,6 +124,12 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}", "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}") + if self.settings.compiler == "clang" and self.settings.arch == "armv7": + # https://github.com/google/XNNPACK/issues/4348 + # XNNPACK targets armv6, but clang fails to compile to due to a bug in the assembler (see linked issue). + # The user is targetting armv7, so adjust XNNPACK's -march accordingly to avoid the bug. + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "-march=armv6 -mfpu=vfp", "-march=armv7-a -mfpu=neon") def build(self): self._patch_sources() From 2ca9d9ab71ea5d3fe7e01ed06ffc32064a81c3d3 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 3 Jun 2024 23:12:31 +0900 Subject: [PATCH 26/39] (#24178) etl: add version 20.38.16 --- recipes/etl/all/conandata.yml | 3 +++ recipes/etl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/etl/all/conandata.yml b/recipes/etl/all/conandata.yml index 5bb097c277b672..b5774a9722f3c8 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.38.16": + url: "https://github.com/ETLCPP/etl/archive/20.38.16.tar.gz" + sha256: "6d05e33d6e7eb2c8d4654c77dcd083adc70da29aba808f471ba7c6e2b8fcbf03" "20.38.15": url: "https://github.com/ETLCPP/etl/archive/20.38.15.tar.gz" sha256: "c4f3108b35eb669ce4a6a217264ca133fe52cc8b5bce026a474ec81c0a2c4026" diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index c47431346ce8f8..a46283faf72f00 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,4 +1,6 @@ versions: + "20.38.16": + folder: all "20.38.15": folder: all "20.38.14": From 50d3db7d7cf3a4a6e997616a574113e3350b57ce Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:32:56 +0200 Subject: [PATCH 27/39] (#24183) libjpeg: don't force LTO by default for msvc --- recipes/libjpeg/all/conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/libjpeg/all/conanfile.py b/recipes/libjpeg/all/conanfile.py index 4d9b00faf2e497..a4eb4a8f376c9c 100644 --- a/recipes/libjpeg/all/conanfile.py +++ b/recipes/libjpeg/all/conanfile.py @@ -93,13 +93,13 @@ def build(self): # shared: "libjpeg.lib" (import), "libjpeg-9.dll" (DLL) jpeg_vcxproj = os.path.join(self.source_folder, "jpeg.vcxproj") target_name = "libjpeg-9" if self.options.shared else "libjpeg" - replace_in_file(self, jpeg_vcxproj, """""", + replace_in_file(self, jpeg_vcxproj, """""", f""" {target_name} """) if self.options.shared: replace_in_file(self, jpeg_vcxproj, "", "$(OutDir)libjpeg.lib") - + # Support static/shared if self.options.shared: replace_in_file(self, jpeg_vcxproj, @@ -107,6 +107,9 @@ def build(self): "DynamicLibrary" ) + # Don't force LTO + replace_in_file(self, jpeg_vcxproj, "true", "") + # Inject conan-generated .props file # Note: importing it right before Microsoft.Cpp.props also ensures we correctly # handle the toolset setting @@ -125,7 +128,6 @@ def build(self): if self.settings.build_type == "Debug": replacements.update({ "Full": "Disabled", - "true": "False", "NDEBUG;": "_DEBUG;", }) for key, value in replacements.items(): From ceb5ef08629e1b6e358e4227e2a5e53ed7fb10ea Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 3 Jun 2024 23:52:40 +0900 Subject: [PATCH 28/39] (#24190) minizip-ng: add version 4.0.6 --- recipes/minizip-ng/all/conandata.yml | 3 +++ recipes/minizip-ng/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/minizip-ng/all/conandata.yml b/recipes/minizip-ng/all/conandata.yml index 1c6819fac1991a..5c7d70a9a8713e 100644 --- a/recipes/minizip-ng/all/conandata.yml +++ b/recipes/minizip-ng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.6": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.6.tar.gz" + sha256: "e96ed3866706a67dbed05bf035e26ef6b60f408e1381bf0fe9af17fe2c0abebc" "4.0.5": url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.5.tar.gz" sha256: "9bb636474b8a4269280d32aca7de4501f5c24cc642c9b4225b4ed7b327f4ee73" diff --git a/recipes/minizip-ng/config.yml b/recipes/minizip-ng/config.yml index c5531d3a6ec01b..580a769b6b0a84 100644 --- a/recipes/minizip-ng/config.yml +++ b/recipes/minizip-ng/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.6": + folder: all "4.0.5": folder: all "4.0.4": From 38cf4154c2eb72849afd843de48b03213ea9e1be Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 4 Jun 2024 00:13:25 +0900 Subject: [PATCH 29/39] (#24198) thorvg: add version 0.13.6 --- recipes/thorvg/all/conandata.yml | 3 +++ recipes/thorvg/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/thorvg/all/conandata.yml b/recipes/thorvg/all/conandata.yml index 68268a5d2d990f..6c54d6231fd1c8 100644 --- a/recipes/thorvg/all/conandata.yml +++ b/recipes/thorvg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.13.6": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.6.tar.gz" + sha256: "f24fd3647e1a309dec00f6455b32258c0dd0e0dbd1133233169467571f188bad" "0.13.5": url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.5.tar.gz" sha256: "977ed74c3846c9a6acd5765aff776745d40e3c91507b22e51177d59c69afd198" diff --git a/recipes/thorvg/config.yml b/recipes/thorvg/config.yml index ebe3fa467b911a..8432f6206ff88b 100644 --- a/recipes/thorvg/config.yml +++ b/recipes/thorvg/config.yml @@ -1,4 +1,6 @@ versions: + "0.13.6": + folder: all "0.13.5": folder: all "0.13.4": From 346ed374cfdeef77c2fefcee0771744f8053cb63 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 4 Jun 2024 02:34:54 +0900 Subject: [PATCH 30/39] (#24184) pdf-writer: add version 4.6.4 --- recipes/pdf-writer/all/conandata.yml | 7 +++++++ recipes/pdf-writer/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/pdf-writer/all/conandata.yml b/recipes/pdf-writer/all/conandata.yml index b1b2eb4b8f3ff5..2cb2a341032b87 100644 --- a/recipes/pdf-writer/all/conandata.yml +++ b/recipes/pdf-writer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.6.4": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.4.tar.gz" + sha256: "93b5f1dc88fd67fdebde409e927e828dfbae02efa44936e89728622411c6a047" "4.6.3": url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.3.tar.gz" sha256: "3b5d9ba4b49d0380678e8172f27cdb8eda196ea448e7f1cdd79620066d082ab9" @@ -12,6 +15,10 @@ sources: url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.5.12.tar.gz" sha256: "40fcbaa66fc46fcb588ceda119ba8839ff6d2c886191ac5e68ed702475c7336e" patches: + "4.6.4": + - patch_file: "patches/4.6.2-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" "4.6.3": - patch_file: "patches/4.6.2-0001-fix-cmake.patch" patch_description: "disable cpack" diff --git a/recipes/pdf-writer/config.yml b/recipes/pdf-writer/config.yml index 44bc3d66897b6d..c19efc7d2c70e1 100644 --- a/recipes/pdf-writer/config.yml +++ b/recipes/pdf-writer/config.yml @@ -1,4 +1,6 @@ versions: + "4.6.4": + folder: all "4.6.3": folder: all "4.6.2": From bd117f0bba24e8680b4a83256c6c70ac09d96a7e Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Mon, 3 Jun 2024 22:13:48 +0200 Subject: [PATCH 31/39] (#24054) glib: refactor test package * glib: refactor test package * gdbus-codegen -h not for windows * Enforce PATH management Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/glib/all/test_package/CMakeLists.txt | 18 ++------- recipes/glib/all/test_package/conanfile.py | 39 ++----------------- .../glib/all/test_v1_package/CMakeLists.txt | 2 +- recipes/glib/all/test_v1_package/conanfile.py | 20 +++------- 4 files changed, 15 insertions(+), 64 deletions(-) diff --git a/recipes/glib/all/test_package/CMakeLists.txt b/recipes/glib/all/test_package/CMakeLists.txt index 44f2423e0f8316..c2e2b58b04658a 100644 --- a/recipes/glib/all/test_package/CMakeLists.txt +++ b/recipes/glib/all/test_package/CMakeLists.txt @@ -1,17 +1,7 @@ -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) -add_executable(${PROJECT_NAME} test_package.c) +find_package(glib CONFIG REQUIRED) -if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - find_package(glib CONFIG REQUIRED) - target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0) -else() - find_package(PkgConfig REQUIRED) - pkg_check_modules(glib-2.0 REQUIRED IMPORTED_TARGET glib-2.0) - pkg_check_modules(gio-2.0 REQUIRED IMPORTED_TARGET gio-2.0) - pkg_check_modules(gmodule-2.0 REQUIRED IMPORTED_TARGET gmodule-2.0) - pkg_check_modules(gobject-2.0 REQUIRED IMPORTED_TARGET gobject-2.0) - pkg_check_modules(gthread-2.0 REQUIRED IMPORTED_TARGET gthread-2.0) - target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0) -endif() +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0) diff --git a/recipes/glib/all/test_package/conanfile.py b/recipes/glib/all/test_package/conanfile.py index 168cdc2e86991b..686967e0621b8e 100644 --- a/recipes/glib/all/test_package/conanfile.py +++ b/recipes/glib/all/test_package/conanfile.py @@ -1,47 +1,19 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain -from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv -from conan.tools.gnu import PkgConfig, PkgConfigDeps +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv", "VirtualRunEnv" test_type = "explicit" def layout(self): cmake_layout(self) def requirements(self): - self.requires(self.tested_reference_str) - - def build_requirements(self): - if self.settings.os != "Windows" and not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") - - def generate(self): - tc = CMakeToolchain(self) - tc.generate() - virtual_run_env = VirtualRunEnv(self) - virtual_run_env.generate() - - if self.settings.os == "Macos": - env = Environment() - # Avoid conflicts with system libiconv - # see: https://github.com/conan-io/conan-center-index/pull/17610#issuecomment-1552921286 - env.define_path("DYLD_FALLBACK_LIBRARY_PATH", "$DYLD_LIBRARY_PATH") - env.define_path("DYLD_LIBRARY_PATH", "") - env.vars(self, scope="run").save_script("conanrun_macos_runtimepath") - - if self.settings.os == "Windows": - deps = CMakeDeps(self) - deps.generate() - else: - virtual_build_env = VirtualBuildEnv(self) - virtual_build_env.generate() - pkg_config_deps = PkgConfigDeps(self) - pkg_config_deps.generate() + self.requires(self.tested_reference_str, run=True) def build(self): cmake = CMake(self) @@ -52,8 +24,5 @@ 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") - if self.settings.os != "Windows": - pkg_config = PkgConfig(self, "gio-2.0", pkg_config_path=self.generators_folder) - gdbus_codegen = pkg_config.variables["gdbus_codegen"] - self.run(f"{gdbus_codegen} -h", env="conanrun") + self.run("gdbus-codegen -h", env="conanrun") diff --git a/recipes/glib/all/test_v1_package/CMakeLists.txt b/recipes/glib/all/test_v1_package/CMakeLists.txt index 0d20897301b68b..b21cc49efde95c 100644 --- a/recipes/glib/all/test_v1_package/CMakeLists.txt +++ b/recipes/glib/all/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) diff --git a/recipes/glib/all/test_v1_package/conanfile.py b/recipes/glib/all/test_v1_package/conanfile.py index 32471187016745..18cf513b306968 100644 --- a/recipes/glib/all/test_v1_package/conanfile.py +++ b/recipes/glib/all/test_v1_package/conanfile.py @@ -4,24 +4,16 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi", "pkg_config" - - def build_requirements(self): - if self.settings.os != "Windows": - self.tool_requires("pkgconf/2.0.3") + generators = "cmake", "cmake_find_package_multi" def build(self): - if self.settings.os != "Windows": - with tools.environment_append({'PKG_CONFIG_PATH': "."}): - pkg_config = tools.PkgConfig("gio-2.0") - self.run(f"{pkg_config.variables['gdbus_codegen']} -h", run_environment=True) - - with tools.environment_append({'PKG_CONFIG_PATH': "."}): - cmake = CMake(self) - cmake.configure() - cmake.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) + if self.settings.os != "Windows": + self.run("gdbus-codegen -h", env="conanrun") From a253438020bcf3909e652df94c5444d48e8170fd Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 4 Jun 2024 05:34:26 +0900 Subject: [PATCH 32/39] (#24070) quill: add version 4.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * quill: add version 4.0.0 * make bindirs and libdirs empty * add package_id * avoid deleting fPIC twice * don't require fmtlib in 4.0.0 * update 4.1.0 * Split library into header-only and static library packages * remove package_id in old recipe * update 4.2.1 * update 4.3.0 --------- Co-authored-by: Rubén Rincón Blanco --- recipes/quill/all/conandata.yml | 60 +----- recipes/quill/all/conanfile.py | 132 +++---------- recipes/quill/all/test_package/CMakeLists.txt | 11 +- .../quill/all/test_package/test_package.cpp | 70 +++++-- recipes/quill/config.yml | 40 ++-- recipes/quill/old/conandata.yml | 58 ++++++ recipes/quill/old/conanfile.py | 174 ++++++++++++++++++ recipes/quill/old/test_package/CMakeLists.txt | 17 ++ recipes/quill/old/test_package/conanfile.py | 26 +++ .../quill/old/test_package/test_package.cpp | 19 ++ .../test_v1_package/CMakeLists.txt | 0 .../{all => old}/test_v1_package/conanfile.py | 0 12 files changed, 399 insertions(+), 208 deletions(-) create mode 100644 recipes/quill/old/conandata.yml create mode 100644 recipes/quill/old/conanfile.py create mode 100644 recipes/quill/old/test_package/CMakeLists.txt create mode 100644 recipes/quill/old/test_package/conanfile.py create mode 100644 recipes/quill/old/test_package/test_package.cpp rename recipes/quill/{all => old}/test_v1_package/CMakeLists.txt (100%) rename recipes/quill/{all => old}/test_v1_package/conanfile.py (100%) diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index 5fe2a37cc1525e..5a2aea87cc5336 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -1,58 +1,4 @@ sources: - "3.9.0": - url: "https://github.com/odygrd/quill/archive/v3.9.0.tar.gz" - sha256: "6e6a46dc6ae94e8321aca00d27dae754dcc51ee83fe60078f8f1f3eb7b3b227b" - "3.8.0": - url: "https://github.com/odygrd/quill/archive/v3.8.0.tar.gz" - sha256: "d3e1b349c5d6904c9644e5b79ec65f21692e8094a3d75241a7fe071076eef4dd" - "3.7.0": - url: "https://github.com/odygrd/quill/archive/v3.7.0.tar.gz" - sha256: "53afe555c32b4263c9d31ec11bd0d858983374af7a5e79eb26124f803b192515" - "3.6.0": - url: "https://github.com/odygrd/quill/archive/v3.6.0.tar.gz" - sha256: "ba9dc3df262f2e65c57904580cc8407eba9a462001340c17bab7ae1dccddb4bd" - "3.5.1": - url: "https://github.com/odygrd/quill/archive/v3.5.1.tar.gz" - sha256: "9fa4ebe594c66ce2a409630c304724fa7a2ada0d842ba9c9aaf05f0a90b461f9" - "3.5.0": - url: "https://github.com/odygrd/quill/archive/v3.5.0.tar.gz" - sha256: "47a69465cddeb05645745bed0b3099b49cb627464782f765ce9545723ff1fe84" - "3.4.1": - url: "https://github.com/odygrd/quill/archive/v3.4.1.tar.gz" - sha256: "99f6497b8ba37c30c871fab89f14cd7bc989f3eaa921ccd940a521ee60a6a1c5" - "3.4.0": - url: "https://github.com/odygrd/quill/archive/v3.4.0.tar.gz" - sha256: "16a6cfadc288953f07d128bb51e8ebd4ca6bb8ce4175b5a8af53ce7dde324d8d" - "3.3.1": - url: "https://github.com/odygrd/quill/archive/v3.3.1.tar.gz" - sha256: "f929d54a115b45c32dd2acd1a9810336d35c31fde9f5581c51ad2b80f980d0d1" - "3.2.0": - url: "https://github.com/odygrd/quill/archive/v3.2.0.tar.gz" - sha256: "9745ad83b285bbd0481bd14c1b866b7e6121a981dd211b914f5d55955040fd00" - "3.1.0": - url: "https://github.com/odygrd/quill/archive/v3.1.0.tar.gz" - sha256: "9e7aa64c4f8101ed2b59d1cf3156b1c6bdd712ca89a2ec7aa7166905edc3e621" - "3.0.2": - url: "https://github.com/odygrd/quill/archive/v3.0.2.tar.gz" - sha256: "76e9f607168f71cf1028ae7374fbe91225e400c11b5a51a6ebc992c85d012eed" - "2.9.2": - url: "https://github.com/odygrd/quill/archive/v2.9.2.tar.gz" - sha256: "5b5b502f33277d1ebdb39d57898b1ca25affef4819d390927499f368dd562d91" - "2.9.1": - url: "https://github.com/odygrd/quill/archive/v2.9.1.tar.gz" - sha256: "921e053118136f63cebb2ca1d7e42456fd0bf9626facb755884709092753c054" - "2.9.0": - url: "https://github.com/odygrd/quill/archive/v2.9.0.tar.gz" - sha256: "dec64c0fbb4bfbafe28fdeeeefac10206285bf2be4a42ec5dfb7987ca4ccb372" - "2.8.0": - url: "https://github.com/odygrd/quill/archive/v2.8.0.tar.gz" - sha256: "0461a6c314e3d882f3b9ada487ef1bf558925272509ee41a9fd25f7776db6075" - "2.7.0": - url: "https://github.com/odygrd/quill/archive/v2.7.0.tar.gz" - sha256: "10b8912e4c463a3a86b809076b95bec49aa08393d9ae6b92196cd46314236b87" - "2.6.0": - url: "https://github.com/odygrd/quill/archive/v2.6.0.tar.gz" - sha256: "d72fd5a01bf8d3e59ed93a789a8f103bc31efe0fb3c09182c74036a2e3a8451b" - "1.7.3": - url: "https://github.com/odygrd/quill/archive/v1.7.3.tar.gz" - sha256: "3fff0c5ffb19bbde5429369079741f84a6acce3a781b504cec5e677b05461208" + "4.3.0": + url: "https://github.com/odygrd/quill/archive/v4.3.0.tar.gz" + sha256: "c97bf3bfac6dfb7ed77fa08d945a490e302ba07e405539fda61985b39750cb29" diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index 96693e04b9fe8f..a696da22a6a0ae 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -1,10 +1,9 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir, replace_in_file +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 -from conan.tools.microsoft import is_msvc +from conan.tools.layout import basic_layout import os @@ -16,60 +15,28 @@ class QuillConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/odygrd/quill/" - topics = ("logging", "log", "async") - package_type = "static-library" + topics = ("logging", "log", "async", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - options = { - "fPIC": [True, False], - "with_bounded_queue": [True, False], - "with_no_exceptions": [True, False], - "with_x86_arch": [True, False], - "with_bounded_blocking_queue": [True, False], - } - default_options = { - "fPIC": True, - "with_bounded_queue": False, - "with_no_exceptions": False, - "with_x86_arch": False, - "with_bounded_blocking_queue": False, - } @property def _min_cppstd(self): - return "17" if Version(self.version) >= "2.0.0" else "14" + return "17" @property def _compilers_minimum_versions(self): return { - "14": - { - "gcc": "5", - "Visual Studio": "15", - "clang": "5", - "apple-clang": "10", - }, - "17": - { - "gcc": "8", - "Visual Studio": "16", - "clang": "7", - "apple-clang": "12", - }, + "gcc": "8", + "Visual Studio": "16", + "clang": "7", + "apple-clang": "12", } - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if Version(self.version) < "2.8.0": - del self.options.with_bounded_blocking_queue - def layout(self): - cmake_layout(self, src_folder="src") + basic_layout(self, src_folder="src") - def requirements(self): - self.requires("fmt/10.2.1", transitive_headers=True) + def package_id(self): + self.info.clear() def validate(self): supported_archs = ["x86", "x86_64", "armv6", "armv7", "armv7hf", "armv8"] @@ -80,95 +47,42 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - compilers_minimum_version = self._compilers_minimum_versions[self._min_cppstd] + compilers_minimum_version = self._compilers_minimum_versions minimum_version = compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: if Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") - else: - self.output.warning(f"{self.ref} requires C++{self._min_cppstd}. Your compiler is unknown. Assuming it supports C++{self._min_cppstd}.") - if Version(self.version) >= "2.0.0" and \ - self.settings.compiler== "clang" and Version(self.settings.compiler.version).major == "11" and \ + if self.settings.compiler== "clang" and Version(self.settings.compiler.version).major == "11" and \ self.settings.compiler.libcxx == "libstdc++": raise ConanInvalidConfiguration(f"{self.ref} requires C++ filesystem library, which your compiler doesn't support.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def is_quilll_x86_arch(self): - if not self.options.with_x86_arch: - return False - if Version(self.version) < "2.7.0": - return False - if self.settings.arch not in ("x86", "x86_64"): - return False - if self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libc++": - return False - if is_msvc(self): - return False - return True - - def generate(self): - tc = CMakeToolchain(self) - tc.variables["QUILL_FMT_EXTERNAL"] = True - tc.variables["QUILL_ENABLE_INSTALL"] = True - if Version(self.version) < "2.8.0": - tc.variables["QUILL_USE_BOUNDED_QUEUE"] = self.options.with_bounded_queue - else: - if self.options.with_bounded_queue: - tc.preprocessor_definitions["QUILL_USE_BOUNDED_QUEUE"] = 1 - tc.variables["QUILL_NO_EXCEPTIONS"] = self.options.with_no_exceptions - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - if self.is_quilll_x86_arch(): - if Version(self.version) < "2.8.0": - tc.variables["QUILL_X86ARCH"] = True - else: - tc.preprocessor_definitions["QUILL_X86ARCH"] = 1 - tc.variables["CMAKE_CXX_FLAGS"] = "-mclflushopt" - if Version(self.version) >= "2.8.0" and self.options.get_safe("with_bounded_blocking_queue"): - tc.preprocessor_definitions["QUILL_USE_BOUNDED_BLOCKING_QUEUE"] = 1 - if Version(self.version) >= "3.2.0": - tc.variables["QUILL_DISABLE_POSITION_INDEPENDENT_CODE"] = not self.options.get_safe("fPIC") - tc.generate() - - deps = CMakeDeps(self) - deps.generate() def _patch_sources(self): # remove bundled fmt rmdir(self, os.path.join(self.source_folder, "quill", "quill", "include", "quill", "bundled", "fmt")) - rmdir(self, os.path.join(self.source_folder, "quill", "quill", "src", "bundled", "fmt")) - - if "2.0.0" <= Version(self.version) < "2.9.1": - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - """set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/quill/cmake" CACHE STRING "Modules for CMake" FORCE)""", - """set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_LIST_DIR}/quill/cmake")""" - ) def build(self): self._patch_sources() - 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() + copy( + self, + "*.h", + os.path.join(self.source_folder, "quill", "include"), + os.path.join(self.package_folder, "include"), + ) - rmdir(self, os.path.join(self.package_folder, "pkgconfig")) - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.libs = ["quill"] - self.cpp_info.defines.append("QUILL_FMT_EXTERNAL") - if self.is_quilll_x86_arch(): - self.cpp_info.defines.append("QUILL_X86ARCH") - self.cpp_info.cxxflags.append("-mclflushopt") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("pthread") - if Version(self.version) >= "2.0.0" and \ - self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": self.cpp_info.system_libs.append("stdc++fs") diff --git a/recipes/quill/all/test_package/CMakeLists.txt b/recipes/quill/all/test_package/CMakeLists.txt index b6b657d776df51..4d5e7a7566fabd 100644 --- a/recipes/quill/all/test_package/CMakeLists.txt +++ b/recipes/quill/all/test_package/CMakeLists.txt @@ -4,13 +4,8 @@ project(test_package LANGUAGES CXX) find_package(quill REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) + target_link_libraries(${PROJECT_NAME} PRIVATE quill::quill) -if(quill_VERSION VERSION_GREATER_EQUAL "2.0.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -else() - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) -endif() +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_definitions(${PROJECT_NAME} PRIVATE QUILL_FILE_HANDLERS_API_V3_3) -if(quill_VERSION VERSION_GREATER_EQUAL "3.3.0") - target_compile_definitions(${PROJECT_NAME} PRIVATE QUILL_FILE_HANDLERS_API_V3_3) -endif() diff --git a/recipes/quill/all/test_package/test_package.cpp b/recipes/quill/all/test_package/test_package.cpp index b02a6dd344b064..3c984618a5cd0d 100644 --- a/recipes/quill/all/test_package/test_package.cpp +++ b/recipes/quill/all/test_package/test_package.cpp @@ -1,19 +1,59 @@ -#include "quill/Quill.h" +#include "quill/Backend.h" +#include "quill/Frontend.h" +#include "quill/LogMacros.h" +#include "quill/Logger.h" +#include "quill/sinks/ConsoleSink.h" + +#include +#include + +/** + * Trivial logging example to console + */ int main() { - quill::start(); -#ifdef QUILL_FILE_HANDLERS_API_V3_3 - auto file_handler = quill::file_handler("logfile.log", []() { - quill::FileHandlerConfig cfg; - cfg.set_open_mode('w'); - return cfg; - }()); -#else - auto file_handler = quill::file_handler("logfile.log", "w"); -#endif - auto my_logger = quill::create_logger("my_logger", std::move(file_handler)); - - LOG_INFO(my_logger, "Hello from {}", "Quill"); - LOG_CRITICAL(my_logger, "This is a conan example {}", 1234); + // Start the backend thread + quill::BackendOptions backend_options; + quill::Backend::start(backend_options); + + // Frontend + auto console_sink = quill::Frontend::create_or_get_sink("sink_id_1"); + quill::Logger* logger = quill::Frontend::create_or_get_logger("root", std::move(console_sink)); + + // Change the LogLevel to print everything + logger->set_log_level(quill::LogLevel::TraceL3); + + LOG_TRACE_L3(logger, "This is a log trace l3 example {}", 1); + LOG_TRACE_L2(logger, "This is a log trace l2 example {} {}", 2, 2.3); + LOG_TRACE_L1(logger, "This is a log trace l1 {} example", "string"); + LOG_DEBUG(logger, "This is a log debug example {}", 4); + LOG_INFO(logger, "This is a log info example {}", sizeof(std::string)); + LOG_WARNING(logger, "This is a log warning example {}", sizeof(std::string)); + LOG_ERROR(logger, "This is a log error example {}", sizeof(std::string)); + LOG_CRITICAL(logger, "This is a log critical example {}", sizeof(std::string)); + + // libfmt format specification mini language is supported + // note: named arguments are not supported + LOG_INFO(logger, "Support for int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}", 42); + LOG_INFO(logger, "Easy padding in numbers like {:08d}", 12); + LOG_INFO(logger, "{:>30}", "right aligned"); + LOG_INFO(logger, "Positional arguments {1} {2} {0} ", "too", "are", "supported"); + LOG_INFO(logger, "Support for precision {:.4f}", 1.23456); + + // To log with a different format to the same sink, just create another logger + auto console_sink_2 = quill::Frontend::get_sink("sink_id_1"); // get the created sink + quill::Logger* logger_2 = quill::Frontend::create_or_get_logger( + "logger_2", std::move(console_sink_2), "%(time) %(log_level:<9) %(logger:<12) %(message)"); + + logger_2->set_log_level(quill::LogLevel::TraceL3); + + LOG_TRACE_L3(logger_2, "This is a log trace l3 example {}", 1); + LOG_TRACE_L2(logger_2, "This is a log trace l2 example {} {}", 2, 2.3); + LOG_TRACE_L1(logger_2, "This is a log trace l1 {} example", "string"); + LOG_DEBUG(logger_2, "This is a log debug example {}", 4); + LOG_INFO(logger_2, "This is a log info example {}", sizeof(std::string)); + LOG_WARNING(logger_2, "This is a log warning example {}", sizeof(std::string)); + LOG_ERROR(logger_2, "This is a log error example {}", sizeof(std::string)); + LOG_CRITICAL(logger_2, "This is a log critical example {}", sizeof(std::string)); } diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index f3e422292101ad..722f4f019f6812 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,39 +1,41 @@ versions: - "3.9.0": + "4.3.0": folder: "all" + "3.9.0": + folder: "old" "3.8.0": - folder: "all" + folder: "old" "3.7.0": - folder: "all" + folder: "old" "3.6.0": - folder: "all" + folder: "old" "3.5.1": - folder: "all" + folder: "old" "3.5.0": - folder: "all" + folder: "old" "3.4.1": - folder: "all" + folder: "old" "3.4.0": - folder: "all" + folder: "old" "3.3.1": - folder: "all" + folder: "old" "3.2.0": - folder: "all" + folder: "old" "3.1.0": - folder: "all" + folder: "old" "3.0.2": - folder: "all" + folder: "old" "2.9.2": - folder: "all" + folder: "old" "2.9.1": - folder: "all" + folder: "old" "2.9.0": - folder: "all" + folder: "old" "2.8.0": - folder: "all" + folder: "old" "2.7.0": - folder: "all" + folder: "old" "2.6.0": - folder: "all" + folder: "old" "1.7.3": - folder: "all" + folder: "old" diff --git a/recipes/quill/old/conandata.yml b/recipes/quill/old/conandata.yml new file mode 100644 index 00000000000000..5fe2a37cc1525e --- /dev/null +++ b/recipes/quill/old/conandata.yml @@ -0,0 +1,58 @@ +sources: + "3.9.0": + url: "https://github.com/odygrd/quill/archive/v3.9.0.tar.gz" + sha256: "6e6a46dc6ae94e8321aca00d27dae754dcc51ee83fe60078f8f1f3eb7b3b227b" + "3.8.0": + url: "https://github.com/odygrd/quill/archive/v3.8.0.tar.gz" + sha256: "d3e1b349c5d6904c9644e5b79ec65f21692e8094a3d75241a7fe071076eef4dd" + "3.7.0": + url: "https://github.com/odygrd/quill/archive/v3.7.0.tar.gz" + sha256: "53afe555c32b4263c9d31ec11bd0d858983374af7a5e79eb26124f803b192515" + "3.6.0": + url: "https://github.com/odygrd/quill/archive/v3.6.0.tar.gz" + sha256: "ba9dc3df262f2e65c57904580cc8407eba9a462001340c17bab7ae1dccddb4bd" + "3.5.1": + url: "https://github.com/odygrd/quill/archive/v3.5.1.tar.gz" + sha256: "9fa4ebe594c66ce2a409630c304724fa7a2ada0d842ba9c9aaf05f0a90b461f9" + "3.5.0": + url: "https://github.com/odygrd/quill/archive/v3.5.0.tar.gz" + sha256: "47a69465cddeb05645745bed0b3099b49cb627464782f765ce9545723ff1fe84" + "3.4.1": + url: "https://github.com/odygrd/quill/archive/v3.4.1.tar.gz" + sha256: "99f6497b8ba37c30c871fab89f14cd7bc989f3eaa921ccd940a521ee60a6a1c5" + "3.4.0": + url: "https://github.com/odygrd/quill/archive/v3.4.0.tar.gz" + sha256: "16a6cfadc288953f07d128bb51e8ebd4ca6bb8ce4175b5a8af53ce7dde324d8d" + "3.3.1": + url: "https://github.com/odygrd/quill/archive/v3.3.1.tar.gz" + sha256: "f929d54a115b45c32dd2acd1a9810336d35c31fde9f5581c51ad2b80f980d0d1" + "3.2.0": + url: "https://github.com/odygrd/quill/archive/v3.2.0.tar.gz" + sha256: "9745ad83b285bbd0481bd14c1b866b7e6121a981dd211b914f5d55955040fd00" + "3.1.0": + url: "https://github.com/odygrd/quill/archive/v3.1.0.tar.gz" + sha256: "9e7aa64c4f8101ed2b59d1cf3156b1c6bdd712ca89a2ec7aa7166905edc3e621" + "3.0.2": + url: "https://github.com/odygrd/quill/archive/v3.0.2.tar.gz" + sha256: "76e9f607168f71cf1028ae7374fbe91225e400c11b5a51a6ebc992c85d012eed" + "2.9.2": + url: "https://github.com/odygrd/quill/archive/v2.9.2.tar.gz" + sha256: "5b5b502f33277d1ebdb39d57898b1ca25affef4819d390927499f368dd562d91" + "2.9.1": + url: "https://github.com/odygrd/quill/archive/v2.9.1.tar.gz" + sha256: "921e053118136f63cebb2ca1d7e42456fd0bf9626facb755884709092753c054" + "2.9.0": + url: "https://github.com/odygrd/quill/archive/v2.9.0.tar.gz" + sha256: "dec64c0fbb4bfbafe28fdeeeefac10206285bf2be4a42ec5dfb7987ca4ccb372" + "2.8.0": + url: "https://github.com/odygrd/quill/archive/v2.8.0.tar.gz" + sha256: "0461a6c314e3d882f3b9ada487ef1bf558925272509ee41a9fd25f7776db6075" + "2.7.0": + url: "https://github.com/odygrd/quill/archive/v2.7.0.tar.gz" + sha256: "10b8912e4c463a3a86b809076b95bec49aa08393d9ae6b92196cd46314236b87" + "2.6.0": + url: "https://github.com/odygrd/quill/archive/v2.6.0.tar.gz" + sha256: "d72fd5a01bf8d3e59ed93a789a8f103bc31efe0fb3c09182c74036a2e3a8451b" + "1.7.3": + url: "https://github.com/odygrd/quill/archive/v1.7.3.tar.gz" + sha256: "3fff0c5ffb19bbde5429369079741f84a6acce3a781b504cec5e677b05461208" diff --git a/recipes/quill/old/conanfile.py b/recipes/quill/old/conanfile.py new file mode 100644 index 00000000000000..ec7b4a29d6da78 --- /dev/null +++ b/recipes/quill/old/conanfile.py @@ -0,0 +1,174 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir, replace_in_file +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.microsoft import is_msvc + +import os + +required_conan_version = ">=1.52.0" + +class QuillConan(ConanFile): + name = "quill" + description = "Asynchronous Low Latency C++ Logging Library" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/odygrd/quill/" + topics = ("logging", "log", "async") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + "with_bounded_queue": [True, False], + "with_no_exceptions": [True, False], + "with_x86_arch": [True, False], + "with_bounded_blocking_queue": [True, False], + } + default_options = { + "fPIC": True, + "with_bounded_queue": False, + "with_no_exceptions": False, + "with_x86_arch": False, + "with_bounded_blocking_queue": False, + } + + @property + def _min_cppstd(self): + return "17" if Version(self.version) >= "2.0.0" else "14" + + @property + def _compilers_minimum_versions(self): + return { + "14": + { + "gcc": "5", + "Visual Studio": "15", + "clang": "5", + "apple-clang": "10", + }, + "17": + { + "gcc": "8", + "Visual Studio": "16", + "clang": "7", + "apple-clang": "12", + }, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if Version(self.version) < "2.8.0": + del self.options.with_bounded_blocking_queue + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("fmt/10.2.1", transitive_headers=True) + + def validate(self): + supported_archs = ["x86", "x86_64", "armv6", "armv7", "armv7hf", "armv8"] + + if not any(arch in str(self.settings.arch) for arch in supported_archs): + raise ConanInvalidConfiguration(f"{self.settings.arch} is not supported by {self.ref}") + + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + compilers_minimum_version = self._compilers_minimum_versions[self._min_cppstd] + minimum_version = compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version: + if Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + else: + self.output.warning(f"{self.ref} requires C++{self._min_cppstd}. Your compiler is unknown. Assuming it supports C++{self._min_cppstd}.") + + if Version(self.version) >= "2.0.0" and \ + self.settings.compiler== "clang" and Version(self.settings.compiler.version).major == "11" and \ + self.settings.compiler.libcxx == "libstdc++": + raise ConanInvalidConfiguration(f"{self.ref} requires C++ filesystem library, which your compiler doesn't support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def is_quilll_x86_arch(self): + if not self.options.with_x86_arch: + return False + if Version(self.version) < "2.7.0": + return False + if self.settings.arch not in ("x86", "x86_64"): + return False + if self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libc++": + return False + if is_msvc(self): + return False + return True + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["QUILL_FMT_EXTERNAL"] = True + tc.variables["QUILL_ENABLE_INSTALL"] = True + if Version(self.version) < "2.8.0": + tc.variables["QUILL_USE_BOUNDED_QUEUE"] = self.options.with_bounded_queue + else: + if self.options.with_bounded_queue: + tc.preprocessor_definitions["QUILL_USE_BOUNDED_QUEUE"] = 1 + tc.variables["QUILL_NO_EXCEPTIONS"] = self.options.with_no_exceptions + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + if self.is_quilll_x86_arch(): + if Version(self.version) < "2.8.0": + tc.variables["QUILL_X86ARCH"] = True + else: + tc.preprocessor_definitions["QUILL_X86ARCH"] = 1 + tc.variables["CMAKE_CXX_FLAGS"] = "-mclflushopt" + if Version(self.version) >= "2.8.0" and self.options.get_safe("with_bounded_blocking_queue"): + tc.preprocessor_definitions["QUILL_USE_BOUNDED_BLOCKING_QUEUE"] = 1 + if Version(self.version) >= "3.2.0": + tc.variables["QUILL_DISABLE_POSITION_INDEPENDENT_CODE"] = not self.options.get_safe("fPIC") + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + # remove bundled fmt + rmdir(self, os.path.join(self.source_folder, "quill", "quill", "include", "quill", "bundled", "fmt")) + rmdir(self, os.path.join(self.source_folder, "quill", "quill", "src", "bundled", "fmt")) + + if "2.0.0" <= Version(self.version) < "2.9.1": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + """set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/quill/cmake" CACHE STRING "Modules for CMake" FORCE)""", + """set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_LIST_DIR}/quill/cmake")""" + ) + + def build(self): + self._patch_sources() + 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, "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["quill"] + if self.is_quilll_x86_arch(): + self.cpp_info.defines.append("QUILL_X86ARCH") + self.cpp_info.cxxflags.append("-mclflushopt") + self.cpp_info.defines.append("QUILL_FMT_EXTERNAL") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") + if Version(self.version) >= "2.0.0" and \ + self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": + self.cpp_info.system_libs.append("stdc++fs") diff --git a/recipes/quill/old/test_package/CMakeLists.txt b/recipes/quill/old/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..519d5ee2b39737 --- /dev/null +++ b/recipes/quill/old/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(quill REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE quill::quill) +if(quill_VERSION VERSION_GREATER_EQUAL "2.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() + +if(quill_VERSION VERSION_GREATER_EQUAL "3.3.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE QUILL_FILE_HANDLERS_API_V3_3) +endif() diff --git a/recipes/quill/old/test_package/conanfile.py b/recipes/quill/old/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/quill/old/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/quill/old/test_package/test_package.cpp b/recipes/quill/old/test_package/test_package.cpp new file mode 100644 index 00000000000000..b02a6dd344b064 --- /dev/null +++ b/recipes/quill/old/test_package/test_package.cpp @@ -0,0 +1,19 @@ +#include "quill/Quill.h" + +int main() +{ + quill::start(); +#ifdef QUILL_FILE_HANDLERS_API_V3_3 + auto file_handler = quill::file_handler("logfile.log", []() { + quill::FileHandlerConfig cfg; + cfg.set_open_mode('w'); + return cfg; + }()); +#else + auto file_handler = quill::file_handler("logfile.log", "w"); +#endif + auto my_logger = quill::create_logger("my_logger", std::move(file_handler)); + + LOG_INFO(my_logger, "Hello from {}", "Quill"); + LOG_CRITICAL(my_logger, "This is a conan example {}", 1234); +} diff --git a/recipes/quill/all/test_v1_package/CMakeLists.txt b/recipes/quill/old/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/quill/all/test_v1_package/CMakeLists.txt rename to recipes/quill/old/test_v1_package/CMakeLists.txt diff --git a/recipes/quill/all/test_v1_package/conanfile.py b/recipes/quill/old/test_v1_package/conanfile.py similarity index 100% rename from recipes/quill/all/test_v1_package/conanfile.py rename to recipes/quill/old/test_v1_package/conanfile.py From 6b785ac504abd1ca79743bdacc8127e1d5f3e661 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:41:25 +0100 Subject: [PATCH 33/39] (#24210) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: conan-center-bot --- .c3i/conan_v2_ready_references.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index dcc1b04214f076..921b3fcb3d5ada 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -771,6 +771,7 @@ required_for_references: - libpq - libpqxx - libproperties +- libprotobuf-mutator - libpsl - libqasm - libqrencode @@ -845,6 +846,7 @@ required_for_references: - libxshmfence - libxslt - libyaml +- libyang - libyuv - libzen - libzip @@ -1158,6 +1160,7 @@ required_for_references: - polylabel - polylineencoder - polymorphic_value +- popl - poppler-data - popt - portable-file-dialogs @@ -1309,6 +1312,7 @@ required_for_references: - simfil - simple-websocket-server - simple-yaml +- sioclient - sjson-cpp - skyr-url - sleef @@ -1478,6 +1482,7 @@ required_for_references: - units - unity - univalue +- unleash-client-cpp - unordered_dense - unqlite - upx From dbf9012b0406f6b719ef47e8c30e19cd90bd2358 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 4 Jun 2024 13:44:31 +0100 Subject: [PATCH 34/39] (#24214) [bot] Update authorized users list (2024-06-04) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add/remove users to Access Request * Wait on changed usernam --------- Co-authored-by: conan-center-bot Co-authored-by: Rubén Rincón Blanco --- .c3i/authorized_users.yml | 1 + .c3i/waitlist_users.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 390a20c30f019f..354057dd78dd4e 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1365,3 +1365,4 @@ authorized_users: - sunbubble - praetorian20 - phbasler +- gsantner diff --git a/.c3i/waitlist_users.yml b/.c3i/waitlist_users.yml index ead4b94c378823..7ce758660cc3c5 100644 --- a/.c3i/waitlist_users.yml +++ b/.c3i/waitlist_users.yml @@ -2,3 +2,4 @@ waitlist_users: - Mike-Solar - retroandchill - refactorTractor +- jjbel From 2cd819a85810f464cd49e4ad57ebdc2b644246b4 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 5 Jun 2024 00:16:44 +0900 Subject: [PATCH 35/39] (#24212) cpp-dump: add version 0.6.0 --- recipes/cpp-dump/all/conandata.yml | 3 +++ recipes/cpp-dump/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cpp-dump/all/conandata.yml b/recipes/cpp-dump/all/conandata.yml index 5f382aa287ad37..e2ca2bfcf8c917 100644 --- a/recipes/cpp-dump/all/conandata.yml +++ b/recipes/cpp-dump/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.0": + url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.6.0.tar.gz" + sha256: "22bc5fafa22ac7c1e99db8824fdabec4af6baabed0c8b7cc80a0205dfb550414" "0.5.0": url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.5.0.tar.gz" sha256: "31fa8b03c9ee820525137be28f37b36e2abe7fd91df7d67681cb894db2230fe6" diff --git a/recipes/cpp-dump/config.yml b/recipes/cpp-dump/config.yml index ca7b2c3985d5ed..33d7618432d305 100644 --- a/recipes/cpp-dump/config.yml +++ b/recipes/cpp-dump/config.yml @@ -1,3 +1,5 @@ versions: + "0.6.0": + folder: all "0.5.0": folder: all From 856b03dc26f372f0131790d1ffadf3b445543206 Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Tue, 4 Jun 2024 18:18:18 +0200 Subject: [PATCH 36/39] (#24055) [scippp] add version 1.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add SCIP++ 1.2.0 * Fix version string * Move version mapping to conandata to be trimmed per version * typo --------- Co-authored-by: Rubén Rincón Blanco --- recipes/scippp/all/conandata.yml | 7 +++++++ recipes/scippp/all/conanfile.py | 2 +- recipes/scippp/config.yml | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes/scippp/all/conandata.yml b/recipes/scippp/all/conandata.yml index 88b2816d64354f..39c343801470f3 100644 --- a/recipes/scippp/all/conandata.yml +++ b/recipes/scippp/all/conandata.yml @@ -1,7 +1,14 @@ sources: + "1.2.0": + url: "https://github.com/scipopt/SCIPpp/archive/refs/tags/1.2.0.tar.gz" + sha256: "8fa4b819734b9841eda1ec1c9266fb07144be490c3f24be46271c538ab18da61" "1.1.0": url: "https://github.com/scipopt/SCIPpp/archive/refs/tags/1.1.0.tar.gz" sha256: "808b58e8ddd873ec403c021f9255004120e58d7ec6fb4b7d99ff6f21950ff8fb" "1.0.2": url: "https://github.com/scipopt/SCIPpp/archive/refs/tags/1.0.2.tar.gz" sha256: "d51dfd0f1ca1b57619f7c82e32d5390d99d5cdaee98ae1ace99ec05a394dcee3" +scip_mapping: + "1.2.0": "9.0.1" + "1.1.0": "8.0.4" + "1.0.2": "8.0.4" diff --git a/recipes/scippp/all/conanfile.py b/recipes/scippp/all/conanfile.py index 77b8d49bdb43cf..55ee8105f92242 100644 --- a/recipes/scippp/all/conanfile.py +++ b/recipes/scippp/all/conanfile.py @@ -76,7 +76,7 @@ def configure(self): def requirements(self): # see https://github.com/scipopt/SCIPpp/blob/1.0.0/conanfile.py#L25 - self.requires("scip/8.0.4", transitive_headers=True) + self.requires(f"scip/{self.conan_data['scip_mapping'][self.version]}", transitive_headers=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/scippp/config.yml b/recipes/scippp/config.yml index a59308932f1d8b..eb9a4f6036cd31 100644 --- a/recipes/scippp/config.yml +++ b/recipes/scippp/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.2": From 1beea5d092c85d1618984cb8862db82df1f41f01 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 4 Jun 2024 18:50:41 +0200 Subject: [PATCH 37/39] (#23598) [openapi-generator] Add version 7.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [openapi-generator] Add version 7.5.0 * Bump openjdk to 21.0.2 * Update recipes/openapi-generator/all/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco --- recipes/openapi-generator/all/conandata.yml | 6 +++--- recipes/openapi-generator/all/conanfile.py | 2 +- recipes/openapi-generator/config.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index e13b56c9de28d5..d977cc57e49bdf 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "7.5.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.5.0/openapi-generator-cli-7.5.0.jar" + sha256: "47ebbd1beddaf7dfbee523e7b87623c6ec1b1d42960fbe15f6cad2f6426c69bf" "7.4.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.4.0/openapi-generator-cli-7.4.0.jar" sha256: "e42769a98fef5634bee0f921e4b90786a6b3292aa11fe8d2f84c045ac435ab29" "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" "6.6.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar" sha256: "9718ff7844e89462c75dcd9b20a35136f6db257bfe1b874db1e3002e99de4609" diff --git a/recipes/openapi-generator/all/conanfile.py b/recipes/openapi-generator/all/conanfile.py index 369f8d2a3dd644..907abc8f087d18 100644 --- a/recipes/openapi-generator/all/conanfile.py +++ b/recipes/openapi-generator/all/conanfile.py @@ -20,7 +20,7 @@ def layout(self): pass def requirements(self): - self.requires("openjdk/19.0.2") + self.requires("openjdk/21.0.1") def package_id(self): del self.info.settings.arch diff --git a/recipes/openapi-generator/config.yml b/recipes/openapi-generator/config.yml index 949f6537e48065..fd40653d9c013b 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,9 +1,9 @@ versions: + "7.5.0": + folder: all "7.4.0": folder: all "7.3.0": folder: all - "7.2.0": - folder: all "6.6.0": folder: all From d605fd06c15603941911b4d4aeae725ca0d2c963 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 4 Jun 2024 19:14:01 +0200 Subject: [PATCH 38/39] (#24129) [llama-cpp] Bump to b3040 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [llama-cpp] Bump to b3012 * Fix llama_backend_init() arg * bump to b3040 * Fix test * Restore b2038 * Common working test_package.cpp * Ensure the test does not get compiled out --------- Co-authored-by: Rubén Rincón Blanco --- recipes/llama-cpp/all/conandata.yml | 3 ++ .../llama-cpp/all/test_package/conanfile.py | 4 +- .../all/test_package/test_package.cpp | 43 +++---------------- recipes/llama-cpp/config.yml | 2 + 4 files changed, 12 insertions(+), 40 deletions(-) diff --git a/recipes/llama-cpp/all/conandata.yml b/recipes/llama-cpp/all/conandata.yml index 9a540abd27e250..83cccb6e8a1a6b 100644 --- a/recipes/llama-cpp/all/conandata.yml +++ b/recipes/llama-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "b3040": + url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3040.tar.gz" + sha256: "020e040139660eb40113503bb1057d5387677d249b990e008e04821532f7cd62" "b2038": url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b2038.tar.gz" sha256: "a55bc75f5c76624cabfd9ea5e045f76597411231cb6fc231f2a0bff6287ab13b" diff --git a/recipes/llama-cpp/all/test_package/conanfile.py b/recipes/llama-cpp/all/test_package/conanfile.py index 7bb00fd3fe7962..6cd089d783d397 100644 --- a/recipes/llama-cpp/all/test_package/conanfile.py +++ b/recipes/llama-cpp/all/test_package/conanfile.py @@ -2,7 +2,7 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import CMake, cmake_layout class TestPackageConan(ConanFile): @@ -23,5 +23,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package ./models/ggml-vocab-llama.gguf 'Hello World'") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/llama-cpp/all/test_package/test_package.cpp b/recipes/llama-cpp/all/test_package/test_package.cpp index a87c31b0d652cb..1201d51a3f7ee1 100644 --- a/recipes/llama-cpp/all/test_package/test_package.cpp +++ b/recipes/llama-cpp/all/test_package/test_package.cpp @@ -1,41 +1,8 @@ -#include "common.h" #include "llama.h" +#include +int main() { + llama_model_params params = llama_model_default_params(); + std::cout << "Main GPU: " << params.main_gpu << std::endl; -#include -#include -#include -#include - -// from https://github.com/ggerganov/llama.cpp/tree/master/examples/tokenize - -int main(int argc, char ** argv) { - if (argc < 2 || argv[1][0] == '-') { - printf("usage: %s MODEL_PATH PROMPT [--ids]\n" , argv[0]); - return 1; - } - - const char * model_path = argv[1]; - const char * prompt = argv[2]; - - - llama_backend_init(false); - - llama_model_params model_params = llama_model_default_params(); - model_params.vocab_only = true; - llama_model * model = llama_load_model_from_file(model_path, model_params); - - llama_context_params ctx_params = llama_context_default_params(); - llama_context * ctx = llama_new_context_with_model(model, ctx_params); - - const bool add_bos = llama_should_add_bos_token(model); - - std::vector tokens; - - tokens = ::llama_tokenize(model, prompt, add_bos, true); - - for (int i = 0; i < (int) tokens.size(); i++) { - printf("%6d -> '%s'\n", tokens[i], llama_token_to_piece(ctx, tokens[i]).c_str()); - } - - return 0; + return 0; } diff --git a/recipes/llama-cpp/config.yml b/recipes/llama-cpp/config.yml index 139b1481c0979a..9893609aaeaead 100644 --- a/recipes/llama-cpp/config.yml +++ b/recipes/llama-cpp/config.yml @@ -1,3 +1,5 @@ versions: + "b3040": + folder: "all" "b2038": folder: "all" From c77b0377bb6f2fd0f75c9058f7c7c247926ebeb6 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 5 Jun 2024 06:33:54 +0900 Subject: [PATCH 39/39] (#24068) libcurl: add version 8.8.0 * libcurl: add version 8.8.0 * add with_misc_docs option --- recipes/libcurl/all/conandata.yml | 5 +++++ recipes/libcurl/all/conanfile.py | 19 ++++++++++++++++--- recipes/libcurl/config.yml | 2 ++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index 1d6933bdf0eb33..2a1cfd7a97379a 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "8.8.0": + url: + - "https://curl.se/download/curl-8.8.0.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_8_0/curl-8.8.0.tar.xz" + sha256: "0f58bb95fc330c8a46eeb3df5701b0d90c9d9bfcc42bd1cd08791d12551d4400" "8.6.0": url: - "https://curl.se/download/curl-8.6.0.tar.xz" diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index e694ddd82cba60..c2886cb8081ca0 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -64,6 +64,7 @@ class LibcurlConan(ConanFile): "with_cookies": [True, False], "with_ipv6": [True, False], "with_docs": [True, False], + "with_misc_docs": [True, False], "with_verbose_debug": [True, False], "with_symbol_hiding": [True, False], "with_unix_sockets": [True, False], @@ -109,6 +110,7 @@ class LibcurlConan(ConanFile): "with_cookies": True, "with_ipv6": True, "with_docs": False, + "with_misc_docs": False, "with_verbose_debug": True, "with_symbol_hiding": False, "with_unix_sockets": True, @@ -155,6 +157,9 @@ def config_options(self): if self._is_mingw and Version(self.version) < "7.86.0": del self.options.with_unix_sockets + if Version(self.version) < "8.7.0": + del self.options.with_misc_docs + # Default options self.options.with_ssl = "darwinssl" if is_apple_os(self) else "openssl" @@ -287,7 +292,10 @@ def _patch_autotools(self): # - link errors if mingw shared or iOS/tvOS/watchOS # - it makes recipe consistent with CMake build where we don't build curl tool top_makefile = os.path.join(self.source_folder, "Makefile.am") - replace_in_file(self, top_makefile, "SUBDIRS = lib src", "SUBDIRS = lib") + if Version(self.version) < "8.8.0": + replace_in_file(self, top_makefile, "SUBDIRS = lib src", "SUBDIRS = lib") + else: + replace_in_file(self, top_makefile, "SUBDIRS = lib docs src scripts", "SUBDIRS = lib") replace_in_file(self, top_makefile, "include src/Makefile.inc", "") # zlib naming is not always very consistent @@ -445,7 +453,7 @@ def _generate_with_autotools(self): tc.configure_args.append(f"--with-wolfssl={path}") else: tc.configure_args.append("--without-wolfssl") - + if self.options.with_ssl == "mbedtls": path = unix_path(self, self.dependencies["mbedtls"].package_folder) tc.configure_args.append(f"--with-mbedtls={path}") @@ -498,6 +506,12 @@ def _generate_with_autotools(self): tc.configure_args.append(f"--with-ca-fallback={self._yes_no(self.options.with_ca_fallback)}") + if "with_misc_docs" in self.options: + if self.options.with_misc_docs: + tc.configure_args.append("--enable-docs") + else: + tc.configure_args.append("--disable-docs") + # Cross building flags if cross_building(self): if self.settings.os == "Linux" and "arm" in self.settings.arch: @@ -523,7 +537,6 @@ def _generate_with_autotools(self): if self.settings.os != "Windows": tc.fpic = self.options.get_safe("fPIC", True) - if cross_building(self) and is_apple_os(self): tc.extra_defines.extend(['HAVE_SOCKET', 'HAVE_FCNTL_O_NONBLOCK']) diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index ba6c695e81b4c0..c7ba82a37a5dd5 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,6 @@ versions: + "8.8.0": + folder: all "8.6.0": folder: all "8.5.0":